跳至内容
菜单
此问题已终结
1 回复
5573 查看

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
4303
0
7月 15
3334
0
3月 15
3210
2
4月 25
1082
3
4月 23
2568