[MIG] account_banking_sepa_direct_debit: Finish migration to 12.0

* Fixed tests
* Adjust code for Python dates handling
* Update copyrights
This commit is contained in:
Pedro M. Baeza
2018-12-14 12:42:14 +01:00
committed by Raf Ven
parent 8e0b55689d
commit 526698ffcb
2 changed files with 6 additions and 2 deletions

View File

@@ -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

View File

@@ -1,4 +1,5 @@
# © 2015-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# 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