Action Server "python code" : code and commentary do not match !

Bug #516568 reported by Alexandre (http://www.smile.fr)
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

While defining a "python code" action server, the help text in the "python code" field is :
# You can use the following variables
# - object
# - object2
# - time
# - cr
# - uid
# - ids
# If you plan to return an action, assign: action = {...}

The processing code of this kind of action is :
if action.state=='code':
   localdict = {
      'self': self.pool.get(action.model_id.model),
      'context': context,
      'time': time,
      'ids': ids,
      'cr': cr,
      'uid': uid,
      'obj':obj
   }
exec action.code in localdict

I think the content of the text field default value and the processing code do not match ! This is far from being critical but correcting this could help saving time in debugging !

Related branches

affects: account-banking → openobject-server
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Corrections made by revision 1961 <email address hidden>.
Thanks.

Changed in openobject-server:
status: New → 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.