First, you define a template in your module to add your js assets located in static/src/js:
<template id="assets_backend" name="newmodulename assets" inherit_id="web.assets_backend"> <xpath expr="." position="inside"> <script type="text/javascript" src="/newmodulename/static/src/js/custom.js"></script> </xpath> </template>
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 .... }); }
No comments:
Post a Comment