-
-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] product_cost_price_avco_sync: Remove FIFO stuff
For performance reasons, remove all the remaining values stuff, which is only valid for FIFO.
- Loading branch information
1 parent
0c6a23f
commit 6a1a8bd
Showing
3 changed files
with
27 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from . import product_product | ||
from . import stock_move_line | ||
from . import stock_picking | ||
from . import stock_valuation_layer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2024 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) | ||
|
||
from odoo import models | ||
from odoo.tools import config | ||
|
||
|
||
class ProductProduct(models.Model): | ||
_inherit = "product.product" | ||
|
||
def _run_fifo_vacuum(self, company=None): | ||
"""Overwrite method to do nothing when remaining quantity is negative.""" | ||
if self.env.context.get("force_run_fifo_vacuum") or config["test_enable"]: | ||
return super()._run_fifo_vacuum(company=company) | ||
return | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters