Skip to content

Commit

Permalink
TA#48502 [IMP] Add pre-commit-config, flake8 and workflow to repo (#132)
Browse files Browse the repository at this point in the history
* TA#48502 [IMP] Add pre-commit-config, flake8 and workflow to repo
  • Loading branch information
majouda committed Mar 6, 2024
1 parent 12d5c74 commit 073a012
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mail_activity_not_deleted/models/mail_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _compute_state(self):
def unlink(self):
self._send_signal_done()
self.write(
{"active": False, "date_done": datetime.now(),}
{"active": False, "date_done": datetime.now()}
)
for activity in self:
activity._update_record_date_deadline()
Expand Down
2 changes: 1 addition & 1 deletion mail_activity_not_deleted/models/mail_activity_mixin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# © 2023 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import api, fields, models
from odoo import fields, models


class MailActivityMixin(models.AbstractModel):
Expand Down
8 changes: 6 additions & 2 deletions mail_activity_not_deleted/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ def systray_get_activities(self):
'model': activity['model'],
'type': 'activity',
'icon': icon,
'total_count': 0, 'today_count': 0, 'overdue_count': 0, 'planned_count': 0,
'total_count': 0,
'today_count': 0,
'overdue_count': 0,
'planned_count': 0,
}
user_activities[activity['model']]['%s_count' % activity['states']] += activity['count']
user_activities[activity['model']]['%s_count' % activity['states']
] += activity['count']
if activity['states'] in ('today', 'overdue'):
user_activities[activity['model']]['total_count'] += activity['count']

Expand Down

0 comments on commit 073a012

Please sign in to comment.