[FIX] base_setup: load demo data does not works
While moving web_settings_dashboard to base_setup in commit: https://github.com/odoo/odoo/commit/78565b1dc933692abba46a73f2298b7ea8e03c88#diff-2ac1c5a222c5332be62450c099440fd6L292 the load demo data click event was missing. so added event to load the demo data in base_setup. Task-2062477 closes odoo/odoo#36275 Closes: #36275 Signed-off-by: Romain Libert (rli) <rli@odoo.com>
This commit is contained in:
@@ -7,6 +7,9 @@ odoo.define('base_setup.ResConfigDevTool', function (require) {
|
||||
|
||||
var ResConfigDevTool = Widget.extend({
|
||||
template: 'res_config_dev_tool',
|
||||
events: {
|
||||
'click .o_web_settings_force_demo': '_onClickForceDemo',
|
||||
},
|
||||
|
||||
init: function () {
|
||||
this._super.apply(this, arguments);
|
||||
@@ -25,6 +28,21 @@ odoo.define('base_setup.ResConfigDevTool', function (require) {
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Forces demo data to be installed in a database without demo data installed.
|
||||
*
|
||||
* @private
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onClickForceDemo: function (ev) {
|
||||
ev.preventDefault();
|
||||
this.do_action('base.demo_force_install_action');
|
||||
},
|
||||
});
|
||||
|
||||
widget_registry.add('res_config_dev_tool', ResConfigDevTool);
|
||||
|
||||
Reference in New Issue
Block a user