From e186b9c016b4b5fd40ed3fa960f19b83cc9203d1 Mon Sep 17 00:00:00 2001 From: mreficent Date: Wed, 19 Jul 2017 16:02:47 +0200 Subject: [PATCH] [FIX] stock_inventory_revaluation (deprecated method) --- .../models/stock_inventory_revaluation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stock_inventory_revaluation/models/stock_inventory_revaluation.py b/stock_inventory_revaluation/models/stock_inventory_revaluation.py index 83836f4f3..e9b59843c 100644 --- a/stock_inventory_revaluation/models/stock_inventory_revaluation.py +++ b/stock_inventory_revaluation/models/stock_inventory_revaluation.py @@ -386,7 +386,8 @@ class StockInventoryRevaluation(models.Model): def create(self, values): sequence_obj = self.env['ir.sequence'] if values.get('name', '/') == '/': - values['name'] = sequence_obj.get('stock.inventory.revaluation') + values['name'] = sequence_obj.next_by_code( + 'stock.inventory.revaluation') return super(StockInventoryRevaluation, self).create(values) @api.multi