Anto has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons5-merge-opportunity-aja into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons5-merge-opportunity-aja/+merge/126247
Hello,
Improve Merge existing opportunity (lead to existing opportunity)and
notification message.
Thank You
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons5-merge-opportunity-aja/+merge/126247
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons5-merge-opportunity-aja.
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2012-09-20 07:38:24 +0000
+++ crm/crm_lead.py 2012-09-25 14:00:32 +0000
@@ -477,7 +477,7 @@
def _merge_notification(self, cr, uid, opportunity_id, opportunities, context=None):
#TOFIX: mail template should be used instead of fix body, subject text
details = []
- merge_message = _('Merged opportunities')
+ merge_message = _('Merged opportunities ')
subject = [merge_message]
fields = ['name', 'partner_id', 'stage_id', 'section_id', 'user_id', 'categ_ids', 'channel_id', 'company_id', 'contact_name',
'email_from', 'phone', 'fax', 'mobile', 'state_id', 'description', 'probability', 'planned_revenue',
@@ -556,8 +556,6 @@
data = self._merge_data(cr, uid, ids, oldest, fields, context=context)
- # merge data into first opportunity
- self.write(cr, uid, [first_opportunity.id], data, context=context)
#copy message and attachements into the first opportunity
self._merge_opportunity_history(cr, uid, first_opportunity.id, tail_opportunities, context=context)
@@ -565,6 +563,8 @@
#Notification about loss of information
self._merge_notification(cr, uid, first_opportunity, opportunities, context=context)
+ # merge data into first opportunity
+ self.write(cr, uid, [first_opportunity.id], data, context=context)
#delete tail opportunities
self.unlink(cr, uid, [x.id for x in tail_opportunities], context=context)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp