Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
11217 Lượt xem

Hi, I made a Form using odoo builder. but when I try to embed the form by getting it's iFrame it shows the whole page of the website not only the Form.
How to solve that, so i can get only the iFrame of the form and present it in other websites?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I wrote a guide here using the small HTML code amendment to hide header + footer on a form page.

I want to put Odoo form on another website, but it got some errors. | Odoo

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Set the style of the iframe to hide the top X pixels like this:

position: relative; top: -100px;


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

If you want to embed an Odoo website form in another website using an iframe and display only the form without the entire page, you can follow these steps:

Step 1: Get the URL of the Form:


    In Odoo, navigate to the form that you want to embed.

    Copy the URL from the browser's address bar.


Step 2: Create an HTML Page:Create an HTML page where you want to embed the form. Replace "YOUR_ODOO_FORM_URL" with the actual URL of the Odoo form that you copied.   


Step 3: Adjusting Odoo Website Configuration:


    Go to your Odoo website module.

    Navigate to the page where the form is located.

    Edit the page and make sure the page template is set to "synchronous" or "async" instead of "master" (master includes the entire page).

    Save your changes.


Step 4: Test the Embedded Form:


Open the HTML page you created in a web browser. You should see the embedded Odoo form without the entire page.

Additional Considerations:


    Cross-Origin Restrictions:

        Ensure that your Odoo server allows embedding from the domain where you are trying to embed the form. Some browsers may enforce cross-origin restrictions.

    Responsive Design:

        Adjust the width and height attributes of the iframe to suit your design and make it responsive.

    HTTPS:

        Make sure your Odoo server uses HTTPS. Some browsers may block iframes from loading content over HTTP when the parent page is served over HTTPS.

    Security and Privacy:

        Be cautious when embedding content from one domain into another, considering security and privacy implications. Ensure that you have proper authorization to embed the content.



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
5
thg 12 23
31293
2
thg 7 21
9109
0
thg 5 21
4427
4
thg 5 25
2095
2
thg 1 25
2052