Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5647 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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()
Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 15
4356
0
thg 7 15
3373
0
thg 3 15
3265
2
thg 4 25
1146
3
thg 4 23
2623