Hello,
Please Try Following Demo:
--------------------------
This is main template:
<template id="template" xml:space="preserve">
<t t-name="DemoExample">
<div class="demo-one">
<p>odoo</p>
</div>
</t>
</template>
How To Inherit
----------------------
Template file :-> demo_template.xml
<template id="template" xml:space="preserve">
<t t-name="DemoExample" t-extend="DemoExample">
<t t-jquery='.demo-one' t-operation='replace'>
<p>Your Company Name</p>
</t>
</t>
</template>
-----------------------------------------------------
<!- Loaded XML files inside java script code -->
-----------------------------------------------------
JS file :--> demo_example.js
-------------------------------------------------------------------------
put the following JS Code in demo_example.js file:
-------------------------------------------------------------------------
odoo.define('module_name.name_of_fetures', function (require) {
'use strict';
var core = require('web.core');
var ajax = require('web.ajax');
var qweb = core.qweb;
ajax.loadXML('/module_name/static/src/xml/demo_template.xml', qweb);
});
-----------------------------------
Loading of Javascript file
-----------------------------------
<template id="demo_example_ext_js" name="Demo Example Ext Js" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/module_name/static/js/demo_example.js"></script>
</xpath>
</template>