跳至內容
選單
此問題已被標幟
1 回覆
3691 瀏覽次數

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
2692
2
4月 16
15436
3
6月 25
1483
2
3月 25
1990
3
7月 24
2648