From 942a10f2b37b06e71481bdd2224e533beff1646e Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 11 Dec 2013 18:14:29 +0100 Subject: [PATCH] [REVERT] rev 9007 dle@openerp.com-20131122150606-ruqe2l0e7gn84upf default_model and default_res_id were not present when doing this fix, because in the web client, we prevented the propagation of the context keys beginning with "_default" in some cases. The fact is that, in this specific case, the keys "default_" should not have been removed. This has been fix in web client in rev 3892 revid:chs@openerp.com-20131211163609-i3s2mlncf5n91uda Besides, active_model cannot be used here, as active_model is not 'sale.order' but the model of the wizard. bzr revid: dle@openerp.com-20131211171429-6bxuh7o4ueiy9dd1 --- addons/sale/sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 88cd20bd786..6584d25bdad 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -997,9 +997,9 @@ class mail_compose_message(osv.Model): def send_mail(self, cr, uid, ids, context=None): context = context or {} - if context.get('active_model') == 'sale.order' and context.get('active_ids') and context.get('mark_so_as_sent'): + if context.get('default_model') == 'sale.order' and context.get('default_res_id') and context.get('mark_so_as_sent'): context = dict(context, mail_post_autofollow=True) - self.pool.get('sale.order').signal_quotation_sent(cr, uid, context['active_ids']) + self.pool.get('sale.order').signal_quotation_sent(cr, uid, [context['default_res_id']]) return super(mail_compose_message, self).send_mail(cr, uid, ids, context=context)