[FIX] Considering in-payment state and more info in alerts

This commit is contained in:
Lopsanz
2020-03-24 12:19:28 +01:00
committed by Alexey Pelykh
parent ae3ef43f65
commit e9edfa6ddf
2 changed files with 8 additions and 5 deletions

View File

@@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-06 10:58+0000\n"
"PO-Revision-Date: 2020-03-06 10:58+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -19,15 +21,15 @@ msgid "Check Chronology"
msgstr ""
#. module: account_invoice_constraint_chronology
#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:53
#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:54
#, python-format
msgid "Chronology Error. Please confirm older draft invoices before {date_invoice} and try again."
msgid "Chronology Error. Please confirm older draft invoices before {date_invoice} and try again. First occurrence is {invoice_number}."
msgstr ""
#. module: account_invoice_constraint_chronology
#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:69
#: code:addons/account_invoice_constraint_chronology/model/account_invoice.py:72
#, python-format
msgid "Chronology Error. There exist at least one invoice with a later date to {date_invoice}."
msgid "Chronology Error. There exist at least one invoice with a later date to {date_invoice}.First occurrence is {invoice_number}."
msgstr ""
#. module: account_invoice_constraint_chronology

View File

@@ -17,6 +17,7 @@ class AccountInvoice(models.Model):
('state', 'not in', ['open',
'paid',
'cancel',
'in_payment',
'proforma',
'proforma2']),
('date_invoice', '!=', False),
@@ -27,7 +28,7 @@ class AccountInvoice(models.Model):
@api.model
def _prepare_later_invoices_domain(self, invoice):
return [
('state', 'in', ['open', 'paid']),
('state', 'in', ['open', 'in_payment', 'paid']),
('date_invoice', '>', invoice.date_invoice),
('journal_id', '=', invoice.journal_id.id),
]