Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5591 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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

Post correlati Risposte Visualizzazioni Attività
0
set 15
4315
0
lug 15
3338
0
mar 15
3235
2
apr 25
1099
3
apr 23
2571