Comment 1 for bug 479290

Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 479290] [NEW] product_product order by name error

A Dilluns, 9 de novembre de 2009, Ferdinand @ ChriCar va escriure:
> Public bug reported:
>
> trying to sort the product list by name (which is inherited from
> product_templates ) creates a servside sort
> "order by name ASC" which can't work.....
>
> Traceback (most recent call last):
> File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 61, in
> wrapper return f(self, dbname, *args, **kwargs)
> File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 120, in
> execute res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
> File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 112, in
> execute_cr return getattr(object, method)(cr, uid, *args, **kw)
> File "/home/terp/OpenERP/branch/server/5.0/bin/osv/orm.py", line 2928, in
> search cr.execute('select %s.id from ' % self._table + ','.join(tables)
> +qu1+' order by '+order_by+limit_str+offset_str, qu2) File
> "/home/terp/OpenERP/branch/server/5.0/bin/sql_db.py", line 76, in wrapper
> return f(self, *args, **kwargs)
> File "/home/terp/OpenERP/branch/server/5.0/bin/sql_db.py", line 120, in
> execute res = self._obj.execute(query, params)
> ProgrammingError: column "name" does not exist
> LINE 1: ..." where (product_product.active = E'True') order by name ASC

But it doesn't crash Koo does it? Koo already handles those cases and it knows
that in some circumstances it won't be able to sort.

>
> ** Affects: openobject-client-kde
> Importance: Undecided
> Status: New
>

--
Albert Cervera i Areny
http://www.NaN-tic.com
Mòbil: +34 669 40 40 18