Fix production_input field check

#035832
This commit is contained in:
Sim? Albert i Beltran 2018-10-26 09:34:34 +02:00
parent 89b26379c1
commit 9395ab71bf

View file

@ -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'