details: https://code.tryton.org/tryton/commit/5009af787f74
branch: default
user: Cédric Krier <[email protected]>
date: Wed Oct 28 17:01:46 2026 +0100
description:
Remove the domain on the debit/credit line of account move
With the domain inversion the fields were set to readonly which meant
that the
other one had to be cleared before it could be edited.
Instead we rely only on the on_change's to set the other field to 0.
Closes #15198
diffstat:
modules/account/move.py | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diffs (22 lines):
diff -r 0954ae806fc0 -r 5009af787f74 modules/account/move.py
--- a/modules/account/move.py Thu Nov 12 15:21:25 2026 +0100
+++ b/modules/account/move.py Wed Oct 28 17:01:46 2026 +0100
@@ -908,16 +908,10 @@
debit = Monetary(
"Debit", currency='currency', digits='currency', required=True,
- states=_states,
- domain=[
- If(Eval('credit', 0), ('debit', '=', 0), ()),
- ])
+ states=_states)
credit = Monetary(
"Credit", currency='currency', digits='currency', required=True,
- states=_states,
- domain=[
- If(Eval('debit', 0), ('credit', '=', 0), ()),
- ])
+ states=_states)
account = fields.Many2One('account.account', 'Account', required=True,
domain=[
('company', '=', Eval('company', -1)),