Unknown action types should be ignored instead of crashing the dashboard

Bug #805408 reported by Xavier (Open ERP)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Medium
OpenERP sa GTK client R&D

Bug Description

If a new action type is created and used in a dashboard, instead of simply ignoring the new (and unknown to the GTK client) action type and either not displaying anything in its place or putting some kind of empty placeholder (similar to unknown view types), the GTK client simply refuses to display the dashboard at all and prints the following traceback to stdout:

Traceback (most recent call last):
  File "bin/modules/gui/window/tree.py", line 209, in sig_open
    if not self.sig_action(widget, 'tree_but_open', warning=False):
  File "bin/modules/gui/window/tree.py", line 203, in sig_action
    warning=warning)
  File "bin/modules/action/main.py", line 199, in exec_keyword
    self._exec_action(action, data, context=context)
  File "bin/modules/action/main.py", line 143, in _exec_action
    limit=datas['limit'], auto_refresh=datas['auto_refresh'], auto_search = datas['auto_search'], search_view = datas['search_view'])
  File "bin/modules/gui/window/__init__.py", line 48, in create
    auto_refresh=auto_refresh, auto_search=auto_search, search_view=search_view)
  File "bin/modules/gui/window/form.py", line 75, in __init__
    show_search=True, window=self.window, limit=limit, readonly=bool(auto_refresh), auto_search=auto_search, search_view=search_view)
  File "bin/widget/screen/screen.py", line 128, in __init__
    view = self.add_view_id(view_id, view_type[0], help=help)
  File "bin/widget/screen/screen.py", line 588, in add_view_id
    toolbar=view.get('toolbar', False), submenu=view.get('submenu', False), context=context)
  File "bin/widget/screen/screen.py", line 630, in add_view
    view = parser.parse(self, root_node, self.fields, toolbar=toolbar, submenu=submenu, help=help)
  File "bin/widget/view/widget_parse.py", line 57, in parse
    wid, child, buttons, on_write = widget.parse(screen.resource, node, fields)
  File "bin/widget/view/form_gtk/parser.py", line 537, in parse
    _, widgets, saws, on_write = self.parse(model, node, fields, paned=hp)
  File "bin/widget/view/form_gtk/parser.py", line 556, in parse
    widget, widgets, saws, on_write = self.parse(model, node, fields, paned=paned)
  File "bin/widget/view/form_gtk/parser.py", line 565, in parse
    container.wid_add(widget_act.widget, colspan=int(attrs.get('colspan', 3)), expand=True, fill=True)
AttributeError: 'action' object has no attribute 'widget'

This behavior can be tested using the "client actions" server and addons branches:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-client-actions-xmo
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-client-actions-xmo

It creates a "client" action type and adds one such action to the Administration dashboard. Trying to open the administration dashboard in the GTK client results in no visible UI action and the traceback above.

Related branches

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Xavier,

I have checked your issue but I am not getting where you faced the problem.

Would you please elaborate more with screen shot or video so we can reproduce same at our end.

Thanks and waiting for your reply.

Changed in openobject-client:
status: New → Incomplete
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Screencast demonstrating the GTK client failing do display a dashboard if any of the actions in the dashboard is of a type it does not know (+ error in the logs)

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :
Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello,

@Xavier: Thanks for your video

I have faced the same problem .

Thanks.

Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Xavier,

Thanks for reporting !

It has been fixed in trunk client at 1951 <email address hidden>

Regards,

Changed in openobject-client:
status: Confirmed → In Progress
status: In Progress → 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.