Enforce the same party only for draft payments of sales
Closes #14236 (grafted from cd68638b1b9ed85a76efe3a74b54cf04eb984a8e) --HG-- branch : 7.0
This commit is contained in:
@@ -31,9 +31,12 @@ class Sale(metaclass=PoolMeta):
|
||||
('kind', '=', 'receivable'),
|
||||
('kind', '=', 'payable'),
|
||||
),
|
||||
('party', '=', If(Bool(Eval('invoice_party')),
|
||||
Eval('invoice_party'), Eval('party'))),
|
||||
('currency', '=', Eval('currency')),
|
||||
['OR',
|
||||
('party', '=', If(Bool(Eval('invoice_party')),
|
||||
Eval('invoice_party', -1), Eval('party', -1))),
|
||||
('state', '!=', 'draft'),
|
||||
],
|
||||
('currency', '=', Eval('currency', -1)),
|
||||
],
|
||||
states={
|
||||
'readonly': Eval('state') != 'quotation',
|
||||
|
||||
Reference in New Issue
Block a user