summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryhu-odoo <yhu@odoo.com>2021-02-08 13:50:08 +0000
committeryhu-odoo <yhu@odoo.com>2021-02-12 08:34:13 +0000
commitdaee73503147138f9e3d90a143823a1b3df6aaba (patch)
treedaa9fec2176847445700dfe88d1af3ef2749af80
parentad5d642c455d3215857f25e0d69c593324178d29 (diff)
[FIX]stock_account: don't show consumable in valuation report
In "Inventory Valuation", when click "Inventory at Date" then "confirm". Record for consumable products will be shown in the report. Previously fix in #62622 which disabled svl for consumable products, then rolled back in #63386 due to mrp need to create svl for consumables to analyse cost. In this commit, we add a domian filter to not show consumables in "Inventory Valuation" Task 2449211 PR #65726 closes odoo/odoo#65786 X-original-commit: 57695f827be2534521bcce36aba5de5a59114539 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
-rw-r--r--addons/stock_account/wizard/stock_quantity_history.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock_account/wizard/stock_quantity_history.py b/addons/stock_account/wizard/stock_quantity_history.py
index 8897a329628..aaddf96734c 100644
--- a/addons/stock_account/wizard/stock_quantity_history.py
+++ b/addons/stock_account/wizard/stock_quantity_history.py
@@ -10,7 +10,7 @@ class StockQuantityHistory(models.TransientModel):
active_model = self.env.context.get('active_model')
if active_model == 'stock.valuation.layer':
action = self.env["ir.actions.actions"]._for_xml_id("stock_account.stock_valuation_layer_action")
- action['domain'] = [('create_date', '<=', self.inventory_datetime)]
+ action['domain'] = [('create_date', '<=', self.inventory_datetime), ('product_id.type', '=', 'product')]
action['display_name'] = str(self.inventory_datetime)
return action