How to place adds in Odoo

Add banners to your website and blog

Odoo has some great features, one of them is a blog. It is not a secret that good content brings a large audience and this might result in revenue. One of the most common things are adds, mostly colourful banners. Some of you surely came across this image:

You asking yourself why this happened? You copied the code provided by Amazon, Google or other and it is not working.

The thing is that VIEW layer is stored in XML. What is View? It is part of the Model-View-Controller frame. Thanks to MVC front-end, back-end and database are separated so many developers can work on one project together, at the same time. The error is caused by "&" in the referral link provided with the banner. & is not permitted as it has a meaning in XML. So, when you google "entity references in xml" you will come across some tables, like the one below:


The table comes from Windows Dev Center

As you can see from the table Entity reference for "&" is "&". To solve the problem you simply need to replace all "&" with "&amps". Enjoy


Odoo • Image and Text

Want to make it easier?

Build an app or get an app from the Odoo App Store

Module made by CierTech will allow you to add banners from the back end, quick and easy.