bzr revid: jvo@tinyerp.com-20100519122448-m3dfftrmeitfepc8
This commit is contained in:
Jay (Open ERP) 2010-05-19 17:54:48 +05:30
parent dbf0c490da
commit 88ef4dc724
2 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,7 @@ class report_creator(osv.osv):
#
def export_data(self, cr, uid, ids, fields_to_export, context=None):
if not context:
if context is None:
context = {}
data_l = self.read(cr, uid, ids, ['sql_query'], context)
final_datas = []
@ -61,7 +61,7 @@ class report_creator(osv.osv):
@param Fields: List of field of customer reports form.
@return: Dictionary of Fields
"""
if not context:
if context is None:
context = {}
data = context and context.get('report_id', False) or False
@ -95,7 +95,7 @@ class report_creator(osv.osv):
@param user: the current users ID for security checks,
@return: Dictionary of Fields, arch and toolbar.
"""
if not context:
if context is None:
context = {}
data = context and context.get('report_id', False) or False
@ -193,7 +193,9 @@ class report_creator(osv.osv):
@param fields: List of fields.
@return: List of Dictionary of form [{name_of_the_field: value, ...}, ...]
"""
data = context and context.get('report_id', False) or False
if context is None:
context = {}
data = context.get('report_id', False)
if (not context) or 'report_id' not in context:
return super(report_creator, self).read(cr, user, ids, fields, context, load)
ctx = context or {}
@ -227,8 +229,9 @@ class report_creator(osv.osv):
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@return: List of id
"""
context_id = context and context.get('report_id', False) or False
if context is None:
context = {}
context_id = context.get('report_id', False)
if (not context) or 'report_id' not in context:
return super(report_creator, self).search(cr, user, args, offset, limit, order, context, count)

View File

@ -177,7 +177,6 @@ class document_directory_content(osv.osv):
fexprs[n.name] = n.expr
if 'uid' not in fields:
print "uid not in ", fields
# FIXME: should pass
return True
for child in parsedCal.getChildren():
@ -189,7 +188,6 @@ class document_directory_content(osv.osv):
if enl =='uid':
uuid = event.value
if not enl in fields:
# print "skip", enl
continue
if fields[enl] and funcs[enl] == 'field':
if ICS_TAGS[enl]=='normal':
@ -216,7 +214,6 @@ class document_directory_content(osv.osv):
# end for
if not uuid:
print "Skipping cal", child
# FIXME: should pass
continue