Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
8877 มุมมอง

how to display a html external page in a form view in odoo 12 ? and would the javascript of the page function normally ?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can define any HTML elements in the form view inside a div. For example:

<form string="Vehicle">
    <div><iframe height="500" width="500" src="http://google.com"></iframe></div>
</form>

Also, You can apply JS 

The answer is done after testing the code. Don't downvote for fame. The answer will be helpful to others.

This the screenshot of the output. Inside the notebook -> page element, I simply defined as above. But the link is odoo.com


The screenshot of external page inside the sheet directly,


อวตาร
ละทิ้ง

i want to create the url dynamically in an iframe and to view only in a form view how can we do it

คำตอบที่ดีที่สุด

Hi,

Set form view type as html

<field name="arch" type="html"/>

in arch body you can define iframe tag to load any url as external page.

i hope this will give you an idea to implement.

Regards

Haresh Kansara


อวตาร
ละทิ้ง