From eb9a0f2cc501ac736016a8de5527aa969c51a651 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 14 Dec 2018 12:42:14 +0100 Subject: [PATCH] [MIG] account_banking_sepa_direct_debit: Finish migration to 12.0 * Fixed tests * Adjust code for Python dates handling * Update copyrights --- account_payment_order/i18n/account_payment_order.pot | 8 ++++---- account_payment_order/models/account_move_line.py | 3 +++ account_payment_order/models/bank_payment_line.py | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/account_payment_order/i18n/account_payment_order.pot b/account_payment_order/i18n/account_payment_order.pot index d5ea2a09d..9ba8e2f7c 100644 --- a/account_payment_order/i18n/account_payment_order.pot +++ b/account_payment_order/i18n/account_payment_order.pot @@ -209,7 +209,7 @@ msgid "Bank account on which we should pay the supplier" msgstr "" #. module: account_payment_order -#: code:addons/account_payment_order/models/bank_payment_line.py:135 +#: code:addons/account_payment_order/models/bank_payment_line.py:136 #, python-format msgid "Can not reconcile: no move line for payment line %s of partner '%s'." msgstr "" @@ -227,7 +227,7 @@ msgid "Cancel Payments" msgstr "" #. module: account_payment_order -#: code:addons/account_payment_order/models/bank_payment_line.py:166 +#: code:addons/account_payment_order/models/bank_payment_line.py:167 #, python-format msgid "Cannot delete a payment order line whose payment order is in state '%s'. You need to cancel it first." msgstr "" @@ -469,7 +469,7 @@ msgid "Followers (Partners)" msgstr "" #. module: account_payment_order -#: code:addons/account_payment_order/models/bank_payment_line.py:149 +#: code:addons/account_payment_order/models/bank_payment_line.py:150 #, python-format msgid "For partner '%s', the account of the account move line to pay (%s) is different from the account of of the transit move line (%s)." msgstr "" @@ -725,7 +725,7 @@ msgid "Move Option" msgstr "" #. module: account_payment_order -#: code:addons/account_payment_order/models/bank_payment_line.py:141 +#: code:addons/account_payment_order/models/bank_payment_line.py:142 #, python-format msgid "Move line '%s' of partner '%s' has already been reconciled" msgstr "" diff --git a/account_payment_order/models/account_move_line.py b/account_payment_order/models/account_move_line.py index 8211c6a74..1afc8b470 100644 --- a/account_payment_order/models/account_move_line.py +++ b/account_payment_order/models/account_move_line.py @@ -43,6 +43,9 @@ class AccountMoveLine(models.Model): self.invoice_id.type in ('in_invoice', 'in_refund') and self.invoice_id.reference): communication = self.invoice_id.reference + elif 'out' in self.invoice_id.type: + # Force to only put invoice number here + communication = self.invoice_id.number if self.currency_id: currency_id = self.currency_id.id amount_currency = self.amount_residual_currency diff --git a/account_payment_order/models/bank_payment_line.py b/account_payment_order/models/bank_payment_line.py index 5061adf5d..573dcba15 100644 --- a/account_payment_order/models/bank_payment_line.py +++ b/account_payment_order/models/bank_payment_line.py @@ -1,4 +1,5 @@ -# © 2015-2016 Akretion - Alexis de Lattre +# Copyright 2015-2016 Akretion - Alexis de Lattre +# Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import models, fields, api, _ @@ -101,7 +102,7 @@ class BankPaymentLine(models.Model): """ self.ensure_one() if self.order_id.payment_mode_id.move_option == 'date': - hashcode = self.date + hashcode = fields.Date.to_string(self.date) else: hashcode = str(self.id) return hashcode