Skip to Content
Menu
This question has been flagged
1 Reply
2612 Views

Hi

How can I sort attribute values shown on the website. For example, I am using an attribute width with values 347, 397, and 447 but they are shown in the order 397, 447, 347 (in order I created these products). I am using Odoo 14.


Avatar
Discard
Best Answer

You will need to create a custom Module. See the documentation for how to do that.

from odoo import models

class ProductAttributevalue(models.Model):
    _inherit = 'product.attribute.value'
    _order = 'name asc'

Avatar
Discard
Author

Thanks!

Related Posts Replies Views Activity
1
Oct 23
754
2
Apr 16
12727
3
Jul 24
373
3
Jun 24
794
1
Jun 24
631