From cb77ae9450cdb0f5f29d57b52c2d27820849f41e Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 7 May 2016 22:02:49 +0200 Subject: [PATCH] Copy payment mode and mandate from invoice to refund Run dos2unix on the few files that had DOS carriage return --- account_payment_order/models/account_payment_order.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/account_payment_order/models/account_payment_order.py b/account_payment_order/models/account_payment_order.py index 67bb0c790..fe214b8d2 100644 --- a/account_payment_order/models/account_payment_order.py +++ b/account_payment_order/models/account_payment_order.py @@ -119,10 +119,11 @@ class AccountPaymentOrder(models.Model): for order in self: allowed_journal_ids = False if order.payment_mode_id: - if order.payment_mode_id.bank_account_link == 'fixed': - allowed_journal_ids = order.payment_mode_id.fixed_journal_id + mode = order.payment_mode_id + if mode.bank_account_link == 'fixed': + allowed_journal_ids = mode.fixed_journal_id else: - allowed_journal_ids = order.payment_mode_id.variable_journal_ids + allowed_journal_ids = mode.variable_journal_ids order.allowed_journal_ids = allowed_journal_ids @api.model