Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
3819 Weergaven

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

Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Beste antwoord

Hi,

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

Avatar
Annuleer
Auteur

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.

Gerelateerde posts Antwoorden Weergaven Activiteit
2
mei 25
2219
0
jan. 25
1395
3
dec. 24
6369
1
nov. 24
1217
1
jul. 24
3122