تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
224 أدوات العرض

I would like to have a way to automatically update the Days to Prepare Manufacturing Order field for every component.

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 would like to have some kind of automation that will either run once per day to update everything, or can be triggered by some other condition.

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 that was previously working for me, but now doesn't seem to do anything:

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

rec_boms.action_compute_bom_days()

الصورة الرمزية
إهمال