Odoo18-Base/addons/im_livechat/models/res_users.py

22 lines
670 B
Python
Raw Permalink Normal View History

2025-03-10 11:12:23 +07:00
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api
class Users(models.Model):
""" Update of res.users class
- add a preference about username for livechat purpose
"""
_inherit = 'res.users'
livechat_username = fields.Char("Livechat Username", help="This username will be used as your name in the livechat channels.")
@property
def SELF_READABLE_FIELDS(self):
return super().SELF_READABLE_FIELDS + ['livechat_username']
@property
def SELF_WRITEABLE_FIELDS(self):
return super().SELF_WRITEABLE_FIELDS + ['livechat_username']