[FIX]product:set a order by complete_name to sort a category by parent to child relation

lp bug: https://launchpad.net/bugs/898579 fixed

bzr revid: mma@tinyerp.com-20111205102913-qk34ym2q9xpy7swj
This commit is contained in:
Mayur Maheshwari (OpenERP)
2011-12-05 15:59:13 +05:30
parent 20c2ebf9cc
commit ac3af69aa4
+2 -2
View File
@@ -213,7 +213,7 @@ class product_category(osv.osv):
_description = "Product Category"
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
'complete_name': fields.function(_name_get_fnc, type="char", string='Name', store=True),
'parent_id': fields.many2one('product.category','Parent Category', select=True),
'child_id': fields.one2many('product.category', 'parent_id', string='Child Categories'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
@@ -225,7 +225,7 @@ class product_category(osv.osv):
'type' : lambda *a : 'normal',
}
_order = "sequence, name"
_order = 'complete_name'
def _check_recursion(self, cr, uid, ids, context=None):
level = 100
while len(ids):