'Helper method for filling in empty groups for all possible values of
the field being grouped by'

@api.model
def _read_group_fill_results(self, domain, groupby, remaining_groupbys, aggregated_fields, count_field, read_group_result, read_group_order=None):

    field = self._fields[groupby]
    if (not field.group_expand):
        return read_group_result
    group_ids = [x[groupby][0] for x in read_group_result if x[groupby]]
    groups = self.env[field.comodel_name].browse(group_ids)
    order = groups._order
    if (read_group_order == (groupby + '    desc')):
        order = tools.reverse_order(order)
    groups = getattr(self, field.group_expand)(groups, domain, order)
    groups = groups.sudo()
    result_template = dict.fromkeys(aggregated_fields, False)
    result_template[(groupby + '_count')] = 0
    if remaining_groupbys:
        result_template['__context'] = {'group_by': remaining_groupbys}
    result = OrderedDict(((group.id, {}) for group in groups))
    for left_side in read_group_result:
        left_id = (left_side[groupby] or (False,))[0]
        if (not result.get(left_id)):
            result[left_id] = left_side
        else:
            result[left_id][count_field] = left_side[count_field]
    for right_side in groups.name_get():
        right_id = right_side[0]
        if (not result[right_id]):
            line = dict(result_template)
            line[groupby] = right_side
            line['__domain'] = ([(groupby, '=', right_id)] + domain)
            result[right_id] = line
    result = result.values()
    if (groups._fold_name in groups._fields):
        for r in result:
            group = groups.browse((r[groupby] and r[groupby][0]))
            r['__fold'] = group[groups._fold_name]
    return result
