Blog
13 April, Post by: MP Technolabs
How to inherit js file in odoo?
First, you define a template in your module to add your js assets located in static/src/js:
Then, in your module's new js file, you extend the widget from default module like this:
odoo.define('newmodulename.newmodulename', function (require){
"use strict";
// require original module JS
var instance = openerp;
// Extend widget
instance.web.form.One2ManyListView.include({
....
your code to override here
....
});
}