Skip to content

Commit daad024

Browse files
committed
Merge PR #1062 into 16.0
Signed-off-by jbaudoux
2 parents a2696cc + 370cb21 commit daad024

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

shopfloor/actions/inventory.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ def _create_draft_inventory(self, location, product, package=None, lot=None):
5959
for quant in quants:
6060
if quant.inventory_quantity_set:
6161
continue
62-
quants.write(
62+
quant.write(
6363
{
64-
# Set an inventory quantity to prevent the zero quant cleanup
65-
"inventory_quantity": quant.inventory_quantity + 1,
64+
# Set a user to prevent the zero quant cleanup
65+
"user_id": self.env.user.id,
66+
"inventory_quantity": 0,
6667
"inventory_date": fields.Date.today(),
6768
}
6869
)

0 commit comments

Comments
 (0)