Skip to content

Commit

Permalink
[FIX] stock_account_product_run_fifo_hook: Adapt to upstream changes
Browse files Browse the repository at this point in the history
Product singleton after Odoo refactor

odoo/odoo@670012a
  • Loading branch information
pedrobaeza authored and MiquelRForgeFlow committed Nov 15, 2024
1 parent 87aa029 commit 6806c6e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions stock_account_product_run_fifo_hook/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions stock_account_product_run_fifo_hook/model/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"

0 comments on commit 6806c6e

Please sign in to comment.