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
This commit is contained in:
+2
-2
@@ -77,13 +77,13 @@ class StatementLine(metaclass=PoolMeta):
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user