From f4049e128d466f46996e0dbb64764c294fae53f1 Mon Sep 17 00:00:00 2001 From: jbeficent Date: Mon, 12 Sep 2016 11:48:16 +0200 Subject: [PATCH] [FIX] fix wizard methods --- stock_inventory_revaluation/README.rst | 11 ++++++----- .../wizards/stock_inventory_revaluation_get_quants.py | 3 ++- .../wizards/stock_inventory_revaluation_mass_post.py | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/stock_inventory_revaluation/README.rst b/stock_inventory_revaluation/README.rst index cb0a5148d..b41fa5e45 100644 --- a/stock_inventory_revaluation/README.rst +++ b/stock_inventory_revaluation/README.rst @@ -11,9 +11,10 @@ inventory revaluation. You can re-valuate inventory values by: -* Changing the price for a specific product. The inventory price is changed - and inventory value is recalculated according to the new price. In case of - real price, you can select which quants you want to change the price on. +* Changing the inventory valuation of a specific product. The cost price + is changed, and the inventory value is recalculated according to the new + price. In case of real price, you can select on which quants you want to + change the unit cost. * Changing the value of the inventory. The quantity of inventory remains unchanged, resulting in a change in the price. @@ -40,8 +41,8 @@ Usage to create a new Inventory Revaluation. * In order to post the inventory revaluation for multiple items at once, - select the records in the tree view and go to 'More / Post Inventory - Revaluations'. + select the records in the tree view and go to + *More / Post Inventory Revaluations*. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas 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 f10803e99..da777baac 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 @@ class StockInventoryRevaluationGetQuants(models.TransientModel): '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 2dc7efb9e..9828fc516 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 @@ class StockInventoryRevaluationMassPost(models.TransientModel): '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):