changeset 5c8007be3d46 in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=5c8007be3d46
description:
        Use same domain for account in chart properties and configuration

        issue10484
        review342441002
diffstat:

 account.py       |  4 ++++
 configuration.py |  2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (41 lines):

diff -r 31fdcdd723b3 -r 5c8007be3d46 account.py
--- a/account.py        Sun Jun 06 09:37:26 2021 +0200
+++ b/account.py        Fri Jun 11 00:13:11 2021 +0200
@@ -2661,14 +2661,18 @@
     account_receivable = fields.Many2One('account.account',
             'Default Receivable Account',
             domain=[
+                ('closed', '!=', True),
                 ('type.receivable', '=', True),
+                ('party_required', '=', True),
                 ('company', '=', Eval('company')),
             ],
             depends=['company'])
     account_payable = fields.Many2One('account.account',
             'Default Payable Account',
             domain=[
+                ('closed', '!=', True),
                 ('type.payable', '=', True),
+                ('party_required', '=', True),
                 ('company', '=', Eval('company')),
             ],
             depends=['company'])
diff -r 31fdcdd723b3 -r 5c8007be3d46 configuration.py
--- a/configuration.py  Sun Jun 06 09:37:26 2021 +0200
+++ b/configuration.py  Fri Jun 11 00:13:11 2021 +0200
@@ -20,6 +20,7 @@
     default_account_receivable = fields.MultiValue(fields.Many2One(
             'account.account', "Default Account Receivable",
             domain=[
+                ('closed', '!=', True),
                 ('type.receivable', '=', True),
                 ('party_required', '=', True),
                 ('company', '=', Eval('context', {}).get('company', -1)),
@@ -27,6 +28,7 @@
     default_account_payable = fields.MultiValue(fields.Many2One(
             'account.account', "Default Account Payable",
             domain=[
+                ('closed', '!=', True),
                 ('type.payable', '=', True),
                 ('party_required', '=', True),
                 ('company', '=', Eval('context', {}).get('company', -1)),

Reply via email to