c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #17591
[Bug 724954] [NEW] [6.0.1] active_id in context attribute of act_window tag gets stored incorrectly [with fix]
Public bug reported:
For example, I have an act_window tag as follows:
<act_window
id="action_partner_job_task_new"
name="New Task"
res_model="job.task"
src_model="res.partner"
view_type="form"
view_mode="form"
context="{'partner_id' : active_id}" />
Once this action is imported into the database, the value of 'context'
in the ir_act_window table is:
{'partner_id' : 'active_id'}
The server has incorrectly converted the active_id variable into a
string: 'active_id'. This causes errors in the web client when the
action is linked from a button.
The following patch resolves this issue:
=== modified file bin/tools/convert.py
--- bin/tools/convert.py 2010-12-29 10:50:04 +0000
+++ bin/tools/convert.py 2011-02-25 12:24:41 +0000
@@ -459,7 +459,7 @@
'limit': limit,
'auto_refresh': auto_refresh,
'uid' : uid,
- 'active_id': active_id,
+ #'active_id': active_id, # XXX Causes 'active_id' to be stored instead of active_id
'ref' : ref,
}
context = self.get_context(data_node, rec, eval_context)
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/724954
Title:
[6.0.1] active_id in context attribute of act_window tag gets stored
incorrectly [with fix]
Status in OpenERP Server:
New
Bug description:
For example, I have an act_window tag as follows:
<act_window
id="action_partner_job_task_new"
name="New Task"
res_model="job.task"
src_model="res.partner"
view_type="form"
view_mode="form"
context="{'partner_id' : active_id}" />
Once this action is imported into the database, the value of 'context'
in the ir_act_window table is:
{'partner_id' : 'active_id'}
The server has incorrectly converted the active_id variable into a
string: 'active_id'. This causes errors in the web client when the
action is linked from a button.
The following patch resolves this issue:
=== modified file bin/tools/convert.py
--- bin/tools/convert.py 2010-12-29 10:50:04 +0000
+++ bin/tools/convert.py 2011-02-25 12:24:41 +0000
@@ -459,7 +459,7 @@
'limit': limit,
'auto_refresh': auto_refresh,
'uid' : uid,
- 'active_id': active_id,
+ #'active_id': active_id, # XXX Causes 'active_id' to be stored instead of active_id
'ref' : ref,
}
context = self.get_context(data_node, rec, eval_context)
Follow ups
References