Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3 Respostas
10287 Visualizações

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?

Avatar
Cancelar
Melhor resposta

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

Avatar
Cancelar
Melhor resposta

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

position: relative; top: -100px;


Avatar
Cancelar
Melhor resposta

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.



Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
5
dez. 23
31017
2
jul. 21
8811
0
mai. 21
4253
4
mai. 25
1545
2
jan. 25
1629