base_report_creator does not properly manage search views for created actions

Bug #807961 reported by nima
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 1

Bug Description

hello,
i am using OERP 6.0.2 trunk.
i have built a new dashboard for project users,and i works just fine.i also have built a custom graph with custom reports in administrator menu.the problem is when i want to add a that graph into dashboard i get list out of range error.

Related branches

Revision history for this message
nima (0.5a) wrote :
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Nima,

I have followed this same steps but I did face another following traceback:

Traceback (most recent call last):
  File "/home/vra/workspace/trunk/server/openerp/osv/osv.py", line 118, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/vra/workspace/trunk/server/openerp/osv/osv.py", line 172, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/vra/workspace/trunk/server/openerp/osv/osv.py", line 163, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/vra/workspace/trunk/addons/hr/hr_department.py", line 94, in read
    res = super(ir_action_window, self).read(cr, uid, select, fields=fields, context=context, load=load)
  File "/home/vra/workspace/trunk/server/openerp/osv/orm.py", line 3411, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/vra/workspace/trunk/server/openerp/osv/orm.py", line 3534, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/home/vra/workspace/trunk/server/openerp/osv/fields.py", line 1034, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/home/vra/workspace/trunk/server/openerp/addons/base/ir/ir_actions.py", line 218, in _search_view
    'search', context)
  File "/home/vra/workspace/trunk/addons/base_report_creator/base_report_creator.py", line 79, in fields_view_get
    return super(report_result, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
  File "/home/vra/workspace/trunk/server/openerp/osv/orm.py", line 1985, in fields_view_get
    xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx)
  File "/home/vra/workspace/trunk/server/openerp/osv/orm.py", line 1647, in __view_look_dom_arch
    fields_def = self.__view_look_dom(cr, user, node, view_id, False, fields, context=context)
  File "/home/vra/workspace/trunk/server/openerp/osv/orm.py", line 1596, in __view_look_dom
    fields.update(self.__view_look_dom(cr, user, f, view_id, in_tree_view, model_fields, context))
  File "/home/vra/workspace/trunk/server/openerp/osv/orm.py", line 1549, in __view_look_dom
    field = model_fields[node.get('name')]
KeyError: 'name'

My created dashboard is not able to open.

@Framework: I confirmed this above issue for above tracaback.

@Nima: Would you please check this again and If you will face comment #1 related traceback then you can provide the related your end steps.So the RD team also checked on this.

Thanks.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Nima & vinay,

After a bit of investigation here is the conclusion... The traceback given by nima is not reproducible. Nima can you please provide a detail step to reproduce the problem you stated.

The reason for the traceback given by vinay is that the wizard "report_menu_create" in base_report_creator module creates an ir.actions.act_window action but it assigns the search_view Id of the " base_report_creator" which is wrong
and results in KeyError. either you leave it blank (as its a function field) it will be calculated automatically by searching for appropriate search view or create by default based on select attribute. or do it manually search and assign the right search view ID.

@ community Team: wait for nima's confirmation for the first part ...but for the second part the bug needs to be fixed from addons. Can you please assign it to appropriate team and project.

correct me if I am missing something !

Thanks,

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Both tracebacks seem caused by the same bug, as described by Naresh, difference is probably 6.0/trunk orm code.
This should be fixed in base_report_creator by improving it to support search views correctly.
Re-assigning...

affects: openobject-server → openobject-addons
Changed in openobject-addons:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
summary: - Custom reports does not work in dashboards
+ base_report_creator does not properly manage search views for created
+ actions
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote :

Hello ,

Its fixed in lp:~openerp-dev/openobject-addons/trunk-bug-807961-dbr
branch. It will be merge soon with trunk addons.

Revision ID : <email address hidden>
Revision No : 4891

Thank You.

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote :

Hello ,

Its fixed in lp:~openerp-dev/openobject-addons/trunk-bug-807961-dbr
branch. It will be merge soon with trunk addons.

Revision ID : <email address hidden>
Revision No : 4899

Thank You.

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :

base report creator is deprecated in 6.1 it has been removed from addons

Changed in openobject-addons:
status: Fix Committed → Fix Released
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.