changeset bb90a629bf22 in modules/account_payment_clearing:4.8
details: 
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset;node=bb90a629bf22
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 c2357dd7fbb2 -r bb90a629bf22 statement.py
--- a/statement.py      Mon May 21 20:03:36 2018 +0200
+++ b/statement.py      Sat Dec 22 06:34:33 2018 +0100
@@ -79,13 +79,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