Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] mail: progress bar if from parameters #1251

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion addons/mail/models/mail_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,9 @@ def _read_progress_bar(self, domain, group_by, progress_bar):
where_clause=where_clause or '1=1',
group_by=', '.join(groupby_terms),
)
self.env.cr.execute(select_query, [tz] * 3 + where_params)
num_from_params = from_clause.count('%s')
where_params[num_from_params:num_from_params] = [tz] * 3 # timezone after from parameters
self.env.cr.execute(select_query, where_params)
fetched_data = self.env.cr.dictfetchall()
self._read_group_resolve_many2one_fields(fetched_data, annotated_groupbys)
data = [
Expand Down