Skip to Content
Menu
This question has been flagged
6 Replies
9441 Views

Hi,

I did try to hide the logo on the web site (need a bigger one), so I switch of the logo in customize.  Then I try to hide the hostname, so I open the customize - html editor and pick the main layout and deleted :

<a class="navbar-brand" href="/" t-if="website" t-field="website.name">My Website</a>

That work fine until I put the logo back.  Then I got the 500 error code.  So I try to find where that change has been made on the file system.  I found something very similar in website/views/website_templates.xml but the deleted line is still there, so where do I have to put it back, in a file or in a database record


Thank you for help

Avatar
Discard
Best Answer

Website templates are just views saved into the database on the table ir_ui_view after the modules are installed or updated. The website editor just change that template views and save back to the database. All the xml records created using a module have an external id saved in the model ir.model.data to be able to identify it latter for subsequent updates. When a view is installed from a module and updated using the website editor their related record in the ir.model.data is marked with noupdate = True. So the next updates of the module that create it will not revert the template view back to their original data arch and it remains with their manual changes

Avatar
Discard

If your server is in dev_mod ... Template are reading from xml directly ...

Axel, does this mean, that my answer is not correct? Which I would like to hear because this way it is a good thiing.

I confirmed that some months ago. You need to find the ir.model.data record to uncheck the noupdate field of the view to be able to update it again while updating the module

I see the code that set the noupate as True when the view is edited on the website editor

That's really cool. So one can really use the HTML editor without loosing the customizations when updating the module.

Where can I find the updated view using website editor in database or odoo settting?