Apply invoice's account clause only when the account is set
The account domain on invoice field is applied when the party is set, but it should only be applied when the account is set. This gives an invalid domain when the party is set and the account is not set. issue5766 review32391002
This commit is contained in:
1 parent
1384cc8c0b
commit
6a408088e1
1 file changed
+1
-1
+1
-1
@@ -558,7 +558,7 @@ class Line(ModelSQL, ModelView):
|
||||
invoice = fields.Many2One('account.invoice', 'Invoice',
|
||||
domain=[
|
||||
If(Bool(Eval('party')), [('party', '=', Eval('party'))], []),
|
||||
If(Bool(Eval('party')), [('account', '=', Eval('account'))], []),
|
||||
If(Bool(Eval('account')), [('account', '=', Eval('account'))], []),
|
||||
If(Eval('_parent_statement', {}).get('state') == 'draft',
|
||||
('state', '=', 'posted'),
|
||||
('state', '!=', '')),
|
||||
|
||||
Reference in new issue
Block a user