diff --git a/stock_inventory_revaluation/wizards/stock_inventory_revaluation_get_quants.py b/stock_inventory_revaluation/wizards/stock_inventory_revaluation_get_quants.py index f10803e99b4f..da777baacfe1 100644 --- a/stock_inventory_revaluation/wizards/stock_inventory_revaluation_get_quants.py +++ b/stock_inventory_revaluation/wizards/stock_inventory_revaluation_get_quants.py @@ -42,8 +42,9 @@ def _prepare_line_quant_data(self, revaluation, quant): 'new_cost': quant.cost } - @api.one + @api.multi def process(self): + self.ensure_one() if self.env.context.get('active_id', False): reval_obj = self.env['stock.inventory.revaluation'] reval_quant_obj = self.env['stock.inventory.revaluation.quant'] diff --git a/stock_inventory_revaluation/wizards/stock_inventory_revaluation_mass_post.py b/stock_inventory_revaluation/wizards/stock_inventory_revaluation_mass_post.py index 2dc7efb9ee4b..9828fc5167dd 100644 --- a/stock_inventory_revaluation/wizards/stock_inventory_revaluation_mass_post.py +++ b/stock_inventory_revaluation/wizards/stock_inventory_revaluation_mass_post.py @@ -23,8 +23,9 @@ def default_get(self, fields): 'Bad context propagation' return res - @api.one + @api.multi def process(self): + self.ensure_one() revaluation_ids = self.env.context.get('active_ids', []) revaluation_obj = self.env['stock.inventory.revaluation'] for revaluation in revaluation_obj.browse(revaluation_ids):