Commit b1f552d1 authored by Jérome Perrin's avatar Jérome Perrin

Explicitly specify the table name for node_uid, section_uid and

resource_uid to prevent ambiguities between stock and item tables.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5988 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d7f06dc1
...@@ -191,10 +191,10 @@ class SimulationTool (BaseTool): ...@@ -191,10 +191,10 @@ class SimulationTool (BaseTool):
simulation_state=None, transit_simulation_state = None, omit_transit=0, simulation_state=None, transit_simulation_state = None, omit_transit=0,
input_simulation_state = None, output_simulation_state=None, input_simulation_state = None, output_simulation_state=None,
variation_text=None, sub_variation_text=None, variation_text=None, sub_variation_text=None,
variation_category=None, variation_category=None, resource_uid=None, node_uid=None,
**kw) : section_uid=None, **kw) :
""" """
generates keywork and calls buildSqlQuery generates keywords and calls buildSqlQuery
""" """
new_kw = {} new_kw = {}
new_kw.update(kw) new_kw.update(kw)
...@@ -223,6 +223,14 @@ class SimulationTool (BaseTool): ...@@ -223,6 +223,14 @@ class SimulationTool (BaseTool):
if len(date_dict) : if len(date_dict) :
new_kw[table + '.date'] = date_dict new_kw[table + '.date'] = date_dict
# clear ambiguities
if resource_uid is not None :
new_kw[table + '.resource_uid'] = resource_uid
if section_uid is not None :
new_kw[table + '.section_uid'] = section_uid
if node_uid is not None :
new_kw[table + '.node_uid'] = node_uid
resource_uid_list = self._generatePropertyUidList(resource) resource_uid_list = self._generatePropertyUidList(resource)
if len(resource_uid_list) : if len(resource_uid_list) :
new_kw[table + '.resource_uid'] = resource_uid_list new_kw[table + '.resource_uid'] = resource_uid_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment