details: https://code.tryton.org/tryton/commit/68440368ea11
branch: default
user: Cédric Krier <[email protected]>
date: Fri Oct 02 10:38:57 2026 +0200
description:
Invert editable expression of the accounting field on product category
Closes #15137
diffstat:
modules/account_product/product.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 81816f1873ba -r 68440368ea11 modules/account_product/product.py
--- a/modules/account_product/product.py Thu Oct 01 14:53:03 2026 +0200
+++ b/modules/account_product/product.py Fri Oct 02 10:38:57 2026 +0200
@@ -10,7 +10,7 @@
from trytond.modules.company.model import (
CompanyMultiValueMixin, CompanyValueMixin)
from trytond.pool import Pool, PoolMeta
-from trytond.pyson import Bool, Eval, Or
+from trytond.pyson import Eval, Or
from trytond.transaction import Transaction
from .exceptions import AccountError, TaxError
@@ -57,7 +57,7 @@
accounting = fields.Boolean(
"Accounting",
states={
- 'editable': Bool(Eval('childs', [0])) | Bool(Eval('parent')),
+ 'editable': ~Eval('childs', [0]) & ~Eval('parent', None),
},
help="Check to indicate the category is used for accounting.")
account_parent = fields.Boolean('Use Parent\'s accounts',