From ff3a6ddde65eb7e818517e9a4ca17d7a352346c8 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 23 Sep 2013 18:24:28 +0200 Subject: [PATCH] [FIX]sale_crm: add context to categ_ids for sale order object. Its dummy to set 'crm.lead' for object_name in context while the current object is a 'sale.order', but its less dummy to copy crm.lead tags to sale.order tags while using the convert to quotation wizard bzr revid: dle@openerp.com-20130923162428-g0s3o9tid09ogfv3 --- addons/sale_crm/sale_crm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_crm/sale_crm.py b/addons/sale_crm/sale_crm.py index 93225cc7569..e9ab87e54a4 100644 --- a/addons/sale_crm/sale_crm.py +++ b/addons/sale_crm/sale_crm.py @@ -26,7 +26,7 @@ class sale_order(osv.osv): _columns = { 'section_id': fields.many2one('crm.case.section', 'Sales Team'), 'categ_ids': fields.many2many('crm.case.categ', 'sale_order_category_rel', 'order_id', 'category_id', 'Categories', \ - domain="['|',('section_id','=',section_id),('section_id','=',False), ('object_id.model', '=', 'crm.lead')]") + domain="['|',('section_id','=',section_id),('section_id','=',False), ('object_id.model', '=', 'crm.lead')]", context="{'object_name': 'crm.lead'}") } def _prepare_invoice(self, cr, uid, order, lines, context=None):