Odoo Help

0

How to create a custom widget for youtube videos?

By
manuthalasseril
on 9/22/15, 11:53 AM 1,134 views

I am trying to make a widget for playing youtubr videos.

I make a template and a js file which contents are given below

<?xml version="1.0" encoding="UTF-8"?>

<templates id="template" xml:space="preserve">

<t t-name="youtube">

<div><t t-raw="widget.embeded" /></div>

</t>

</templates>


js file


openerp.resource = function (openerp)

{

openerp.web.form.widgets.add('youtube', 'openerp.resource.Youtubewidget');

openerp.resource.Youtubewidget = openerp.web.Widget.extend(

{

template : "youtube",

init: function (view, code) {

this._super(view, code);

}

});

}


I dont know what was to do next. Please help me?

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: 9/22/15, 11:53 AM
Seen: 1134 times
Last updated: 9/22/15, 11:53 AM