Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
5596 Visualizações

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
Cancelar
Melhor resposta

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

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

Publicações relacionadas Respostas Visualizações Atividade
0
set. 15
4329
0
jul. 15
3338
0
mar. 15
3238
2
abr. 25
1104
3
abr. 23
2574