From 9395ab71bf98fb863cbc2e18aa91de4dfe37591c Mon Sep 17 00:00:00 2001 From: Sim? Albert i Beltran Date: Fri, 26 Oct 2018 09:34:34 +0200 Subject: [PATCH] Fix production_input field check #035832 --- stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock.py b/stock.py index 95e3373..995fc30 100644 --- a/stock.py +++ b/stock.py @@ -69,7 +69,7 @@ class Move: while lots and remainder > 0.0: lot = lots.pop(0) production_quantity = 0.0 - if hasattr(move, 'production_input'): + if getattr(move, 'production_input', False): for production_input in move.production_input.inputs: if (production_input.product == move.product and production_input.state == 'draft'