summaryrefslogtreecommitdiff
path: root/addons/base_setup/static/src/js/res_config_dev_tool.js
diff options
context:
space:
mode:
authoraca <aca@odoo.com>2019-06-19 09:14:43 +0000
committerYannick Tivisse <yti@odoo.com>2019-07-26 09:53:46 +0000
commit78565b1dc933692abba46a73f2298b7ea8e03c88 (patch)
tree05006de48a2099a35c39dc5571d4929ab0135a3b /addons/base_setup/static/src/js/res_config_dev_tool.js
parenta8893ad2994aad05961bdddcecb3e2c55f301ed5 (diff)
[REM] web_settings_dashboard: Merge module into base_setup
Purpose ======= Currently, when we click on “Settings” on the Home Dashboard, we arrive on a new Dashboard with several pieces of information like Installed Apps, invite new users, or translations. Some informations are reachable in several ways, which is not necessary. We would like to remove this page and replace it with the General Settings page directly. That makes more sense to the user who click on “Settings”. The present informations will be dispatched in the menu or in the general settings for a better usability. Specification ============= This commit move code from web_settings_dashboard in order to put the features in settings directly. To do so, we choose to move code to base_setup, and create widget on the settings form view to keep features. Concerned features are: invite users, dev tools, odoo edition number and IAP account link. TaskID: 2006910 closes odoo/odoo#34290 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/base_setup/static/src/js/res_config_dev_tool.js')
-rw-r--r--addons/base_setup/static/src/js/res_config_dev_tool.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/addons/base_setup/static/src/js/res_config_dev_tool.js b/addons/base_setup/static/src/js/res_config_dev_tool.js
new file mode 100644
index 00000000000..b407a731a35
--- /dev/null
+++ b/addons/base_setup/static/src/js/res_config_dev_tool.js
@@ -0,0 +1,31 @@
+odoo.define('base_setup.ResConfigDevTool', function (require) {
+ "use strict";
+
+ var config = require('web.config');
+ var Widget = require('web.Widget');
+ var widget_registry = require('web.widget_registry');
+
+ var ResConfigDevTool = Widget.extend({
+ template: 'res_config_dev_tool',
+
+ init: function () {
+ this._super.apply(this, arguments);
+ this.isDebug = config.isDebug();
+ this.isAssets = config.isDebug("assets");
+ this.isTests = config.isDebug("tests");
+ },
+
+ willStart: function () {
+ var self = this;
+ return this._super.apply(this, arguments).then(function () {
+ return self._rpc({
+ route: '/base_setup/demo_active',
+ }).then(function (demo_active) {
+ self.demo_active = demo_active;
+ });
+ });
+ },
+ });
+
+ widget_registry.add('res_config_dev_tool', ResConfigDevTool);
+});