Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-898579-mma into
lp:openobject-addons.
Requested reviews:
Rucha (Open ERP) (rpa-openerp)
Related bugs:
Bug #898579 in OpenERP Addons: "product category: impossible to specify order"
https://bugs.launchpad.net/openobject-addons/+bug/898579
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-898579-mma/+merge/84456
Hello,
Product : I Have a set a product category order by complete_name for sort
a category by parent to child relation
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-898579-mma/+merge/84456
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-898579-mma.
=== modified file 'product/product.py'
--- product/product.py 2011-11-28 12:19:40 +0000
+++ product/product.py 2011-12-05 10:44:35 +0000
@@ -213,7 +213,7 @@
_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 @@
'type' : lambda *a : 'normal',
}
- _order = "sequence, name"
+ _order = 'complete_name'
def _check_recursion(self, cr, uid, ids, context=None):
level = 100
while len(ids):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp