From e1964e9bb52d1e76904fe1d8a952e4d8dc07112d Mon Sep 17 00:00:00 2001 From: Bernat Brunet Torruella Date: Thu, 4 Aug 2016 16:58:58 +0200 Subject: [PATCH] Fix problme when try to seach for lot in stock_move form and the product or the location are not set yet --- stock.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stock.py b/stock.py index f73b3af..cb62c4b 100644 --- a/stock.py +++ b/stock.py @@ -29,3 +29,7 @@ class Move(): if 'from_location' not in cls.lot.depends: cls.lot.depends.append('from_location') cls.lot.loading = 'lazy' + + if 'product' not in cls.lot.depends: + cls.lot.depends.append('product') + cls.lot.states['readonly'] = ~Eval('product') | ~Eval('from_location')