[MERGE] readgroup signature has changed, so addons inheriting and modifying read_group need to be changed to make sure they call their parent's read_group with the correct signature
bzr revid: ged@openerp.com-20140410072039-mpkd4y8zf978ali3
This commit is contained in:
commit
522d612b8c
|
@ -94,7 +94,7 @@ class account_entries_report(osv.osv):
|
|||
return super(account_entries_report, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order,
|
||||
context=context, count=count)
|
||||
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False,lazy=True):
|
||||
if context is None:
|
||||
context = {}
|
||||
fiscalyear_obj = self.pool.get('account.fiscalyear')
|
||||
|
@ -108,7 +108,7 @@ class account_entries_report(osv.osv):
|
|||
domain.append(['period_id','in',ids])
|
||||
else:
|
||||
domain = domain
|
||||
return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby)
|
||||
return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby,lazy)
|
||||
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'account_entries_report')
|
||||
|
|
|
@ -1476,7 +1476,7 @@ class calendar_event(osv.Model):
|
|||
self.create_attendees(cr, uid, [res], context=context)
|
||||
return res
|
||||
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
|
@ -1484,7 +1484,7 @@ class calendar_event(osv.Model):
|
|||
raise osv.except_osv(_('Warning!'), _('Group by date is not supported, use the calendar view instead.'))
|
||||
virtual_id = context.get('virtual_id', True)
|
||||
context.update({'virtual_id': False})
|
||||
res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
|
||||
res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby, lazy=lazy)
|
||||
for result in res:
|
||||
#remove the count, since the value is not consistent with the result of the search when expand the group
|
||||
for groupname in groupby:
|
||||
|
|
|
@ -91,7 +91,7 @@ class IdeaIdea(osv.Model):
|
|||
# Technical stuff
|
||||
#------------------------------------------------------
|
||||
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
|
||||
""" Override read_group to always display all states. """
|
||||
if groupby and groupby[0] == "state":
|
||||
# Default result structure
|
||||
|
@ -103,7 +103,7 @@ class IdeaIdea(osv.Model):
|
|||
'state_count': 0,
|
||||
} for state_value, state_name in states]
|
||||
# Get standard results
|
||||
read_group_res = super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby)
|
||||
read_group_res = super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby, lazy)
|
||||
# Update standard results with default results
|
||||
result = []
|
||||
for state_value, state_name in states:
|
||||
|
@ -114,7 +114,7 @@ class IdeaIdea(osv.Model):
|
|||
result.append(res[0])
|
||||
return result
|
||||
else:
|
||||
return super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
|
||||
return super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby, lazy=lazy)
|
||||
|
||||
#------------------------------------------------------
|
||||
# Workflow / Actions
|
||||
|
|
|
@ -116,7 +116,7 @@ class note_note(osv.osv):
|
|||
}
|
||||
_order = 'sequence'
|
||||
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
|
||||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
|
||||
if groupby and groupby[0]=="stage_id":
|
||||
|
||||
#search all stages
|
||||
|
@ -169,7 +169,7 @@ class note_note(osv.osv):
|
|||
|
||||
else:
|
||||
return super(note_note, self).read_group(self, cr, uid, domain, fields, groupby,
|
||||
offset=offset, limit=limit, context=context, orderby=orderby)
|
||||
offset=offset, limit=limit, context=context, orderby=orderby,lazy=lazy)
|
||||
|
||||
|
||||
#upgrade config setting page to configure pad, fancy and tags mode
|
||||
|
|
Loading…
Reference in New Issue