Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
730 Vistas

Hi, I am having trouble while testing an upgrade from 16.0 to 17.0.

We have customized a couple of report templates, mainly in the Purchasing and Manufacturing modules, and use these reports daily.

We are also currently testing an upgrade from 16.0 to 17.0 (Enterprise, On-Premise). I manage to upgrade the database as well as Odoo to 17.0 and it seems that all data is correct. However, when attempting to generate any new report, the layouts are not as we specified them, and any additional fields we inserted were lost. The company logo is present though.

Does this mean that we have to reformat the report templates on every upgrade, or am I missing something? Is there any way at all to upgrade while keeping the templates intact?

I am testing this out on a clone of the production server, so that I am sure that the filesystem and any other dependencies are all present. There are no third party apps installed, only standard Odoo apps.

Things I have tried so far:

  • I added the report.url key in the System Parameters, with value http://localhost:8069, before the database upgrade.
  • I followed the instructions at https://www.odoo.com/documentation/17.0/administration/upgrade.htm including merging the old and new filestores after the upgrade.
  • I have also checked the NoUpdate flag in View Metadata for these reports and set them to True.

Thanks to anyone for your assistance.

Avatar
Descartar
Mejor respuesta

Hi,

Your customized report templates are stored as QWeb views inside the database. During an upgrade from Odoo 16 to 17, these views get replaced by the default ones from the new version, which causes your custom changes to disappear.


The company logo remains because it’s stored separately (usually as an image in the database or configuration), so it’s not affected by the report template update.


To keep your changes during upgrades, you should never edit report templates directly in the database or UI. Instead, create a custom Odoo module that inherits and modifies the reports using XML. This way, your changes are stored as code and won’t be overwritten.


When upgrading, install your custom module on the new Odoo version after the upgrade finishes. The upgrade replaces standard views, but your module’s XML will apply your customizations again on top of the new templates.


Avoid direct changes on production, use version control for your modules, and always test your customizations on a cloned upgraded database before deploying to production. This will keep your reports intact and avoid losing your work during future upgrades.


Hope it helps.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
abr 25
1043
2
ene 25
2245
1
nov 24
1508
0
ago 24
1556
2
ene 25
2727