Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
3836 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

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

Awatar
Odrzuć
Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
2
maj 25
2232
0
sty 25
1409
3
gru 24
6504
1
lis 24
1229
1
lip 24
3165