跳至内容
菜单
此问题已终结
1 回复
3695 查看

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!

相关帖文 回复 查看 活动
1
10月 23
2696
2
4月 16
15449
3
6月 25
1489
2
3月 25
1995
3
7月 24
2653