hi,
i create one app for snippet in odoo v9
all image will render properly but js function not load properly in odoo
i create one js function and how we load that js file snippet
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
hi,
i create one app for snippet in odoo v9
all image will render properly but js function not load properly in odoo
i create one js function and how we load that js file snippet
create an xml file and add this into it :
<openerp>
<data>
<template id="assets_backend" name="my_module assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/my_module/path_to_file1.js"></script
<script type="text/javascript" src="/my_module/path_to_file2.js"></script>
</xpath>
</template>
</data>
</openerp>
Don't forget to add it to __openerp__.py file !
can you please specify that how we maintain order for js file
if we include more than one files so how we can manage order for js file
I edited my last answer for how to include multiple files
hi thanks for your valuable reply it really helpful for me but one issue is there when i load js do slider called first than the code so slider not loading properly only images are render can you please tell me how can i solve that issue
That is because your js code is executed before the images you want to select on your slider. You will need to implement a slider widget . You can find more about widgets in the official documentation.
thanks motez but i am new to odoo ,can you please provide any example for that so it really helpful for me
welcome to the community katrik :) as a start have a look at the pet sotre tutorial. you can find the default Odoo widgets in the web module. Also you can find a plenty of community web modules that you can refer to...
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up