Purchase module : problems in group by in seach view

Bug #670921 reported by vir (Open ERP)
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 2

Bug Description

Following bugs are founded :

Purchases/Receive Products/Incoming Shipments : Group By Partner Have following error

2010-11-04 18:48:09,988][trunk] ERROR:db.cursor:Programming error: column "partner_id" does not exist
LINE 1: SELECT min(stock_picking.id) AS id,partner_id,sum(weight) as...
                                           ^
, in query SELECT min(stock_picking.id) AS id,partner_id,sum(weight) as weight,sum(weight_net) as weight_net FROM "stock_picking" WHERE (stock_picking.type = %s) AND (stock_picking.state = %s) GROUP BY partner_id
[2010-11-04 18:48:09,989][trunk] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/vir/erog/openobject-server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/vir/erog/openobject-server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/vir/erog/openobject-server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/vir/erog/openobject-server/bin/osv/orm.py", line 2245, in read_group
    cr.execute('SELECT min(%s.id) AS id,' % self._table + flist + ' FROM ' + from_clause + where_clause + gb + limit_str + offset_str, where_clause_params)
  File "/home/vir/erog/openobject-server/bin/sql_db.py", line 75, in wrapper
    return f(self, *args, **kwargs)
  File "/home/vir/erog/openobject-server/bin/sql_db.py", line 122, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column "partner_id" does not exist
LINE 1: SELECT min(stock_picking.id) AS id,partner_id,sum(weight) as...

Related branches

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Field if put on groupby,should be a field in DB.
Putting store=True should solve the issue.
Make a better check though.
Thanks.

Changed in openobject-addons:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Revision history for this message
Rohan Nayani(Open ERP) (ron-tinyerp) wrote :

Hello vir,

Thanks for reporting,
It has been fixed in lp:~openerp-dev/openobject-addons/ron-dev-addons2
Revision ID: <email address hidden>
Revision num: 5053.
It will be available in trunk soon,

Changed in openobject-addons:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.