From 1cd06491cf4f65d6dfaba0db97fbf849d4caa3e0 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 12 Jul 2021 07:40:13 +0000 Subject: [PATCH] [FIX] note: broken kanban view The view is broken because read_progress_bar() calls read_group() with two groupbys in eager mode. The method read_group() is overridden for model `note.note` and does not handle that case: the returned result is incorrect. We modify the override to call the default read_group() in that case, which eventually fails and makes read_progress_bar() fall back on its naive implementation. closes odoo/odoo#73839 X-original-commit: 6443e22feea914639f143a94a802b52a74a8ce19 Signed-off-by: Raphael Collet (rco) --- addons/note/models/note.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/note/models/note.py b/addons/note/models/note.py index c88b01a0ff1..4eec2eaec0a 100644 --- a/addons/note/models/note.py +++ b/addons/note/models/note.py @@ -83,7 +83,7 @@ class Note(models.Model): @api.model def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True): - if groupby and groupby[0] == "stage_id": + if groupby and groupby[0] == "stage_id" and (len(groupby) == 1 or lazy): stages = self.env['note.stage'].search([('user_id', '=', self.env.uid)]) if stages: # if the user has some stages result = [{ # notes by stage for stages user