Skip to Content
Menu
This question has been flagged
1 Reply
4074 Views

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?

Avatar
Discard
Best Answer

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()
Avatar
Discard
Author

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

Related Posts Replies Views Activity
0
Sep 15
3494
0
Jul 15
2523
0
Mar 15
2439
3
Apr 23
1393
3
May 24
4797