Hi
I am trying to generate a manufacturing order using XMLRPC API.
This is the python code I used to generate a M.O.
##create a new M.O.
models.execute_kw(db, uid, password, 'mrp.production', 'create',
[{'product_id':1579,
'company_id':1,
'consumption': 'warning',
'consumption': 'flexible',
'date_planned_start': '2021-08-01 09:00:00',
'location_dest_id': 8,
'location_src_id': 8,
'picking_type_id': 13,
'product_qty':1,
'product_uom_id':1}])
Note at this point no components were added yet.
The M.O. is generated fine (as draft), and I can view and open it in Odoo manufacturing App (web interface.)
However after I have added a component, confirmed it and then Marked it as Done, a validation error pops up saying "The quantity to produce must be positive". I just want to clarify that I do have the positive quantity displayed in the UI.
If I tried to create the MO using the web interface (without using XMLRPC API), everything works fine.
Has anyone had the same issue?
Cheers
Yuan