mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
web_chatter_position: create module
This commit is contained in:
23
web_chatter_position/models/res_users.py
Normal file
23
web_chatter_position/models/res_users.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright 2022 Hynsys Technologies
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResUsers(models.Model):
|
||||
_inherit = "res.users"
|
||||
|
||||
chatter_position = fields.Selection(
|
||||
[("bottom", "Bottom"), ("sided", "Sided")],
|
||||
default="sided",
|
||||
)
|
||||
|
||||
# Override so that the user can change the chatter_position field
|
||||
|
||||
@property
|
||||
def SELF_READABLE_FIELDS(self):
|
||||
return super().SELF_READABLE_FIELDS + ["chatter_position"]
|
||||
|
||||
@property
|
||||
def SELF_WRITEABLE_FIELDS(self):
|
||||
return super().SELF_WRITEABLE_FIELDS + ["chatter_position"]
|
||||
Reference in New Issue
Block a user