Amit Parik (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-1002456-amp into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #1002456 in OpenERP Addons: "[marketing_campaign] When a partner is
copied, the campaign work items are copied as well"
https://bugs.launchpad.net/openobject-addons/+bug/1002456
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1002456-amp/+merge/106742
Hello,
This branch fix the duplication problem of partner. When duplicates the partner
it will also duplicate the campaign follow up of this partner because
workitem_ids is one2many field on res.partner but we forget to write a copy
method there and make the workitem_ids blank.
This fix will solve it.
Thanks!
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1002456-amp/+merge/106742
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-1002456-amp.
=== modified file 'marketing_campaign/res_partner.py'
--- marketing_campaign/res_partner.py 2011-01-14 00:11:01 +0000
+++ marketing_campaign/res_partner.py 2012-08-24 10:33:20 +0000
@@ -29,7 +29,13 @@
'partner_id', 'Workitems',
readonly=True),
}
-
+
+ def copy(self, cr, uid, id, default={}, context=None):
+ default.update({
+ 'workitem_ids': [],
+ })
+ return super(res_partner, self).copy(cr, uid, id, default=default, context=context)
+
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_______________________________________________
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