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
Marçal Isern
parent
e652a4a6ac
commit
cdacd28064
@@ -14,13 +14,13 @@ msgstr ""
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_payment_order
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:119
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:120
|
||||
#, python-format
|
||||
msgid "%d payment lines added to the existing draft payment order %s."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:114
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:115
|
||||
#, python-format
|
||||
msgid "%d payment lines added to the new draft payment order %s which has been automatically created."
|
||||
msgstr ""
|
||||
@@ -742,13 +742,13 @@ msgid "No Journal Entry on invoice %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:86
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:87
|
||||
#, python-format
|
||||
msgid "No Payment Line created for invoice %s because it already exists or because this invoice is already paid."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_order
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:92
|
||||
#: code:addons/account_payment_order/models/account_invoice.py:93
|
||||
#, python-format
|
||||
msgid "No Payment Mode on invoice %s"
|
||||
msgstr ""
|
||||
|
||||
@@ -79,7 +79,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