[IMP] CRM: Merge opportunities by Wizard record

bzr revid: aag@tinyerp.com-20111206114541-ghgwoe3zkh74d59s
This commit is contained in:
Atik Agewan (OpenERP)
2011-12-06 17:15:41 +05:30
parent d39e30130b
commit 7e52c28d5f
+12 -3
View File
@@ -13,13 +13,22 @@
res_id = self.create(cr, uid, {'name': "Quoi de prix de votre autre service?", 'partner_id': ref("base.res_partner_9")}, context=context)
self.make_opportunity(cr, uid, [res_id], context=context)
-
Now I merge all opportunities of customer.
For merge all opportunities of customer.
-
!python {model: crm.lead}: |
opportunity_ids = self.search(cr, uid, [('partner_id','=', ref("base.res_partner_9"))])
self.merge_opportunity(cr, uid, opportunity_ids, context=context)
context.update({'active_model': 'crm.lead','active_ids': opportunity_ids})
-
I check for merged opportunities for customer.
I create record for merge.
-
!record {model: crm.merge.opportunity, id: opportunity_merge_id }:
-
I Merged opportunities of customer..
-
!python {model: crm.merge.opportunity}: |
self.action_merge(cr, uid, [ref("opportunity_merge_id")], context=context)
-
I check for merged opportunities for customer.
-
!python {model: crm.lead}: |
merge_id = self.search(cr, uid, [('partner_id','=', ref("base.res_partner_9"))])