diff --git a/addons/stock_account/models/stock.py b/addons/stock_account/models/stock.py index 7204e532c7e..a5178e9f9da 100644 --- a/addons/stock_account/models/stock.py +++ b/addons/stock_account/models/stock.py @@ -321,6 +321,7 @@ class StockMove(models.Model): def _run_valuation(self, quantity=None): self.ensure_one() + value_to_return = 0 if self._is_in(): valued_move_lines = self.move_line_ids.filtered(lambda ml: not ml.location_id._should_be_valued() and ml.location_dest_id._should_be_valued() and not ml.owner_id) valued_quantity = 0 @@ -378,7 +379,7 @@ class StockMove(models.Model): 'value': value_to_return, 'price_unit': price_unit if self._is_dropshipped() else -price_unit, }) - return value_to_return + return value_to_return def _action_done(self): self.product_price_update_before_done()