Skip to Content
Menú
This question has been flagged
1 Respondre
5642 Vistes

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
Descartar
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
Descartar
Autor

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

Related Posts Respostes Vistes Activitat
0
de set. 15
4353
0
de jul. 15
3371
0
de març 15
3263
2
d’abr. 25
1142
3
d’abr. 23
2613