diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py
index 897b8366b7a..3b000e40592 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -366,12 +366,13 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
return period or 0.0
def _get_partners(self,data):
+ # TODO: deprecated, to remove in trunk
if data['form']['result_selection'] == 'customer':
- return 'Receivable Accounts'
+ return self._translate('Receivable Accounts')
elif data['form']['result_selection'] == 'supplier':
- return 'Payable Accounts'
+ return self._translate('Payable Accounts')
elif data['form']['result_selection'] == 'customer_supplier':
- return 'Receivable and Payable Accounts'
+ return self._translate('Receivable and Payable Accounts')
return ''
report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner',
diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml
index fb79ab0d199..5b5404e9c86 100644
--- a/addons/account/report/account_aged_partner_balance.rml
+++ b/addons/account/report/account_aged_partner_balance.rml
@@ -147,7 +147,9 @@
[[ data['form']['period_length'] ]]
- [[ get_partners(data) ]]
+ Receivable Accounts[[ data['form']['result_selection'] == 'customer' or removeParentNode('para') ]]
+ Payable Accounts[[ data['form']['result_selection'] == 'supplier' or removeParentNode('para') ]]
+ Receivable and Payable Accounts[[ data['form']['result_selection'] == 'customer_supplier' or removeParentNode('para') ]]
|
[[ data['form']['direction_selection'] ]]
@@ -166,7 +168,8 @@
Partners
|
- [[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]
+ Due[[ data['form']['direction_selection'] == 'future' and ' ' or removeParentNode('para') ]]
+ Not due[[ data['form']['direction_selection'] != 'future' and ' ' or removeParentNode('para') ]]
|
[[ data['form']['4']['name'] ]]
diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml
index 88980a9cd97..6ddfc238bff 100644
--- a/addons/account/report/account_balance.rml
+++ b/addons/account/report/account_balance.rml
@@ -211,8 +211,10 @@
- [[ data['model']=='account.account' and 'Company'or removeParentNode('para') ]]
- [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] |
+
+ Company[[ data['model']=='account.account' and ' ' or removeParentNode('para') ]]
+ Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]]
+ |
Fiscal Year
|
@@ -233,7 +235,11 @@
[[ get_fiscalyear(data) or '' ]]
|
- [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] |
+
+ All[[ data['form']['display_account']=='all' and ' ' or removeParentNode('para') ]]
+ With movements[[ data['form']['display_account']=='movement' and ' ' or removeParentNode('para') ]]
+ With balance is not equal to 0[[ data['form']['display_account']=='not_zero' and ' ' or removeParentNode('para') ]]
+ |
[[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]]
[[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]]
diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml
index 4ad086d6bd4..dce30e59918 100644
--- a/addons/account/report/account_general_journal.rml
+++ b/addons/account/report/account_general_journal.rml
@@ -220,8 +220,8 @@
- [[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]
- [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] |
+ Company[[ data['model']=='account.journal.period' and ' ' or removeParentNode('para') ]]
+ Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]] |
Fiscal Year |
Journals |
Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] |
diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml
index 7ae5db98f20..c5d24343148 100644
--- a/addons/account/report/account_general_ledger_landscape.rml
+++ b/addons/account/report/account_general_ledger_landscape.rml
@@ -360,9 +360,8 @@
- [[ data['model']=='account.account' and 'Company' or removeParentNode('para') ]]
- [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]]
- |
+ Company[[ data['model']=='account.account' and ' ' or removeParentNode('para') ]]
+ Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]]
Fiscal Year
|
@@ -395,7 +394,9 @@
[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]
- [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]
+ All[[ data['form']['display_account']=='all' and ' ' or removeParentNode('para') ]]
+ With movements[[ data['form']['display_account']=='movement' and ' ' or removeParentNode('para') ]]
+ With balance is not equal to 0[[ data['form']['display_account']=='not_zero' and ' ' or removeParentNode('para') ]]
|
[[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]]
diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py
index 769a8335f55..97e19be4b0c 100644
--- a/addons/account/report/account_journal.py
+++ b/addons/account/report/account_journal.py
@@ -189,11 +189,12 @@ class journal_print(report_sxw.rml_parse, common_report_header):
return data['form']['amount_currency']
def _get_sortby(self, data):
+ # TODO: deprecated, to remove in trunk
if self.sort_selection == 'date':
- return 'Date'
+ return self._translate('Date')
elif self.sort_selection == 'ref':
- return 'Reference Number'
- return 'Date'
+ return self._translate('Reference Number')
+ return self._translate('Date')
report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header='external')
report_sxw.report_sxw('report.account.journal.period.print.sale.purchase', 'account.journal.period', 'addons/account/report/account_journal_sale_purchase.rml', parser=journal_print, header='external')
diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml
index fb203d4e664..6d606ed1937 100644
--- a/addons/account/report/account_journal.rml
+++ b/addons/account/report/account_journal.rml
@@ -186,8 +186,8 @@
- [[ data['model']=='account.journal.period'and 'Company' or removeParentNode('para') ]]
- [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] |
+ Company[[ data['model']=='account.journal.period'and ' ' or removeParentNode('para') ]]
+ Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]] |
Fiscal Year |
Journal |
Period |
@@ -199,8 +199,10 @@
[[ get_fiscalyear(data) or '' ]] |
[[ o.journal_id.name ]] |
[[ o.period_id.name ]] |
- [[ get_sortby(data) ]] |
- [[ get_target_move(data) ]] |
+
+ Date[[ data['form'].get('sort_selection', 'date') == 'date' and ' ' or removeParentNode('para') ]]
+ Reference Number[[ data['form'].get('sort_selection', 'date') == 'ref' and ' ' or removeParentNode('para') ]]
+ |
diff --git a/addons/account/report/account_partner_ledger.py b/addons/account/report/account_partner_ledger.py
index 21c1ee3d846..d21323e02fc 100644
--- a/addons/account/report/account_partner_ledger.py
+++ b/addons/account/report/account_partner_ledger.py
@@ -267,12 +267,13 @@ class third_party_ledger(report_sxw.rml_parse, common_report_header):
return result_tmp + result_init
def _get_partners(self):
+ # TODO: deprecated, to remove in trunk
if self.result_selection == 'customer':
- return 'Receivable Accounts'
+ return _('Receivable Accounts')
elif self.result_selection == 'supplier':
- return 'Payable Accounts'
+ return _('Payable Accounts')
elif self.result_selection == 'customer_supplier':
- return 'Receivable and Payable Accounts'
+ return _('Receivable and Payable Accounts')
return ''
def _sum_currency_amount_account(self, account, form):
diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml
index 0d7122369c6..48ed6d4afe3 100644
--- a/addons/account/report/account_partner_ledger.rml
+++ b/addons/account/report/account_partner_ledger.rml
@@ -423,7 +423,9 @@
|
- [[ get_partners() ]]
+ Receivable Accounts[[ data['form'].get('result_selection', 'customer') == 'customer' or removeParentNode('para') ]]
+ Payable Accounts[[ data['form'].get('result_selection', 'customer') == 'supplier' or removeParentNode('para') ]]
+ Receivable and Payable Accounts[[ data['form'].get('result_selection', 'customer') == 'customer_supplier' or removeParentNode('para') ]]
|
[[ get_target_move(data) ]]
diff --git a/addons/account/static/src/js/account_move_line_quickadd.js b/addons/account/static/src/js/account_move_line_quickadd.js
index 997b2b03bb6..0b904e19da6 100644
--- a/addons/account/static/src/js/account_move_line_quickadd.js
+++ b/addons/account/static/src/js/account_move_line_quickadd.js
@@ -84,7 +84,7 @@ openerp.account.quickadd = function (instance) {
},
search_by_journal_period: function() {
var self = this;
- var domain = [];
+ var domain = ['|',['debit', '!=', 0], ['credit', '!=', 0]];
if (self.current_journal !== null) domain.push(["journal_id", "=", self.current_journal]);
if (self.current_period !== null) domain.push(["period_id", "=", self.current_period]);
self.last_context["journal_id"] = self.current_journal === null ? false : self.current_journal;
diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py
index c457140684a..871aea9e4d9 100644
--- a/addons/account/wizard/account_report_common.py
+++ b/addons/account/wizard/account_report_common.py
@@ -175,7 +175,7 @@ class account_common_report(osv.osv_memory):
data['form'][field] = data['form'][field][0]
used_context = self._build_contexts(cr, uid, ids, data, context=context)
data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []
- data['form']['used_context'] = used_context
+ data['form']['used_context'] = dict(used_context, lang=context.get('lang', 'en_US'))
return self._print_report(cr, uid, ids, data, context=context)
diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml
index 7fb4091b45f..42b17ae06c3 100644
--- a/addons/account_analytic_plans/account_analytic_plans_view.xml
+++ b/addons/account_analytic_plans/account_analytic_plans_view.xml
@@ -248,9 +248,12 @@
account.analytic.default
-
+
+ 1
+
+
-
+
diff --git a/addons/account_anglo_saxon/purchase.py b/addons/account_anglo_saxon/purchase.py
index c10a2a97d80..fc36dab41c2 100644
--- a/addons/account_anglo_saxon/purchase.py
+++ b/addons/account_anglo_saxon/purchase.py
@@ -26,16 +26,15 @@ class purchase_order(osv.osv):
_inherit = "purchase.order"
_description = "Purchase Order"
- def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None):
- line = super(purchase_order, self)._prepare_inv_line(cr, uid, account_id, order_line, context=context)
+ def _choose_account_from_po_line(self, cr, uid, order_line, context=None):
+ account_id = super(purchase_order, self)._choose_account_from_po_line(cr, uid, order_line, context=context)
if order_line.product_id and not order_line.product_id.type == 'service':
acc_id = order_line.product_id.property_stock_account_input and order_line.product_id.property_stock_account_input.id
if not acc_id:
acc_id = order_line.product_id.categ_id.property_stock_account_input_categ and order_line.product_id.categ_id.property_stock_account_input_categ.id
if acc_id:
fpos = order_line.order_id.fiscal_position or False
- new_account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id)
- line.update({'account_id': new_account_id})
- return line
+ account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id)
+ return account_id
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 81eb76ff3a8..35c9163619a 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -932,6 +932,8 @@ class account_voucher(osv.osv):
move_pool = self.pool.get('account.move')
for voucher in self.browse(cr, uid, ids, context=context):
+ # refresh to make sure you don't unlink an already removed move
+ voucher.refresh()
recs = []
for line in voucher.move_ids:
if line.reconcile_id:
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 896349ec5e6..a9061c0afce 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -1510,7 +1510,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
continue
if r['class']=='private':
for f in r.keys():
- if f not in ('id','date','date_deadline','duration','user_id','state'):
+ if f not in ('id','date','date_deadline','duration','user_id','state','interval','count'):
if isinstance(r[f], list):
r[f] = []
else:
diff --git a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
index a12becdc68c..669c8b8fb84 100644
--- a/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
+++ b/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ExportToRML.py
@@ -1,7 +1,7 @@
#########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
-# Copyright (C) 2004-2010 OpenERP SA ().
+# Copyright (C) 2004-2013 OpenERP SA ().
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -78,7 +78,7 @@ class ExportToRML( unohelper.Base, XJobExecutor ):
res = self.sock.execute(database, uid, self.password, 'ir.actions.report.xml', 'sxwtorml',base64.encodestring(data),file_type)
if res['report_rml_content']:
- write_data_to_file( get_absolute_file_path( filename[7:] ), res['report_rml_content'] )
+ write_data_to_file(get_absolute_file_path(filename), res['report_rml_content'])
except Exception,e:
import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
@@ -99,8 +99,12 @@ class ExportToRML( unohelper.Base, XJobExecutor ):
oFileDialog.setDefaultName(f_path )
- sPath = oFileDialog.execute() == 1 and oFileDialog.Files[0] or None
+ sPath = oFileDialog.execute() == 1 and oFileDialog.Files[0] or ''
oFileDialog.dispose()
+ sPath = sPath[7:]
+ if sPath.startswith('localhost/'):
+ slash = int(os.name == 'nt')
+ sPath = sPath[9 + slash:]
return sPath
if __name__<>"package" and __name__=="__main__":
diff --git a/addons/base_report_designer/static/base-report-designer-plugin/openerp_report_designer.zip b/addons/base_report_designer/static/base-report-designer-plugin/openerp_report_designer.zip
index 238f9d19671..2fc61fbf679 100644
Binary files a/addons/base_report_designer/static/base-report-designer-plugin/openerp_report_designer.zip and b/addons/base_report_designer/static/base-report-designer-plugin/openerp_report_designer.zip differ
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 0256eba517e..57277debc28 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -96,13 +96,11 @@ class crm_lead(base_stage, format_address, osv.osv):
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
- if not vals.get('stage_id'):
- ctx = context.copy()
- if vals.get('section_id'):
- ctx['default_section_id'] = vals['section_id']
- if vals.get('type'):
- ctx['default_type'] = vals['type']
- vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx)
+ if vals.get('type') and not context.get('default_type'):
+ context['default_type'] = vals.get('type')
+ if vals.get('section_id') and not context.get('default_section_id'):
+ context['default_section_id'] = vals.get('section_id')
+
# context: no_log, because subtype already handle this
create_context = dict(context, mail_create_nolog=True)
return super(crm_lead, self).create(cr, uid, vals, context=create_context)
@@ -369,12 +367,11 @@ class crm_lead(base_stage, format_address, osv.osv):
def on_change_user(self, cr, uid, ids, user_id, context=None):
""" When changing the user, also set a section_id or restrict section id
to the ones user_id is member of. """
- section_id = False
if user_id:
section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context)
if section_ids:
- section_id = section_ids[0]
- return {'value': {'section_id': section_id}}
+ return {'value': {'section_id': section_ids[0]}}
+ return {'value': {}}
def _check(self, cr, uid, ids=False, context=None):
""" Override of the base.stage method.
diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml
index 2344604a294..f6f94547173 100644
--- a/addons/crm/crm_phonecall_menu.xml
+++ b/addons/crm/crm_phonecall_menu.xml
@@ -58,7 +58,7 @@
tree,calendar
[]
- {}
+ {'default_state': 'done'}
diff --git a/addons/crm/res_partner.py b/addons/crm/res_partner.py
index f25b1303c02..fca9222082d 100644
--- a/addons/crm/res_partner.py
+++ b/addons/crm/res_partner.py
@@ -56,7 +56,7 @@ class res_partner(osv.osv):
default.update({'opportunity_ids': [], 'meeting_ids' : [], 'phonecall_ids' : []})
- super(res_partner, self).copy(cr, uid, record_id, default, context)
+ return super(res_partner, self).copy(cr, uid, record_id, default, context)
def redirect_partner_form(self, cr, uid, partner_id, context=None):
search_view = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'view_res_partner_filter')
diff --git a/addons/document_page/document_page.py b/addons/document_page/document_page.py
index f74cfe02a21..7f885018001 100644
--- a/addons/document_page/document_page.py
+++ b/addons/document_page/document_page.py
@@ -66,7 +66,7 @@ class document_page(osv.osv):
'create_date': fields.datetime("Created on", select=True, readonly=True),
'create_uid': fields.many2one('res.users', 'Author', select=True, readonly=True),
'write_date': fields.datetime("Modification Date", select=True, readonly=True),
- 'write_uid': fields.many2one('res.users', "Last Contributor", select=True),
+ 'write_uid': fields.many2one('res.users', "Last Contributor", select=True, readonly=True),
}
_defaults = {
'type':'content',
diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py
index 746c2cc55f6..92187e97b47 100644
--- a/addons/email_template/wizard/mail_compose_message.py
+++ b/addons/email_template/wizard/mail_compose_message.py
@@ -155,7 +155,8 @@ class mail_compose_message(osv.TransientModel):
values['body'] = values.pop('body_html', '')
# transform email_to, email_cc into partner_ids
- partner_ids = self._get_or_create_partners_from_values(cr, uid, values, context=context)
+ ctx = dict((k, v) for k, v in (context or {}).items() if not k.startswith('default_'))
+ partner_ids = self._get_or_create_partners_from_values(cr, uid, values, context=ctx)
# legacy template behavior: void values do not erase existing values and the
# related key is removed from the values dict
if partner_ids:
diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml
index a383f72e2ab..0d9e2a247fd 100644
--- a/addons/hr_expense/hr_expense_view.xml
+++ b/addons/hr_expense/hr_expense_view.xml
@@ -86,7 +86,7 @@
-
+
| | |