Ir al contenido
Menú
Se marcó esta pregunta
7 Respuestas
6441 Vistas

We use product variants. And our attribute is size, such as 7,8,9,10 etc. For example, initially we only selling size 7,8,9, later we found we will start to sell size 5 and 6. Then we will add size 5 and 6 to be the attribute values. That will result in our size setup in the sequence of 7,8,9,5,6. And when we are entering the sales order using the size grid, it will show up in the sequence the size were setup, like 7,8,9,5,6. But we want to see the size sorted from small to large.

Is it possible to sort the attribute values after they were set up?

Avatar
Descartar

Is this on Odoo online or Odoo.sh? You will need to add a custom module to do this. Odoo doesn't have a sequence field on attributes by default.

Autor

It is on Odoo.sh.

Hello Betty did u managed to solve this ?

Mejor respuesta

Bump, anyone found a solution to this?

Edit:

Did some digging.  I think my instance was a kind of fluke.  In studio I changed the widget from handle to integer so I could see the values. Two of them were set to zero and for some reason moving them around didn't force the list to renumber.  I then moved the value that had sequence number 1 and that forced the renumber of the whole list. After that I was  able to reorder the list and the sequence moved as expected.


Avatar
Descartar

If you don't have studio try rearranging different values and see if they take. Once you see the same sequence on the product variant tab as you see in the attribute view you should be on the right track.

Dive into the attribute card and add sequence field with studio to have even more manual control over the issue.

Mejor respuesta
Hello, any progress on this?


Avatar
Descartar
Mejor respuesta

Sorting For Odoo v18:

The sequence value from older versions is now hidden, so older posts are confusing since they feature a sequence value.

In newer versions to sort product variants do this:
1) Go Sales > Settings > Product Attributes.
2) Select the Attribute
3) Drag the 6 dots (row) up/down and save.
4) [Optional] If there's pagination (1/40 of 150 eg).
5) Click the 1/40 and add a 0 behind => 1/400 of 150
6) This will open up all the variants and let you drag/drop all 150 of them.

Note:
The row order is how the selection of the attribute will be sorted (sales, website etc).



Avatar
Descartar
Mejor respuesta

Finally found a solution for this, by importing with the required sequence, any value with a 0 in the sequence will be sorted on the website alphabetically, but if you give the sequence a value it will be sorted in the sequence you indicated, click here for an example import sheet



Avatar
Descartar
Mejor respuesta

won't change the variants in the product and on the website

Avatar
Descartar

On the website, you will be fix it by product sequencing.

Mejor respuesta

Go to edit mode on the product template, navigate to the product variant tab, and for the attribute you need to correct the values ordering for, simply remove them all and re-add them. As long as the same values are selected (even if in a different order than originally), the product variant records will be the same when you save.

Avatar
Descartar
Autor

This does not work, in the edit mode if I delete and re-add, in the edit mode is will be the right sequence. But once saved it will revert back to its original sequence.

won't work in 15

Mejor respuesta

Go to Invetory=>configuration=>Attributes

a list of attributes will appear.    

sort attributes dragging the handle at left

your problem is solved!!

please Upvote my answer if it helps.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
may 25
12
2
ene 25
2493
1
dic 24
6173
1
nov 24
2624
1
nov 24
1929