Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
3702 Visninger

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
Kassér
Bedste svar

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
Kassér
Forfatter

Thanks!

Related Posts Besvarelser Visninger Aktivitet
1
okt. 23
2708
2
apr. 16
15459
3
jun. 25
1504
2
mar. 25
2006
3
jul. 24
2666