fix product log

This commit is contained in:
ivan deng
2021-08-06 16:30:17 +08:00
parent 40ab2bd157
commit 15ffc5ca24
5 changed files with 15 additions and 6 deletions

View File

@@ -47,7 +47,8 @@
<div class="oe_span12">
<h2 class="oe_slogan">This is a Long Term Support Apps.</h2>
<div class="oe_demo" style=" margin: 30px auto 0; padding: 0 15px 0 0; border:none; width: 96%;">
<h3>Update: v13.20.11.09</h3>
<h3>Update: v13.21.08.04</h3>
<p>39. Only erp manager can see debug menu..</p>
<p>38. Add Draggable Dialog enable.</p>
<p>37. Easy noupdate manage for External Identifiers(xml_id).</p>
<h3>Update: v13.20.08.29</h3>

View File

@@ -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 () {

View File

@@ -3,9 +3,9 @@
<t t-extend="UserMenu.Actions">
<t t-jquery="a[data-menu='documentation']" t-operation="before">
<switch-lang/>
<a role="menuitem" href="#" data-menu="debug" class="dropdown-item">Activate the developer mode</a>
<a role="menuitem" href="#" data-menu="debugassets" class="dropdown-item">Activate the developer mode (with assets)</a>
<a role="menuitem" href="#" data-menu="quitdebug" class="dropdown-item">Deactivate the developer mode</a>
<a t-if="widget.is_manager" role="menuitem" href="#" data-menu="debug" class="dropdown-item">Activate the developer mode</a>
<a t-if="widget.is_manager" role="menuitem" href="#" data-menu="debugassets" class="dropdown-item">Activate the developer mode (with assets)</a>
<a t-if="widget.is_manager" role="menuitem" href="#" data-menu="quitdebug" class="dropdown-item">Deactivate the developer mode</a>
<div role="separator" class="dropdown-divider"/>
<a role="menuitem" href="#" data-menu="documentation_dev" class="dropdown-item">Developer Manual</a>
</t>