[MERGE] project: do not copy project tasks when duplicating partners, courtesy of Yannick Vaucher (Camptocamp)
lp bug: https://launchpad.net/bugs/1189524 fixed bzr revid: odo@openerp.com-20130612132844-on6uq9brcbjqjgdc
This commit is contained in:
commit
2d6abbd580
|
@ -29,6 +29,14 @@ class res_partner(osv.osv):
|
|||
'task_ids': fields.one2many('project.task', 'partner_id', 'Tasks'),
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, record_id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
|
||||
default['task_ids'] = []
|
||||
return super(res_partner, self).copy(
|
||||
cr, uid, record_id, default=default, context=context)
|
||||
|
||||
res_partner()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue