Commits

Raimon Esteve (Zikzakmedia)  committed 60eef97

Migration to python-sql

  • Participants
  • Parent commits a8a96a7
  • Branches 2.9

Comments (0)

Files changed (1)

     "Product Attribute"
     __name__ = "product.attribute"
     sequence = fields.Integer('Sequence')
-    name = fields.Char('Name', required=True, translate=True, select=1,
-                       order_field="%(table)s.sequence %(order)s")
+    name = fields.Char('Name', required=True, translate=True, select=1)
     values = fields.One2Many('product.attribute.value', 'attribute', 'Values')
 
     @classmethod
         cls._order.insert(0, ('sequence', 'ASC'))
 
     @staticmethod
-    def default_sequence():
-        return 0
+    def order_sequence(tables):
+        table, _ = tables[None]
+        return [table.sequence == None, table.sequence]
 
 
 class AttributeValue(ModelSQL, ModelView):