Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
384 มุมมอง

I would like to have a way to automatically update the Days to Prepare Manufacturing Order field for every component in the BOM tree any time a vendor lead time is updated.

We manufacture many products that have multi-level BOMs (2-7 level BOMs).  If the lead time for a component on one of the lowest levels of the BOM changes, it effects everything higher in the BOM hierarchy, but in order to update the Days to Prepare Manufacturing Order you must manually press the Calculate button on each BOM level to recalculate it.

I have attempted to create an automation rule to do this that was working in 17.2, but it has stopped working in 17.4.

Will you please help me update the code to do this.

Here is the code:

rec_boms =  env['mrp.bom'].search([('id', '!=', False)])

rec_boms.action_compute_bom_days()

อวตาร
ละทิ้ง