Enforce currency, invoice_type and party values between invoice and lines
The currency of an invoice line must always be the same as the invoice. For the invoice_type and party they must be the same only if set. issue9854 review324581002
This commit is contained in:
1 parent
26f6a9b13c
commit
5b69bef5a3
1 file changed
-2
@@ -34,8 +34,6 @@ class Purchase(metaclass=PoolMeta):
|
||||
'invoice': None,
|
||||
'invoice_type': invoice.type,
|
||||
'party': invoice.party.id,
|
||||
'currency': invoice.currency.id,
|
||||
'company': invoice.company.id,
|
||||
})
|
||||
InvoiceLine.delete(lines_to_delete)
|
||||
Invoice.cancel([invoice])
|
||||
|
||||
Reference in new issue
Block a user