From 01bce11ff15c024c7f7c7cd9258eee506b75b359 Mon Sep 17 00:00:00 2001 From: Alexandre Galdeano Date: Wed, 29 May 2024 16:53:34 +0200 Subject: [PATCH] Added ensure_one calls to prevent unwanted behavior --- base_upflow/models/account_partial_reconcile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base_upflow/models/account_partial_reconcile.py b/base_upflow/models/account_partial_reconcile.py index 826522965..63441dc09 100644 --- a/base_upflow/models/account_partial_reconcile.py +++ b/base_upflow/models/account_partial_reconcile.py @@ -9,6 +9,7 @@ class AccountPartialReconcile(models.Model): _inherit = ["account.partial.reconcile", "upflow.mixin"] def _prepare_reconcile_payload(self): + self.ensure_one() payload = { "externalId": "partial-" + str(self.id), "invoices": [], @@ -39,6 +40,7 @@ def get_upflow_api_post_reconcile_payload(self): Once there are considered fully paid """ + self.ensure_one() payload = self._prepare_reconcile_payload() payload[self.debit_move_id.move_id.upflow_type].append(