Hello everyone,
Is it possible to have an HTML view in my custom module, but not on the website?
Thank you in advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello everyone,
Is it possible to have an HTML view in my custom module, but not on the website?
Thank you in advance.
Listing
RFID Date and Time
Hello odoo already have html field , in there u can add image, block, table. So i assume u mean a view to edit raw html code, in that way in your xml view if u have a html field then u just need to put a widget="ace" or using widget="code"
Thank you, Cybrosys. Could you also provide information on how to include JavaScript and CSS files for the HTML view?
Thank you Durong for your response!
Hi,
We can achieve this by creating a custom view that uses the ir.ui.view model and defining it as an HTML view. This view can then be rendered within the backend interface of Odoo.
For example, use the following code:
<odoo>
<record id="view_custom_html" model="ir.ui.view">
<field name="name">custom.html.view</
<field name="model">custom.model</
<field name="arch" type="html">
<div>
<p>Custom HTML View</p>
</div>
</field>
</record>
</odoo>
Hope it helps.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
May 24
|
1397 | ||
|
0
Jun 24
|
1628 | ||
|
1
Oct 24
|
1930 | ||
|
0
May 22
|
2482 | ||
|
2
Aug 16
|
5152 |