=== modified file 'product/product.py' --- product/product.py 2009-06-03 11:18:33 +0000 +++ product/product.py 2009-06-15 12:00:07 +0000 @@ -571,6 +571,18 @@ 'width': fields.float('Width', help='The width of the package'), 'length': fields.float('Length', help='The length of the package'), } + _order = 'sequence' + + def name_get(self, cr, uid, ids, context={}): + if not len(ids): + return [] + res = [] + for pckg in self.browse(cr, uid, ids,context=context): + p_name = pckg.ean and '[' + pckg.ean + '] ' or '' + p_name += pckg.ul.name + res.append((pckg.id,p_name)) + return res + def _get_1st_ul(self, cr, uid, context={}): cr.execute('select id from product_ul order by id asc limit 1')