mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix #I8NJ48 app_web_fullwidth优化全局设置 置顶
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
{
|
||||
'name': 'Web Form Fullwidth, Full screen full width. Chatter Position ',
|
||||
'version': '16.23.12.08',
|
||||
'version': '16.23.12.12',
|
||||
'category': 'web',
|
||||
'author': 'odooai.cn',
|
||||
'website': 'https://www.odooai.cn',
|
||||
@@ -40,12 +40,14 @@
|
||||
'description': """
|
||||
UI Enhance for Odoo. Form view fullwidth, full screen.
|
||||
Easy config the chatter position to bottom or side or Responsive form every user.
|
||||
Easy set all company user UI for chatter position
|
||||
""",
|
||||
'depends': [
|
||||
'app_odoo_customize'
|
||||
],
|
||||
'data': [
|
||||
'views/res_users_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/webclient_templates.xml',
|
||||
],
|
||||
'assets': {
|
||||
|
||||
@@ -1,15 +1,59 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * app_web_fullwidth
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0+e-20230721\n"
|
||||
"Project-Id-Version: Odoo Server 16.0+e-20231112\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-09-06 05:40+0000\n"
|
||||
"PO-Revision-Date: 2023-09-06 05:40+0000\n"
|
||||
"POT-Creation-Date: 2023-12-12 15:25+0000\n"
|
||||
"PO-Revision-Date: 2023-12-12 15:25+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model:ir.model.fields.selection,name:app_web_fullwidth.selection__res_config_settings__default_chatter_position__bottom
|
||||
#: model:ir.model.fields.selection,name:app_web_fullwidth.selection__res_users__chatter_position__bottom
|
||||
msgid "Bottom"
|
||||
msgstr "底部"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model:ir.model.fields,field_description:app_web_fullwidth.field_res_users__chatter_position
|
||||
msgid "Chatter Position"
|
||||
msgstr "操作日志位置"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model:ir.model,name:app_web_fullwidth.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "设置"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model:ir.model.fields,field_description:app_web_fullwidth.field_res_config_settings__default_chatter_position
|
||||
msgid "Default Chatter Position"
|
||||
msgstr "默认日志位置"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model:ir.model.fields.selection,name:app_web_fullwidth.selection__res_config_settings__default_chatter_position__auto
|
||||
#: model:ir.model.fields.selection,name:app_web_fullwidth.selection__res_users__chatter_position__auto
|
||||
msgid "Responsive"
|
||||
msgstr "自适应(系统)"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model_terms:ir.ui.view,arch_db:app_web_fullwidth.view_app_theme_config_settings
|
||||
msgid "Set All User"
|
||||
msgstr "应用至所有用户"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model:ir.model.fields.selection,name:app_web_fullwidth.selection__res_config_settings__default_chatter_position__sided
|
||||
#: model:ir.model.fields.selection,name:app_web_fullwidth.selection__res_users__chatter_position__sided
|
||||
msgid "Sided"
|
||||
msgstr "右边"
|
||||
|
||||
#. module: app_web_fullwidth
|
||||
#: model:ir.model,name:app_web_fullwidth.model_res_users
|
||||
msgid "User"
|
||||
msgstr "用户"
|
||||
|
||||
@@ -11,8 +11,19 @@ _logger = logging.getLogger(__name__)
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
# todo: 可能要设置为不同公司不同
|
||||
default_chatter_position = fields.Selection([
|
||||
("auto", "Responsive"),
|
||||
("bottom", "Bottom"),
|
||||
("sided", "Sided"),
|
||||
], string='Default Chatter Position', default="bottom", default_model="res.users")
|
||||
|
||||
def user_set_chatter_pos(self):
|
||||
# todo: 处理设置
|
||||
company_id = self.env.company.id
|
||||
users = self.env['res.users'].with_context(active_test=False).search([('company_id', '=', company_id)])
|
||||
if users:
|
||||
users.write({
|
||||
'chatter_position': self.default_chatter_position
|
||||
})
|
||||
pass
|
||||
|
||||
BIN
app_web_fullwidth/static/description/demo5.jpg
Normal file
BIN
app_web_fullwidth/static/description/demo5.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -21,6 +21,10 @@
|
||||
<i class="fa fa-check-square-o text-primary"></i>
|
||||
Ready for enterprise and communicate version.
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-check-square-o text-primary"></i>
|
||||
Easy set all company user UI for chatter position
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,6 +78,11 @@
|
||||
<img src="demo3.jpg" style="border:1px solid black"/>
|
||||
<br/>
|
||||
</div>
|
||||
<h4>Easy set all company user UI for chatter position</h4>
|
||||
<div class="oe_demo oe_screenshot img img-fluid">
|
||||
<img src="demo5.jpg" style="border:1px solid black"/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
18
app_web_fullwidth/views/res_config_settings_views.xml
Normal file
18
app_web_fullwidth/views/res_config_settings_views.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_app_theme_config_settings" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.app_odoo_customize</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='app_ui_internal']//group[@name='app_ui_internal_right']" position="inside">
|
||||
<label for="default_chatter_position"/>
|
||||
<div>
|
||||
<field name="default_chatter_position" class="oe_inline"/>
|
||||
<button string="Set All User" type="object" name="user_set_chatter_pos" class="ml4 oe_highlight"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user