Prevent to create number before filling party of mandate
Otherwise a number can be filled which is not linked to the future selected party. issue10049 review340431002
This commit is contained in:
1 parent
21fa8c5425
commit
350b02cbf7
1 file changed
+3
-1
+3
-1
@@ -421,7 +421,9 @@ class Mandate(Workflow, ModelSQL, ModelView):
|
||||
account_number = fields.Many2One('bank.account.number', 'Account Number',
|
||||
ondelete='RESTRICT',
|
||||
states={
|
||||
'readonly': Eval('state').in_(['validated', 'cancelled']),
|
||||
'readonly': (
|
||||
Eval('state').in_(['validated', 'cancelled'])
|
||||
| ~Eval('party')),
|
||||
'required': Eval('state') == 'validated',
|
||||
},
|
||||
domain=[
|
||||
|
||||
Reference in new issue
Block a user