Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Where do website builder builtin html editor save file

By
Benoît Vézina
on 3/11/16, 6:39 PM 972 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

1

Axel Mendoza

--Axel Mendoza--
10238
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 3/13/16, 3:53 AM

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

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

Jérémy Kersten (jke)
on 3/13/16, 4:30 AM

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

Ermin Trevisan
on 3/13/16, 9:03 AM

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

Axel Mendoza
on 3/13/16, 9:19 AM

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

Axel Mendoza
on 3/13/16, 9:21 AM

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

Ermin Trevisan
on 3/13/16, 10:51 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/11/16, 6:39 PM
Seen: 972 times
Last updated: 3/13/16, 10:52 AM