Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can I add more items in _group_by_full dictionary?

By
Haojun Zou
on 2/17/15, 5:37 AM 740 views

I need to add more items in _group_by_full dictionary when I inherit, without overwritting 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"

@api.model
    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 reslut was the original data in this dictionary where overwritten.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/17/15, 5:37 AM
Seen: 740 times
Last updated: 3/16/15, 8:10 AM