Odoo v10
I want to modify this in abstract_web_client.js:
var WebClient = Widget.extend({
[...]
init: function(parent) { this.client_options = {};
this._super(parent);
this.origin = undefined;
this._current_state = null;
this.menu_dm = new utils.DropMisordered();
this.action_mutex = new utils.Mutex();
this.set('title_part', {"zopenerp": "Odoo"});
},
[...]
});
Replacing init: function with this:
var WebClient = Widget.extend({
[...]
init: function(parent) {
this.client_options = {};
this._super(parent);
this.origin = undefined;
this._current_state = null;
this.menu_dm = new utils.DropMisordered();
this.action_mutex = new utils.Mutex();
this.set('title_part', {"zopenerp": "MyCustomerName"});
},
[...]
});
I have tried to define a new .JS in my module -/my_module/static/src/js/abstract_web_client.js- with the following code:
odoo.define('my_module.AbstractWebClient', function (require) {"use strict";
var AbstractWebClient = require('web.AbstractWebClient');
AbstractWebClient.include({
init: function(parent) {
this.client_options = {};
this._super(parent);
this.origin = undefined;
this._current_state = null;
this.menu_dm = new utils.DropMisordered();
this.action_mutex = new utils.Mutex();
this.set('title_part', {"zopenerp": "MyCustomerName"});
},
});
});
And include later in via xml file:
<template id="my_module_assets_backend" inherit_id="web.assets_backend">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/my_module/static/src/js/abstract_web_client.js"></script>
</xpath>
</template>
But now Odoo interface web get stucks.
Any tips on what is wrong?