Odoo18-Base/addons/contacts/models/res_users.py
2025-01-06 10:57:38 +07:00

21 lines
667 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, modules
class Users(models.Model):
_name = 'res.users'
_inherit = ['res.users']
@api.model
def _get_activity_groups(self):
""" Update the systray icon of res.partner activities to use the
contact application one instead of base icon. """
activities = super()._get_activity_groups()
for activity in activities:
if activity['model'] != 'res.partner':
continue
activity['icon'] = modules.module.get_module_icon('contacts')
return activities