prepare #I8NJ48 app_web_fullwidth优化全局设置 置顶

This commit is contained in:
Ivan Office
2023-12-12 02:24:40 +08:00
parent 66ed0dc276
commit d5471df36d
4 changed files with 22 additions and 2 deletions

View File

@@ -42,7 +42,7 @@
Easy config the chatter position to bottom or side or Responsive form every user.
""",
'depends': [
'web'
'app_odoo_customize'
],
'data': [
'views/res_users_views.xml',

View File

@@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
from . import res_users
from . import res_config_settings

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
import logging
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
_logger = logging.getLogger(__name__)
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
default_chatter_position = fields.Selection([
("auto", "Responsive"),
("bottom", "Bottom"),
("sided", "Sided"),
], string='Default Chatter Position', default="bottom", default_model="res.users")

View File

@@ -10,7 +10,7 @@ class ResUsers(models.Model):
("auto", "Responsive"),
("bottom", "Bottom"),
("sided", "Sided"),
], default="auto",)
], string='Chatter Position', default="bottom")
@property
def SELF_READABLE_FIELDS(self):