diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml index 402e96e5697..417169fa8cb 100644 --- a/addons/account/edi/invoice_action_data.xml +++ b/addons/account/edi/invoice_action_data.xml @@ -22,7 +22,7 @@ Invoice - Send by Email - ${object.user_id.email or object.company_id.email or 'noreply@localhost'|safe} + ${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe} ${object.company_id.name} Invoice (Ref ${object.number or 'n/a'}) ${object.partner_id.id} diff --git a/addons/account_analytic_analysis/account_analytic_analysis_cron.xml b/addons/account_analytic_analysis/account_analytic_analysis_cron.xml index 53c26fb0d84..492278a87b5 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_cron.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_cron.xml @@ -4,7 +4,7 @@ Contract expiration reminder - ${object.email or ''|safe} + ${(object.email or '')|safe} Contract expiration reminder ${user.company_id.name} ${object.email|safe} ${object.lang} diff --git a/addons/account_followup/account_followup_data.xml b/addons/account_followup/account_followup_data.xml index 7dfc5dc0851..21c638fa513 100644 --- a/addons/account_followup/account_followup_data.xml +++ b/addons/account_followup/account_followup_data.xml @@ -6,7 +6,7 @@ First polite payment follow-up reminder email - ${user.email or ''|safe} + ${(user.email or '')|safe} ${user.company_id.name} Payment Reminder ${object.email|safe} ${object.lang} @@ -45,7 +45,7 @@ ${object.get_followup_table_html() | safe} A bit urging second payment follow-up reminder email - ${user.email or ''|safe} + ${(user.email or '')|safe} ${user.company_id.name} Payment Reminder ${object.email|safe} ${object.lang} @@ -85,7 +85,7 @@ ${object.get_followup_table_html() | safe} Urging payment follow-up reminder email - ${user.email or ''|safe} + ${(user.email or '')|safe} ${user.company_id.name} Payment Reminder ${object.email|safe} ${object.lang} @@ -122,7 +122,7 @@ ${object.get_followup_table_html() | safe} Default payment follow-up reminder e-mail - ${user.email or ''|safe} + ${(user.email or '')|safe} ${user.company_id.name} Payment Reminder ${object.email|safe} ${object.lang} diff --git a/addons/auth_signup/auth_signup_data.xml b/addons/auth_signup/auth_signup_data.xml index dc34e4d8117..65ada8f39db 100644 --- a/addons/auth_signup/auth_signup_data.xml +++ b/addons/auth_signup/auth_signup_data.xml @@ -22,7 +22,7 @@ Reset Password - ]]> + ]]> ${object.email|safe} Password reset OpenERP Enterprise Connection - ]]> + ]]> ${object.email|safe} diff --git a/addons/event/email_template.xml b/addons/event/email_template.xml index 74c47da2c7b..d99774acd3c 100644 --- a/addons/event/email_template.xml +++ b/addons/event/email_template.xml @@ -4,7 +4,7 @@ Confirmation of the Event - ${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'|safe} + ${(object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com')|safe} ${object.email|safe} Your registration at ${object.event_id.name} Confirmation of the Registration - ${object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'|safe} + ${(object.user_id.email or object.company_id.email or 'noreply@' + object.company_id.name + '.com')|safe} ${object.email|safe} Your registration at ${object.event_id.name} welcome new partner info@openerp.com Welcome to the OpenERP Partner Channel! - ${object.email or ''|safe} + ${(object.email or '')|safe} Hello, you will receive your welcome pack via email shortly. @@ -13,7 +13,7 @@ congrats silver partner info@openerp.com Congratulations! You are now a Silver Partner! - ${object.email or ''|safe} + ${(object.email or '')|safe} Hi, we are delighted to welcome you among our Silver Partners as of today! @@ -22,7 +22,7 @@ congrats gold partner info@openerp.com Congratulations! You are now one of our Gold Partners! - ${object.email or ''|safe} + ${(object.email or '')|safe} Hi, we are delighted to let you know that you have entered the select circle of our Gold Partners diff --git a/addons/portal_sale/portal_sale_data.xml b/addons/portal_sale/portal_sale_data.xml index 4eac530dcff..750ae12995f 100644 --- a/addons/portal_sale/portal_sale_data.xml +++ b/addons/portal_sale/portal_sale_data.xml @@ -6,7 +6,7 @@ Sales Order - Send by Email (Portal) - ${object.user_id.email or ''|safe} + ${(object.user_id.email or '')|safe} ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id} @@ -95,7 +95,7 @@ Invoice - Send by Email (Portal) - ${object.user_id.email or object.company_id.email or 'noreply@localhost'|safe} + ${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe} ${object.company_id.name} Invoice (Ref ${object.number or 'n/a' }) ${object.partner_id.id} diff --git a/addons/project/project.py b/addons/project/project.py index 3cba9b7833f..2e7b0a267e4 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1246,6 +1246,8 @@ class account_analytic_account(osv.osv): return analytic_account_id def write(self, cr, uid, ids, vals, context=None): + if isinstance(ids, (int, long)): + ids = [ids] vals_for_project = vals.copy() for account in self.browse(cr, uid, ids, context=context): if not vals.get('name'): diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index cee486c5273..5bb56e8ab15 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -19,7 +19,7 @@ Purchase Order - Send by mail - ${object.validator.email or ''|safe} + ${(object.validator.email or '')|safe} ${object.company_id.name} Order (Ref ${object.name or 'n/a' }) ${object.partner_id.id} diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml index 517da4c4e34..4ad657d7f82 100644 --- a/addons/sale/edi/sale_order_action_data.xml +++ b/addons/sale/edi/sale_order_action_data.xml @@ -20,7 +20,7 @@ Sales Order - Send by Email - ${object.user_id.email or ''|safe} + ${(object.user_id.email or '')|safe} ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id} diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 0a17f56fc71..381b7eb4c28 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -285,9 +285,9 @@ [[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]] - [[ (picking.type == 'in' or removeParentNode('para')) ]][[ move_lines.state == 'done' and 'Received' or move_lines.state]] - [[ (picking.type == 'out' or removeParentNode('para')) ]][[ move_lines.state == 'done' and 'Delivered' or move_lines.state]] - [[ (picking.type == 'internal' or removeParentNode('para')) ]][[ move_lines.state == 'done' and 'Transferred' or move_lines.state]] + [[ (picking.type == 'in' or removeParentNode('para')) and '' ]][[ move_lines.state == 'done' and 'Received' or move_lines.state]] + [[ (picking.type == 'out' or removeParentNode('para')) and '']][[ move_lines.state == 'done' and 'Delivered' or move_lines.state]] + [[ (picking.type == 'internal' or removeParentNode('para')) and '' ]][[ move_lines.state == 'done' and 'Transferred' or move_lines.state]] [[ (move_lines.location_id and move_lines.location_id.name) or '' ]] diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml index f6973a5bc30..2c43364871d 100644 --- a/addons/survey/survey_view.xml +++ b/addons/survey/survey_view.xml @@ -1127,7 +1127,7 @@ - + diff --git a/addons/warning/warning.py b/addons/warning/warning.py index 8e1168e5d35..d582478113a 100644 --- a/addons/warning/warning.py +++ b/addons/warning/warning.py @@ -281,7 +281,7 @@ class purchase_order_line(osv.osv): name=False, price_unit=False, notes=False, context=None): warning = {} if not product: - return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}} + return {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'notes': notes or '', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}} product_obj = self.pool.get('product.product') product_info = product_obj.browse(cr, uid, product) title = False