[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.
This commit is contained in:
Denis Ledoux 2014-07-18 16:49:45 +02:00
parent a7d3735915
commit 6801a3f505
1 changed files with 1 additions and 1 deletions

View File

@ -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],