From acea1eb7d50e445795ed9525fb6d0d7cf89ffe8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 7 Jul 2020 23:56:10 +0200 Subject: [PATCH] Add model, record and records attribute on Wizard issue9421 review309861012 --- stock.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stock.py b/stock.py index 74e6049ae2..c89ec95a1b 100644 --- a/stock.py +++ b/stock.py @@ -253,9 +253,7 @@ class InventoryCount(metaclass=PoolMeta): def default_quantity(self, fields): pool = Pool() Product = pool.get('product.product') - Inventory = pool.get('stock.inventory') - context = Transaction().context - inventory = Inventory(context['active_id']) + inventory = self.record if isinstance(self.search.search, Product): product = self.search.search if product.lot_is_required(