I've been trying to automate the picking of some products. I want to create a new lot number associated to a product (working for me), but then I also want to update its corresponding quantity, and here is where I'm having the problem.
If the lot/product has 0 quantity, it does not appear on the inventory adjustment view, so it does not exist on "stock.quant" model.
If it doesn't show up here, I can't update it with the following command:
update_qty = models.execute_kw(db, uid, password, 'stock.quant', 'write', [id], {'quantity': '150'}])
The 'write' action does not work if is not created, and the 'create' action does not work because it says you can't create on a view screen or something similar.
I have also tried to update it at the same time that I create the lot, but the field is read only.
So I must be missing something, there should be a way to update this stock from another place.
I would appreciate any help.
Thanks