Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
5988 Vues
<template id="assets_backend" inherit_id="web.assets_backend">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/my_module/static/src/js/location_search.js"></script>
</xpath>
</template>

<template id="my_module.location_input" inherit_id="my_module.planned_location_template" customize_show="True">
<xpath expr="//div[@name='my_module_location_search']" position="inside">

<div class="r_input">
<input type="text"/>
</div>

</xpath>
</template>


the js file:


odoo.define('my_module.location_input', function (require) {
"use strict";
console.log('location searchbar');


var publicWidget = require('web.public.widget');

publicWidget.registry.LocationSearchBar =publicWidget.Widget.extend({
selector: '.r_input',

});

});
Avatar
Ignorer
Meilleure réponse

Hi,

Change the inherit_id to web.assets_frontend instead of web.assets_backend

Regards

Avatar
Ignorer
Publications associées Réponses Vues Activité
1
mai 23
3041
0
juil. 21
4134
0
juin 21
4300
0
mai 23
3195
1
janv. 23
8007