<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',
});
});
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
5931
Widoki
Hi,
Change the inherit_id to web.assets_frontend instead of web.assets_backend
Regards
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
maj 23
|
3014 | ||
|
0
lip 21
|
4108 | ||
|
0
cze 21
|
4249 | ||
|
0
maj 23
|
3157 | ||
|
1
sty 23
|
7987 |