diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-11-30 18:43:08 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-11-30 18:43:08 +0100 |
| commit | 42264d8dcb7f8d0795c84718d1fc9a5fd1aefd32 (patch) | |
| tree | 216ded7eac5ba06623892aaaece74c586afd4b5e /addons/account_payment/models | |
| parent | e4a281b5a5f7ea44e4f25259b1a84cb0dc437ebc (diff) | |
| parent | 5d7ad2b16cc3ef579a6657822b7c57b07fef4f52 (diff) | |
[MERGE] forward port branch saas-16 up to 5d7ad2b16cc
Diffstat (limited to 'addons/account_payment/models')
| -rw-r--r-- | addons/account_payment/models/payment.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/addons/account_payment/models/payment.py b/addons/account_payment/models/payment.py index b0dfeb691bb..0ad11d39788 100644 --- a/addons/account_payment/models/payment.py +++ b/addons/account_payment/models/payment.py @@ -71,7 +71,19 @@ class PaymentTransaction(models.Model): _logger.warning('<%s> transaction STATE INCORRECT for invoice %s (ID %s, state %s)', self.acquirer_id.provider, self.account_invoice_id.number, self.account_invoice_id.id, self.account_invoice_id.state) return 'pay_invoice_invalid_doc_state' if not float_compare(self.amount, self.account_invoice_id.amount_total, 2) == 0: - _logger.warning('<%s> transaction AMOUNT MISMATCH for invoice %s (ID %s)', self.acquirer_id.provider, self.account_invoice_id.number, self.account_invoice_id.id) + _logger.warning( + '<%s> transaction AMOUNT MISMATCH for invoice %s (ID %s): expected %r, got %r', + self.acquirer_id.provider, self.account_invoice_id.number, self.account_invoice_id.id, + self.account_invoice_id.amount_total, self.amount, + ) + self.account_invoice_id.message_post( + subject=_("Amount Mismatch (%s)") % self.acquirer_id.provider, + body=_("The invoice was not confirmed despite response from the acquirer (%s): invoice amount is %r but acquirer replied with %r.") % ( + self.acquirer_id.provider, + self.account_invoice_id.amount_total, + self.amount, + ) + ) return 'pay_invoice_tx_amount' if self.state == 'authorized' and self.acquirer_id.capture_manually: |
