Odoo Help

0

how we create custom slider in odoo

By
kartik
on 3/16/16, 8:51 AM 599 views

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


0
Motez
On 3/16/16, 10:42 AM

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

kartik
on 3/16/16, 11:49 PM

if we include more than one files so how we can manage order for js file

kartik
on 3/16/16, 11:50 PM

I edited my last answer for how to include multiple files

Motez
on 3/17/16, 4:14 AM

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

kartik
on 3/17/16, 7:40 AM

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.

Motez
on 3/17/16, 8:37 AM

thanks motez but i am new to odoo ,can you please provide any example for that so it really helpful for me

kartik
on 3/18/16, 1:06 AM

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...

Motez
on 3/18/16, 4:19 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 3/16/16, 8:51 AM
Seen: 599 times
Last updated: 3/16/16, 10:42 AM