跳至內容
選單
此問題已被標幟
2 回覆
3846 瀏覽次數

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

頭像
捨棄
最佳答案

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

頭像
捨棄
最佳答案

Hi,

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

頭像
捨棄
作者

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.

相關帖文 回覆 瀏覽次數 活動
2
5月 25
2236
0
1月 25
1418
3
12月 24
6530
1
11月 24
1238
1
7月 24
3178