Community mailing list archives

Re: How can I add more items in _group_by_full dictionary?

Haojun Zou
- 03/05/2015 08:44:33
Hey Ludwik,
I tried your method but this data "sprint_id" doesn't added into dictionary _group_by_full :(

On Thu, Mar 5, 2015 at 2:42 PM, Zou Haojun <> wrote:
Hey Ludwik,

On Fri, Feb 27, 2015 at 11:07 AM, Ludwik Trammer <> wrote:
Maybe you could try doing this:

    def _auto_init(self, cr, context=None):
        self._group_by_full['sprint_id'] = _read_group_sprint_id
        super(project_task, self)._auto_init(cr, context)


On Thu, Feb 26, 2015 at 1:54 PM Zou Haojun <> wrote:

I need to add more items in _group_by_full dictionary when I inherit, without overwriting this dictionary.

Because I need to show a empty column in my kanban view.

Here is my code:

class project_task(models.Model):
    _inherit = "project.task"

    def _read_group_sprint_id(self, present_ids, domain, **kwargs):

        project_id = self._resolve_project_id_from_context()
        sprints = self.env['project.scrum.sprint'].search([]).name_get()
        return sprints, None

    _group_by_full = {
        'sprint_id': _read_group_sprint_id,

I have tested to add item in this dictionary as following code "_group_by_full['sprint_id'] = _read_group_sprint_id", But it's not initialized at this time. The result was the original data in this dictionary where overwritten.

Post to:

Post to: