changeset f2fffd6bd279 in modules/account_invoice:default
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=f2fffd6bd279
description:
Add domain against closed account
issue8917
review262641002
diffstat:
invoice.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r ae31d47e133c -r f2fffd6bd279 invoice.py
--- a/invoice.py Tue Dec 24 17:42:56 2019 +0100
+++ b/invoice.py Sat Dec 28 17:48:50 2019 +0100
@@ -149,6 +149,7 @@
states=_STATES, depends=_DEPENDS + [
'type', 'company', 'accounting_date', 'invoice_date'],
domain=[
+ ('closed', '!=', True),
('company', '=', Eval('company', -1)),
If(Eval('type') == 'out',
('type.receivable', '=', True),
@@ -1731,6 +1732,7 @@
# Set account domain dynamically for kind
cls.account.domain = [
+ ('closed', '!=', True),
('company', '=', Eval('company', -1)),
If(Bool(Eval('_parent_invoice')),
If(Eval('_parent_invoice', {}).get('type') == 'out',