Skip to content

Commit

Permalink
Added ensure_one calls to prevent unwanted behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandregaldeano authored and petrus-v committed May 29, 2024
1 parent 53a591a commit 01bce11
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base_upflow/models/account_partial_reconcile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 01bce11

Please sign in to comment.