diff --git a/addons/stock_account/models/stock_move.py b/addons/stock_account/models/stock_move.py index da8b1d15c15..6ecd9f76e11 100644 --- a/addons/stock_account/models/stock_move.py +++ b/addons/stock_account/models/stock_move.py @@ -304,7 +304,7 @@ class StockMove(models.Model): # adapt standard price on incomming moves if the product cost_method is 'average' std_price_update = {} for move in self.filtered(lambda move: move._is_in() and move.with_company(move.company_id).product_id.cost_method == 'average'): - product_tot_qty_available = move.product_id.with_company(move.company_id).quantity_svl + tmpl_dict[move.product_id.id] + product_tot_qty_available = move.product_id.sudo().with_company(move.company_id).quantity_svl + tmpl_dict[move.product_id.id] rounding = move.product_id.uom_id.rounding valued_move_lines = move._get_in_move_lines()