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

Hello community, how can I make the purchase order automatically ordered by product category?

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

Hi,

The lines in the purchase order lines can be grouped based on the category either manually or by using the code.If manually you can use the  handle widget to group the lines. Once you fill the order lines, in the edit mode, you can see a plus button (a symbol similar to plus button), you can use that button to drag and reposition the lines to required position.


This widget is coming along with the field named sequence defined in the order line model. The line with the small sequence will be displayed in the top. Once you drag and reposition the line, the sequence number will get changed accordingly,


if you need to do the same from the code, assign the same sequence value for the same product category, Suppose if you have category1 and category2 products in the order lines, assign the similar value for the same product category lines, ie, value for the sequence field of the line of product category1 as 2 and other category as 3, then the product category1 products will get displayed first and then the others. This you can be done by overiding the write and create method of the corresponding model.


Thanks

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

Hi,

   You can Override the Create and Write Methods and write code for rearranging   the products according to their category        

Ảnh đại diện
Huỷ bỏ
Tác giả

Hello, thanks for the answer!

I do not understand you very well, can you explain to me how I do it?

Sorry I'm not good at odoo, I've been with him for a short time.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 25
2253
0
thg 1 25
1442
3
thg 12 24
6663
1
thg 11 24
1253
1
thg 7 24
3215