From 6806c6e3d932b8cd66d232edf4ba0496045973d0 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 8 May 2024 10:57:31 +0200 Subject: [PATCH] [FIX] stock_account_product_run_fifo_hook: Adapt to upstream changes Product singleton after Odoo refactor https://github.com/odoo/odoo/commit/670012a04f9d849ca8f0a42796ae47ecf138eaf8 --- stock_account_product_run_fifo_hook/hooks.py | 2 -- stock_account_product_run_fifo_hook/model/product.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/stock_account_product_run_fifo_hook/hooks.py b/stock_account_product_run_fifo_hook/hooks.py index 86dbed90dcc..1a271c8ea73 100644 --- a/stock_account_product_run_fifo_hook/hooks.py +++ b/stock_account_product_run_fifo_hook/hooks.py @@ -16,8 +16,6 @@ def _run_fifo_new(self, quantity, company): if not hasattr(self, "_run_fifo_prepare_candidate_update"): return self._run_fifo_original(quantity, company) - self.ensure_one() - # Find back incoming stock valuation layers (called candidates here) # to value `quantity`. qty_to_take_on_candidates = quantity diff --git a/stock_account_product_run_fifo_hook/model/product.py b/stock_account_product_run_fifo_hook/model/product.py index c06b9866b50..b4c54bcd54a 100644 --- a/stock_account_product_run_fifo_hook/model/product.py +++ b/stock_account_product_run_fifo_hook/model/product.py @@ -13,7 +13,6 @@ def _run_fifo_prepare_candidate_update( value_taken_on_candidate, candidate_vals, ): - self.ensure_one() return candidate_vals def _run_fifo_vacuum_prepare_candidate_update( @@ -30,5 +29,4 @@ def _get_candidates_domain(self, company): return self._get_fifo_candidates_domain(company) def _price_updateable(self, new_standard_price=False): - self.ensure_one() return new_standard_price and self.cost_method == "fifo"