Commit f25a9af
committed
[FIX] project_todo: use user timezone for act states
User timezone was not being used for activity states and thus the
future, today, and late activities would be inaccurate. They were being
computed with CURRENT_DATE through SQL which is based on the timezone
that the SQL server is in. This would lead to there being a period of
some hours based on the user timezone where the actual activities page
that you click into and the systray showing different counts of activity
states.
For example, on our Odoo production database, activities that SF office
members create on projects that were for tomorrow would show today after
5pm and when clicking on the today activities there would be nothing
until midnight.
Using the user timezone in order to compute what today is for them, then
using this in the SQL query fixes this issue. This is the same behavior
as the compute_state for the state field in mail.activity.
opw-4893182
closes odoo#219752
X-original-commit: 65bce5b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Ryan Cen (ryce) <ryce@odoo.com>1 parent fb11a9e commit f25a9af
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
0 commit comments