Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How can I update automatically the delivered quantity of milestones products in my sales order ?

Avatar
odoo
Avatar
Discard
1 Answer
0
Avatar
odoo
Best Answer

So this can be done with an automated action with executing a Python code:


try:
if record.stage_id and record.sale_line_id and record.sale_line_id.product_id:
if record.stage_id.name == "Done" and record.sale_line_id.qty_delivered == 0:
qty = record.sale_line_id.product_uom_qty
record.sale_line_id['qty_delivered'] = qty
except:
pass


Avatar
Discard