Skip to content

Commit

Permalink
[FIX]stock_account: don't show consumable in valuation report
Browse files Browse the repository at this point in the history
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 #66054

X-original-commit: daee735
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
  • Loading branch information
yhu-odoo committed Feb 12, 2021
1 parent 3cf902d commit 01bc7db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stock_account/wizard/stock_quantity_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def open_at_date(self):
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

Expand Down

0 comments on commit 01bc7db

Please sign in to comment.