跳至內容
選單
此問題已被標幟
1 回覆
5286 瀏覽次數

I have reordering rules on automatic for raw materials. But i don't need reordering rules for products for sale. Is it possible to make an automated action to remove reordering rules when the product category is updated to Product?

頭像
捨棄
最佳答案

You can do this by defining an automated action like so. Replace "Test" with the actual name of your product category ("Product" in your example above)


Python code:

for rule in env['stock.warehouse.orderpoint'].search([('product_id', 'in', record.product_variant_ids.ids)]):
rule.unlink()
頭像
捨棄
作者

Wow! You really saved me! Thank you so much Paresh!

相關帖文 回覆 瀏覽次數 活動
0
9月 15
4151
0
7月 15
3168
0
3月 15
3077
2
4月 25
797
3
4月 23
2385