projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73f7a2b
)
[FIX] account: prevent invoice line duplication on partner duplication
author
Denis Ledoux
<dle@odoo.com>
Tue, 25 Nov 2014 17:18:23 +0000
(18:18 +0100)
committer
Denis Ledoux
<dle@odoo.com>
Tue, 25 Nov 2014 17:23:45 +0000
(18:23 +0100)
If a company contact (a partner with a company set as parent) had invoices, and the company of this contact was duplicated, all the invoices lines were duplicated, on the original invoice moreover (new lines were added on existing invoices)
addons/account/account_invoice.py
patch
|
blob
|
history
diff --git
a/addons/account/account_invoice.py
b/addons/account/account_invoice.py
index
febddd3
..
f90c966
100644
(file)
--- a/
addons/account/account_invoice.py
+++ b/
addons/account/account_invoice.py
@@
-1808,10
+1808,10
@@
class res_partner(osv.osv):
partner = partner.parent_id
return partner
- def copy(self, cr, uid, id, default=None, context=None):
+ def copy_data(self, cr, uid, id, default=None, context=None):
default = default or {}
default.update({'invoice_ids' : []})
- return super(res_partner, self).copy(cr, uid, id, default, context)
+ return super(res_partner, self).copy_data(cr, uid, id, default=default, context=context)
class mail_compose_message(osv.Model):