[IMP] removed this month

bzr revid: fp@tinyerp.com-20100302214739-uwq4kgmh01a7xoxi
This commit is contained in:
Fabien Pinckaers
2010-03-02 22:47:39 +01:00
parent 044b13980c
commit 9ded20ae70
2 changed files with 2 additions and 6 deletions
+1 -5
View File
@@ -1893,11 +1893,7 @@ class orm(orm_template):
dt = datetime.datetime.strptime(alldata[d['id']][groupby][:7],'%Y-%m')
days = calendar.monthrange(dt.year, dt.month)[1]
if d[groupby][:7] == today.strftime('%Y-%m'):
d[groupby] = 'This Month'
else:
d[groupby] = datetime.datetime.strptime(d[groupby][:10],'%Y-%m-%d').strftime('%B %Y')
d[groupby] = datetime.datetime.strptime(d[groupby][:10],'%Y-%m-%d').strftime('%B %Y')
d['__domain'] = [(groupby,'>=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-01','%Y-%m-%d').strftime('%Y-%m-%d') or False),\
(groupby,'<=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-' + str(days),'%Y-%m-%d').strftime('%Y-%m-%d') or False)] + domain
elif fget[groupby]['type'] == 'many2one':
+1 -1
View File
@@ -135,7 +135,7 @@ class _rml_styles(object,):
sys.stderr.write('Warning: style not found, %s - setting default!\n' % (node.get('style'),) )
if not style:
styles = reportlab.lib.styles.getSampleStyleSheet()
style = copy.deepcopy(styles['Normal'])
style = styles['Normal']
style.__dict__.update(self._para_style_update(node))
return style