FIX missing state move to done when check lot required

#037313
From changeset-dd09f3653173
This commit is contained in:
Raimon Esteve 2019-03-21 10:06:30 +01:00
parent 3bbb69770f
commit 7ff751a983
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ diff -r 04443e7121ac trytond/trytond/modules/stock_lot/product.py
+
+ cursor = Transaction().cursor
+
+ sql_where = ((move.lot == Null) & (template.id == self.id))
+ sql_where = ((move.lot == Null) & (template.id == self.id) & (move.state == 'done'))
+ query = move.join(
+ product, condition=product.id == move.product).join(
+ template, condition=template.id == product.template).join(