diff --git a/app_mrp_workcenter_zchart/models/mrp_workcenter.py b/app_mrp_workcenter_zchart/models/mrp_workcenter.py index 68087c5f..da0f0da3 100644 --- a/app_mrp_workcenter_zchart/models/mrp_workcenter.py +++ b/app_mrp_workcenter_zchart/models/mrp_workcenter.py @@ -22,7 +22,7 @@ class MrpWorkCenter(models.Model): child_all_count = fields.Integer( 'Indirect Surbordinates Count', compute='_compute_child_all_count', store=False) - level = fields.Integer('Level', compute='_compute_level', inverse=False, readonly=True, store=True) + level = fields.Integer('Level', compute='_compute_level', inverse=False, readonly=True, default='1', store=True) @api.depends('child_ids.child_all_count') def _compute_child_all_count(self): diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py index 85b21ac6..421f04bc 100644 --- a/app_odoo_customize/__manifest__.py +++ b/app_odoo_customize/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'odoo 14,13 Customize OEM(Boost, Data reset)', - 'version': '13.21.07.27', + 'version': '13.21.08.04', 'author': 'Sunpop.cn', 'category': 'Productivity', 'website': 'https://www.sunpop.cn', @@ -79,6 +79,7 @@ 36. Add refresh translate for multi module. 37. Easy noupdate manage for External Identifiers(xml_id) 38. Add Draggable Dialog enable. + 39. Only erp manager can see debug menu.. This module can help to white label the Odoo. Also helpful for training and support for your odoo end-user. @@ -124,6 +125,7 @@ 36. 可为多个模块强制更新翻译 37. noupdate字段的快速管理,主要针对 xml_id 38. 对话框可拖拽 + 39. 只有系统管理员可以操作快速debug """, 'images': ['static/description/banner.gif'], 'depends': [ diff --git a/app_odoo_customize/static/description/index.html b/app_odoo_customize/static/description/index.html index 2b506db0..c416ccb9 100644 --- a/app_odoo_customize/static/description/index.html +++ b/app_odoo_customize/static/description/index.html @@ -47,7 +47,8 @@

This is a Long Term Support Apps.

-

Update: v13.20.11.09

+

Update: v13.21.08.04

+

39. Only erp manager can see debug menu..

38. Add Draggable Dialog enable.

37. Easy noupdate manage for External Identifiers(xml_id).

Update: v13.20.08.29

diff --git a/app_odoo_customize/static/src/js/customize_user_menu.js b/app_odoo_customize/static/src/js/customize_user_menu.js index 7343114f..cefa6260 100644 --- a/app_odoo_customize/static/src/js/customize_user_menu.js +++ b/app_odoo_customize/static/src/js/customize_user_menu.js @@ -9,6 +9,7 @@ odoo.define('app_odoo_customize.UserMenu', function (require) { * editing its preferences, accessing the documentation, logging out... */ + const session = require('web.session'); var UserMenu = require('web.UserMenu'); //避免错误,要再定义 var documentation_url = 'https://www.sunpop.cn'; @@ -23,6 +24,7 @@ odoo.define('app_odoo_customize.UserMenu', function (require) { var self = this; var session = this.getSession(); var lang_list = ''; + this.is_manager = false; self._rpc({ model: 'res.lang', @@ -101,6 +103,10 @@ odoo.define('app_odoo_customize.UserMenu', function (require) { * @override * 由于odoo11 没传ev到事件,所以要重载 */ + async willStart() { + await this._super(...arguments); + this.is_manager = await session.user_has_group('base.group_erp_manager'); + }, start: function () { var self = this; return this._super.apply(this, arguments).then(function () { diff --git a/app_odoo_customize/static/src/xml/customize_user_menu.xml b/app_odoo_customize/static/src/xml/customize_user_menu.xml index 8662379b..06907183 100644 --- a/app_odoo_customize/static/src/xml/customize_user_menu.xml +++ b/app_odoo_customize/static/src/xml/customize_user_menu.xml @@ -3,9 +3,9 @@ - Activate the developer mode - Activate the developer mode (with assets) - Deactivate the developer mode + Activate the developer mode + Activate the developer mode (with assets) + Deactivate the developer mode