From beb1fde6cce92658f66e51ab04ff527e176de227 Mon Sep 17 00:00:00 2001 From: ivan deng Date: Mon, 6 Dec 2021 18:39:41 +0800 Subject: [PATCH] add boost --- .../static/src/js/customize_user_menu.js | 202 ------------------ .../static/src/xml/customize_user_menu.xml | 19 +- 2 files changed, 10 insertions(+), 211 deletions(-) delete mode 100644 app_odoo_customize/static/src/js/customize_user_menu.js diff --git a/app_odoo_customize/static/src/js/customize_user_menu.js b/app_odoo_customize/static/src/js/customize_user_menu.js deleted file mode 100644 index 7c9fdb6e..00000000 --- a/app_odoo_customize/static/src/js/customize_user_menu.js +++ /dev/null @@ -1,202 +0,0 @@ -odoo.define('app_odoo_customize.UserMenu', function (require) { - "use strict"; - - /** - * This widget is appended by the webclient to the right of the navbar. - * It displays the avatar and the name of the logged user (and optionally the - * db name, in debug mode). - * If clicked, it opens a dropdown allowing the user to perform actions like - * 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'; - var documentation_dev_url = 'https://www.sunpop.cn'; - var support_url = 'https://www.sunpop.cn'; - var account_title = 'My Account'; - var account_url = 'https://www.sunpop.cn'; - - UserMenu.include({ - init: function () { - this._super.apply(this, arguments); - var self = this; - var session = this.getSession(); - var lang_list = ''; - self.is_manager = false; - self.show_debug = false; - - self._rpc({ - model: 'res.lang', - method: 'search_read', - domain: [], - fields: ['name', 'code'], - lazy: false, - }).then(function (res) { - _.each(res, function (lang) { - var a = ''; - if (lang['code'] === session.user_context.lang) { - a = ''; - } else { - a = ''; - } - lang_list += '' + lang['name'] + a + ''; - }); - lang_list += '