From 6801a3f5050183e169213acb11c5463d5167905f Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 18 Jul 2014 16:49:45 +0200 Subject: [PATCH] [FIX] sale: do not propagate context on send email Otherwise, active_id, active_ids, active_model params are propagated, and it leads to inconsistencies. For instances, go to Sales > Customers, choose a customer which has quotations. On the form, hit the "Quotations and sales" Button Choose a quotation. Hit the "send by email" button. The template preview should be displayed correctly. Now send the email, than - Either, you have no traceback: The email sent is the email of another quotation, the quotation having as id the id of the partner you chose - Either, you have a traceback: There is no quotation having as id the id of the partner you chose. --- addons/sale/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index fa17e080880..c36bfacacb8 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -606,7 +606,7 @@ class sale_order(osv.osv): compose_form_id = ir_model_data.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')[1] except ValueError: compose_form_id = False - ctx = dict(context) + ctx = dict() ctx.update({ 'default_model': 'sale.order', 'default_res_id': ids[0],