social/mail_gateway/models/res_users.py

17 lines
392 B
Python

# Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
gateway_ids = fields.Many2many("mail.gateway")
def _init_messaging(self):
result = super()._init_messaging()
result["gateways"] = self.gateway_ids.gateway_info()
return result