changeset 3b8ad34accb2 in modules/account_payment_clearing:5.0
details: 
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset;node=3b8ad34accb2
description:
        Update payment_group field to use the company function field

        It will read the value from statement and from origin (if statement is 
not
        set), so both could work and let the user choose a payment_group.

        issue7930
        (grafted from 1f7eaf2a454fda5f7b3ad6ca21806b2cb8d74560)
diffstat:

 statement.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 97dcf660d9fa -r 3b8ad34accb2 statement.py
--- a/statement.py      Mon Oct 01 13:20:18 2018 +0200
+++ b/statement.py      Sat Dec 22 06:34:33 2018 +0100
@@ -77,13 +77,13 @@
     payment_group = fields.Many2One(
         'account.payment.group', "Payment Group",
         domain=[
-            ('company', '=', Eval('_parent_statement', {}).get('company', -1)),
+            ('company', '=', Eval('company', -1)),
             ],
         states={
             'invisible': Bool(Eval('payment')) | Bool(Eval('invoice')),
             'readonly': Eval('statement_state') != 'draft',
             },
-        depends=['statement_state'])
+        depends=['company', 'statement_state'])
 
     @classmethod
     def __setup__(cls):

Reply via email to