mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[REF] Payment Order: allow add to order from invoice if order exists
This commit is contained in:
committed by
Pedro M. Baeza
parent
e0fc35d30b
commit
3dbe3686cd
@@ -71,7 +71,8 @@ class AccountInvoice(models.Model):
|
||||
lambda x: (
|
||||
not x.reconciled and x.payment_mode_id.payment_order_ok and
|
||||
x.account_id.internal_type in ('receivable', 'payable') and
|
||||
not x.payment_line_ids
|
||||
not any(p_state in ('draft', 'open', 'generated')
|
||||
for p_state in x.payment_line_ids.mapped('state'))
|
||||
)
|
||||
)
|
||||
if not applicable_lines:
|
||||
|
||||
Reference in New Issue
Block a user