changeset a01af0e96ada in modules/account_invoice_line_standalone:5.8
details:
https://hg.tryton.org/modules/account_invoice_line_standalone?cmd=changeset;node=a01af0e96ada
description:
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
(grafted from 0e88fd656193fdce224d1ae99afe1ec370d4a8de)
diffstat:
invoice.py | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diffs (32 lines):
diff -r fec5bc45ff2b -r a01af0e96ada invoice.py
--- a/invoice.py Fri Dec 11 15:44:02 2020 +0100
+++ b/invoice.py Wed Dec 16 21:24:07 2020 +0100
@@ -1,6 +1,5 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
-from trytond.pyson import Eval
from trytond.transaction import Transaction
from trytond.pool import PoolMeta
@@ -12,13 +11,8 @@
def __setup__(cls):
super(Invoice, cls).__setup__()
add_remove = [
- ('invoice_type', '=', Eval('type')),
- ('party', '=', Eval('party')),
- ('currency', '=', Eval('currency')),
- ('company', '=', Eval('company')),
('invoice', '=', None),
]
- add_remove_depends = set(['type', 'party', 'currency', 'company'])
if not cls.lines.add_remove:
cls.lines.add_remove = add_remove
@@ -27,7 +21,6 @@
add_remove,
cls.lines.add_remove,
]
- cls.lines.depends = list(set(cls.lines.depends) | add_remove_depends)
class InvoiceLine(metaclass=PoolMeta):