Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3997 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ต.ค. 24
1377
1
พ.ย. 19
9720
1
มี.ค. 15
6780
1
พ.ค. 24
1663
4
พ.ค. 16
7960