Pointer
Pointer

Reputation: 2186

Embed html code inside odoo form

How embed e.g youtube in custom module in odoo 9?

After open link from menu show youtube video in form.

Any simple solution?

Upvotes: 2

Views: 7084

Answers (2)

gdaramouskas
gdaramouskas

Reputation: 3747

When you create a view in Odoo, there are some predefined tags that will be treated differently by Odoo when the parsing takes place. For example <form>, <tree> etc. The rest of the tags will be rendered as simple HTML tags. That means that you can write HTML code inside the formview that will be rendered to your client.

Insert the video in the view as you would insert it on a simple HTML page and it should be rendered correctly, some changes might be needed because Odoo injects some of its own code on the parsing process.

Upvotes: 3

Shikhar S
Shikhar S

Reputation: 319

You can use in the form view.

and use simple the way iframe is embeded. You can consider the example below -

<?xml version="1.0"?> 
    <form string="Embedded Webpage" version="7.0" edit="false" create="false"> 
        <div style="position:absolute; left:0; top:0; width:100%; height:100%;"> 
          <iframe src="http://www.playkeepout.com/" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="no" scrolling="no" style="border-width:0px;"></iframe> 

        </div> 
    </form>

Upvotes: 3

Related Questions