Initial commit
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResUsers(models.Model):
|
||||
|
||||
_inherit = "res.users"
|
||||
|
||||
color_scheme = fields.Selection(
|
||||
related="res_users_settings_id.color_scheme",
|
||||
readonly=False,
|
||||
)
|
||||
sidebar_type = fields.Selection(
|
||||
selection=[
|
||||
('invisible', 'Invisible'),
|
||||
('small', 'Small'),
|
||||
('large', 'Large'),
|
||||
],
|
||||
string="Sidebar Type",
|
||||
default='large',
|
||||
required=True,
|
||||
)
|
||||
chatter_position = fields.Selection(
|
||||
selection=[
|
||||
('side', 'Side'),
|
||||
('bottom', 'Bottom'),
|
||||
],
|
||||
string="Chatter Position",
|
||||
default='side',
|
||||
required=True,
|
||||
)
|
||||
dialog_size = fields.Selection(
|
||||
selection=[
|
||||
('minimize', 'Minimize'),
|
||||
('maximize', 'Maximize'),
|
||||
],
|
||||
string="Dialog Size",
|
||||
default='minimize',
|
||||
required=True,
|
||||
)
|
||||
|
||||
@property
|
||||
def SELF_READABLE_FIELDS(self):
|
||||
return super().SELF_READABLE_FIELDS + [
|
||||
'color_scheme',
|
||||
'sidebar_type',
|
||||
'chatter_position',
|
||||
'dialog_size',
|
||||
]
|
||||
|
||||
@property
|
||||
def SELF_WRITEABLE_FIELDS(self):
|
||||
return super().SELF_WRITEABLE_FIELDS + [
|
||||
'color_scheme',
|
||||
'sidebar_type',
|
||||
'chatter_position',
|
||||
'dialog_size',
|
||||
]
|
||||
Reference in New Issue
Block a user