Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
127 Visualizzazioni

Is there a way to generate the index.html file from the interface in Odoo, which is added to the static folder of a module?

Avatar
Abbandona
Risposta migliore

There's no built-in Odoo interface function to directly generate an index.html file within a module's static folder. You'll need to create this file manually and place it in the correct location.



  1. Create the index.html file: Use a text editor or IDE to create the index.html file containing your desired HTML content. This will typically include JavaScript, CSS links, and any other necessary elements for your module's frontend.

  2. Place the file in your module's static folder: Ensure the index.html file is located within the static/src/xml directory of your Odoo module. The path structure is crucial for Odoo to correctly locate and serve the file.

  3. Update your module's manifest (__manifest__.py): If you haven't already, add the necessary data to your module's manifest file to register the static files. This usually involves adding the 'data' key to include the path to your index.html file. Refer to Odoo's documentation on module development for specific details.


Resources:
How to Configure Departments for a Company in Odoo 18 (2025 Guide)
Beyond the Checklist : Modern Odoo CRM Requirements Discovery Strategies for 2025 | Pragmatic Techsoft
Manufacturing Digital Transformation with Odoo | Pragmatic Techsoft
Mastering Seamless Supply Chains | Integrating Odoo 18 with Marketing, Procurement and Logistics
For further assistance with Odoo development, feel free to connect with us at Pragmatic Techsoft. We offer various services and resources to help you succeed with your Odoo projects.

Avatar
Abbandona
Risposta migliore

Hi,


Odoo does not provide any interface option to generate an index.html file in the static/ folder. If you need such a page:


    Dynamic way (recommended): Use a QWeb template + controller to render the content at a URL (works like an index.html but generated by Odoo).


    Static way: Manually create or script-generate the index.html and place it in the static/ folder — Odoo will just serve it, but won’t create it for you.


Hope it helps

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 25
856
1
ott 24
2591
3
set 25
20013
0
ago 21
2317
0
set 25
2251