22 lines
670 B
Python
22 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']
|