[IMP] product: order the attribute values by sequence then by id
======= purpose ======= By default, the sequence is 0 for all new attributes and the result is messed up. The product attribute values are not ordered in the same way in a list view. That's because the results are not returned from sql ordered by id if the sequence is the same. Just add this in the order definition will remove the non-deterministic behavior.
This commit is contained in:
committed by
Yannick Tivisse
parent
5b90152951
commit
b2eb54abe5
@@ -20,7 +20,7 @@ class ProductAttribute(models.Model):
|
||||
|
||||
class ProductAttributevalue(models.Model):
|
||||
_name = "product.attribute.value"
|
||||
_order = 'sequence'
|
||||
_order = 'sequence, id'
|
||||
|
||||
name = fields.Char('Value', required=True, translate=True)
|
||||
sequence = fields.Integer('Sequence', help="Determine the display order")
|
||||
|
||||
Reference in New Issue
Block a user