~openerp-commiter/openobject-server/trunk-import-binary-file

« back to all changes in this revision

Viewing changes to bin/osv/orm.py

  • Committer: nch at tinyerp
  • Date: 2010-06-15 13:04:52 UTC
  • Revision ID: nch@tinyerp.com-20100615130452-qlckqpnw0eqfh48o
[FIX]:print screen report for group_by_no_leaf and group_by method date formatting when group_by_no_leaf in context should pass date domain in full

Show diffs side-by-side

added added

removed removed

Lines of Context:
987
987
                    return (-1, res, 'Line ' + str(counter) +' : ' + msg, '' )
988
988
                #Raising Uncaught exception
989
989
                return (-1, res, 'Line ' + str(counter) +' : ' + str(e), '' )
990
 
            
 
990
 
991
991
            for lang in translate:
992
992
                context2 = context.copy()
993
993
                context2['lang'] = lang
2108
2108
                   days = calendar.monthrange(dt.year, dt.month)[1]
2109
2109
 
2110
2110
                   d[groupby] = datetime.datetime.strptime(d[groupby][:10],'%Y-%m-%d').strftime('%B %Y')
2111
 
                   if not context.get('group_by_no_leaf', False):
2112
 
                       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),\
 
2111
                   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),\
2113
2112
                                    (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
2114
2113
                elif fget[groupby]['type'] == 'many2one':
2115
2114
                    d[groupby] = d[groupby] and ((type(d[groupby])==type(1)) and d[groupby] or d[groupby][1])  or ''
2717
2716
            return getattr(proxy, name)(cr, uid, lst, *args, **kwargs)
2718
2717
 
2719
2718
        return _proxy
2720
 
        
 
2719
 
2721
2720
 
2722
2721
    def fields_get(self, cr, user, fields=None, context=None):
2723
2722
        """