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 odoo#62622 which disabled svl for consumable products,
then rolled back in odoo#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 odoo#65726

closes odoo#66062

X-original-commit: daee735
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
  • Loading branch information
yhu-odoo committed Feb 16, 2021
1 parent 80c2e87 commit 415a65f
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 415a65f

Please sign in to comment.