<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:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
5868
查看
Hi,
Change the inherit_id to web.assets_frontend instead of web.assets_backend
Regards
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
5月 23
|
2949 | ||
|
0
7月 21
|
4056 | ||
|
0
6月 21
|
4176 | ||
|
0
5月 23
|
3094 | ||
|
1
1月 23
|
7894 |