oca-ocb-mail/odoo-bringout-oca-ocb-im_livechat/im_livechat/models/res_users.py
2025-08-29 15:20:51 +02:00

21 lines
670 B
Python

# -*- 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']