mirror of
https://gitlab.com/flectra-community/l10n-switzerland-flectra.git
synced 2024-11-16 19:12:04 +00:00
19 lines
754 B
Python
19 lines
754 B
Python
# copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
from flectra import models, api
|
|
|
|
|
|
class AccountMoveLine(models.Model):
|
|
_inherit = 'account.move.line'
|
|
|
|
def _prepare_payment_line_vals(self, payment_order):
|
|
vals = super(AccountMoveLine, self)._prepare_payment_line_vals(
|
|
payment_order)
|
|
if self.move_id and self.move_id.partner_bank_id and self.move_id.partner_bank_id._is_qr_iban():
|
|
if self.move_id.reference_type == 'isr':
|
|
vals['local_instrument'] = 'CH01'
|
|
if vals['communication']:
|
|
vals['communication'] = vals['communication'].replace(' ', '')
|
|
return vals
|