[FIX] Account: Problem for duplicating a record

lp bug: https://launchpad.net/bugs/740134 fixed

bzr revid: skh@tinyerp.com-20110329110135-yemxfqb4hyyeiljk
This commit is contained in:
skh
2011-03-29 16:31:35 +05:30
parent 994b44db40
commit 65d2c896b0
+7 -1
View File
@@ -1610,7 +1610,13 @@ class res_partner(osv.osv):
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
}
def copy(self, cr, uid, id, default={}, context={}):
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
if context is None:
context = {}
default.update({'invoice_ids' : []})
return super(res_partner, self).copy(cr, uid, id, default, context)