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

mail_activity_done: wrong counters #1327

Open
gurneyalex opened this issue Mar 8, 2024 · 1 comment
Open

mail_activity_done: wrong counters #1327

gurneyalex opened this issue Mar 8, 2024 · 1 comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@gurneyalex
Copy link
Member

When using the mail_activity_done module the counters are not correctly computed

The module overrides res.users::systray_get_activities which is used to gather the information displayed in the systray.

It calls super().systray_get_activities which will compute the counters for all the activities (including the ones in state 'done', which are archived when this module is installed, but removed in a normal implementation) and then tries to compute the number of done activities and to substract that quantity from the counters computed by super().

The problem is that the counters are aggregated by models : one counter for crm.lead, one for sale.orders, and the counter is not a counter of activities, but a counter of records of said model which have late activities, activities for today and activities in the future, so bluntly substracting is wrong.

To Reproduce

affected versions 16.0 for sure, but probably all others too.

Steps to reproduce the behavior:

  1. remove all activities assigned to user1 from the database (deletion, not flagging as done)
  2. Create a crm.lead with activities assigned to the same user, scheduled 10 days in the past
  3. flag one activity as done
  4. log in as the user, and check the activities systray

Expected behavior

The counter for late activities is 1

Actual behavior

The counter for late activities is 0

@gurneyalex gurneyalex added the bug label Mar 8, 2024
Copy link

github-actions bot commented Sep 8, 2024

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant