From 572e7d08c7e5c9427465bc3ca951a03372c877b1 Mon Sep 17 00:00:00 2001 From: skh Date: Mon, 28 Mar 2011 15:59:12 +0530 Subject: [PATCH] [FIX] Account: Problem for duplicating a record bzr revid: skh@tinyerp.com-20110328102912-fr1qz4e4hcahxfsh --- addons/account/invoice.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 269a4a0c0f4..21b4170388c 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1609,7 +1609,11 @@ class res_partner(osv.osv): _columns = { 'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True), } - + + def copy(self, cr, uid, id, default={}, context={}): + default.update({'invoice_ids' : False}) + return super(res_partner, self).copy(cr, uid, id, default, context) + res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: