Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3767 Представления

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.


Аватар
Отменить
Лучший ответ

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'

Аватар
Отменить
Автор

Thanks!

Related Posts Ответы Просмотры Активность
1
окт. 23
2817
2
апр. 16
15592
3
июн. 25
1687
2
мар. 25
2172
3
июл. 24
2807