dashboard:view_id provided in ir.actions.act_window.view is not taken into consideration.

Bug #776961 reported by Mihai Satmarean
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Low
OpenERP sa GTK client R&D

Bug Description

Steps to reproduce:
Open Purchase dashboard,
press search button at the "monthly purchase category" right side

Some errors will occur (one for every fiscal opened month I guess) , and after that the search purchase window will be presented
Environment Information :
System : Linux-2.6.38-020638rc6-generic-i686-with-LinuxMint-10-julia
OS Name : posix
Distributor ID: LinuxMint
Description: Linux Mint 10 Julia
Release: 10
Codename: julia
Operating System Release : 2.6.38-020638rc6-generic
Operating System Version : #201102220910 SMP Tue Feb 22 10:23:10 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : ro_RO.UTF8
Python Version : 2.6.6
OpenERP-Client Version : 6.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/openerp-server-6.0.1/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/lib/openerp-server-6.0.1/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/openerp-server-6.0.1/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/openerp-server-6.0.1/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/openerp-server-6.0.1/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/openerp-server-6.0.1/osv/orm.py", line 2146, in read_group
    assert not groupby or groupby in fields, "Fields in 'groupby' must appear in the list of fields to read (perhaps it's missing in the list view?)"
AssertionError: Fields in 'groupby' must appear in the list of fields to read (perhaps it's missing in the list view?)

Related branches

Revision history for this message
Mihai Satmarean (mihai-satmarean) wrote :
Amit Parik (amit-parik)
affects: openobject-server → openobject-addons
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Confirmed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Let me reassign this to GTK client project, as I think this is a client-side issue.

The error comes because the wrong "tree" view is used a when you open the action from the dashboard in GTK client.
If you do the same in web client, you won't get the error, because web client does not have this bug (BTW web client will open the graph view first, but you can also switch to list view manually).

Basically the GTK client should respect the view_ids that are specified in the action that is displayed in the dashboard. Currently it only respects the main view_id, but not the view_ids for other view_modes that are specified on the action. Therefore it requests "any tree view" when you click on the magnifying glass.. and sometimes this will be a bad view, depending on the random order in postgres.
This is the same behavior as for regular actions, such as actions invoked from menu items.

Note: this bug cannot be reproduced 100% of the time because it depends on the random natural order of views in the postgres database. To force it to occur you can manually change the sequence number of an incorrect view, for example set sequence 10 on the view named "qty.per.product.tree", and you will reproduce it for sure.

affects: openobject-addons → openobject-client
Changed in openobject-client:
assignee: OpenERP R&D Addons Team 2 (openerp-dev-addons2) → OpenERP sa GTK client R&D (openerp-dev-gtk)
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

@Mihai: based on the above investigations, it appears that a simple workaround for your case is to login as Administrator, go to Administration>Customization>User Interface>Views, search for the view named "purchase.order.monthly.categ.tree", and decrease the sequence number, for example change it from 16 to 10.
Save the changes and it should be fixed immediately.
This is only a workaround, the bug will of course be fixed in trunk soon.

Hope this helps...

summary: - error in the purchase dashoard after pressing the serarch button
+ dashboard:view_id provided in ir.actions.act_window.view is not taken
+ into consideration.
Changed in openobject-client:
status: Confirmed → Fix Committed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

Thanks for the bug report !

The fix has been applied on trunk client with revision-info as 1895 <email address hidden>

Thanks,

Changed in openobject-client:
status: Fix Committed → Fix Released
Revision history for this message
Alexis de Lattre (alexis-via) wrote :

It seems to me that the bug is still present (or has been re-introduced ?) in an up-to-date client/6.1.

I have an OpenERP 6.1 server with a client/6.1 with revno 2085, and it doesn't take into account the view_id that I provide in ir.actions.act_window.view. The Web client is not affected by this issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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