Commit b6dfd3a0 authored by Alexandre Boeglin's avatar Alexandre Boeglin

getTrackingList now supports section, portal_type, variation_text

  and simulation_state filtering.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3357 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 72dac873
......@@ -664,12 +664,20 @@ class SimulationTool (BaseTool):
check what we can do with buildSqlQuery
"""
node_uid = self.portal_categories.getCategoryUid(kw.get('node'))
return self.Resource_zGetTrackingList(src__=src__,node_uid=node_uid,at_date=kw.get('at_date'))
#sql_kw = self._generateSQLKeywordDict(table='item', **kw)
new_kw = {}
new_kw['at_date'] = kw.get('at_date')
new_kw['node_uid'] = self.portal_categories.getCategoryUid(kw.get('node'))
section_uid_list = self._generatePropertyUidList(kw.get('section'))
if len(section_uid_list) :
new_kw['section_uid_list'] = section_uid_list
for property_name in ('portal_type', 'variation_text', 'simulation_state'):
property_list = self._generatePropertyUidList(kw.get(property_name), as_text=1)
if len(property_list) :
new_kw['%s_list' % property_name] = property_list
#return self.Resource_zGetTrackingList(src__=src__,
# selection_domain=selection_domain, selection_report=selection_report, **sql_kw)
return self.Resource_zGetTrackingList(src__=src__, **new_kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getCurrentTrackingList')
def getCurrentTrackingList(self, **kw):
......
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