From 25d179859a7375812d6d1253e6083152cd1bcd68 Mon Sep 17 00:00:00 2001 From: sebalix Date: Mon, 3 Aug 2020 17:48:01 +0200 Subject: [PATCH] [IMP] account_banking_pain_base: switch from @api.model to @api.multi The calls are the following: `generate_payment_file()` -> `generate_party_block(...)` -> `generate_party_agent(...)` The first was decorated with `api.multi` (with ensure_one) and the others with `api.model`. This change allows to get the reference of the current payment order in `generate_party_block(...)` and `generate_party_agent(...)` methods (for instance to modulate the generation of the file depending on the related payment method configuration). --- account_banking_pain_base/models/account_payment_order.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/account_banking_pain_base/models/account_payment_order.py b/account_banking_pain_base/models/account_payment_order.py index 3c70e221d..4e01e00f4 100644 --- a/account_banking_pain_base/models/account_payment_order.py +++ b/account_banking_pain_base/models/account_payment_order.py @@ -340,7 +340,6 @@ class AccountPaymentOrder(models.Model): % self.company_id.name) return True - @api.model def generate_party_agent( self, parent_node, party_type, order, partner_bank, gen_args, bank_line=None): @@ -437,7 +436,6 @@ class AccountPaymentOrder(models.Model): return True - @api.model def generate_party_block( self, parent_node, party_type, order, partner_bank, gen_args, bank_line=None):