Commit 421c13dd authored by Vincent Pelletier's avatar Vincent Pelletier

Word-wrap some too long lines.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15850 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 78767b08
......@@ -352,13 +352,16 @@ class SimulationTool(BaseTool):
def _generateSQLKeywordDict(self, table='stock', **kw):
sql_kw, new_kw = self._generateKeywordDict(table=table, **kw)
return self._generateSQLKeywordDictFromKeywordDict(table=table, sql_kw=sql_kw, new_kw=new_kw)
return self._generateSQLKeywordDictFromKeywordDict(table=table,
sql_kw=sql_kw, new_kw=new_kw)
def _generateSQLKeywordDictFromKeywordDict(self, table, sql_kw, new_kw):
# Some columns cannot be found automatically, prepend table name to avoid ambiguities.
# Some columns cannot be found automatically, prepend table name to
# avoid ambiguities.
group_by = new_kw.pop('group_by', [])
if len(group_by):
new_kw['group_by_expression'] = ', '.join(['%s.%s' % (table, x) for x in group_by])
new_kw['group_by_expression'] = ', '.join(['%s.%s' % (table, x) \
for x in group_by])
column_value_dict = new_kw.pop('column_value_dict', {})
for key, value in column_value_dict.iteritems():
new_kw['%s.%s' % (table, key)] = value
......
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