Skip to content

Commit

Permalink
[FIX] stock_account: SVL for consumable
Browse files Browse the repository at this point in the history
Stock Valuation Layers are used for the MRP Cost Analysis feature.
Therefore, they are useful for consumable.

opw-2412668

closes #63386

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information
nim-odoo committed Dec 15, 2020
1 parent 5dd7fc5 commit c68e572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stock_account/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def _action_done(self, cancel_backorder=False):
# Init a dict that will group the moves by valuation type, according to `move._is_valued_type`.
valued_moves = {valued_type: self.env['stock.move'] for valued_type in self._get_valued_types()}
for move in self:
if float_is_zero(move.quantity_done, precision_rounding=move.product_uom.rounding) or move.product_id.type == 'consu':
if float_is_zero(move.quantity_done, precision_rounding=move.product_uom.rounding):
continue
for valued_type in self._get_valued_types():
if getattr(move, '_is_%s' % valued_type)():
Expand Down

0 comments on commit c68e572

Please sign in to comment.