Skip to content

Commit

Permalink
[FIX] note: broken kanban view
Browse files Browse the repository at this point in the history
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#73597

Signed-off-by: Raphael Collet (rco) <[email protected]>
rco-odoo authored and yelizariev committed Jul 13, 2021
1 parent 768e606 commit e9de80b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/note/models/note.py
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ def name_create(self, name):

@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

0 comments on commit e9de80b

Please sign in to comment.