How to place adds on Odoo

Odoo has some great features, one of them is a blog. It is not a secret that good content brings 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 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