Action fails when context is explicitly None

Bug #943393 reported by Numérigraphe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Committed
Undecided
OpenERP sa GTK client R&D

Bug Description

If the client receives an action defined with a 'context' key explicitly set to None, it will fail to process it and the client's stdout will show:
Traceback (most recent call last):
  File "XYZ/client/bin/widget/view/form_gtk/parser.py", line 123, in button_clicked
    model.get_button_action(self.form.screen, id, self.attrs)
  File "XYZ/client/bin/widget/model/record.py", line 365, in get_button_action
    obj._exec_action(result, datas)
  File "XYZ/client/bin/modules/action/main.py", line 99, in _exec_action
    context.update(tools.expr_eval(action.get('context','{}'), context.copy()))
TypeError: 'NoneType' object is not iterable

That can happen for example when a workflow activity returns an action and pass the context without making it is a dictionary - the framework will actually pass None instead.

Lionel Sausin.

Related branches

Changed in openobject-client:
status: New → Fix Committed
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

GtK Team will look into your MP.

Thanks!

Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
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.