This question has been flagged
1 Reply
3151 Views

My colleagues wanted some changes in our reports. So I edited the .RML files with the text editor and restarted the service openerp-server.

And my changes were never applied to the PDF reports.

So I read the documentation specific to version 5.0 on the odoo  web site, I read the Q/A on this forum, and... except from a consensus about the option " Reload from attachment ".. nobody seems to have problems with .RML files modifications not being applied to the resulting .PDF files.

The facts :

  • The RML report contains very specific text that only belongs to one .RML file (so the file to edit is obvious)

  • OpenERP 5.0 / linux Ubuntu 16.04.3 LTS

  • Columns `report_sxw_content_data` and `report_rml_content_data` in database table `public.ir_act_report_xml` are null

  • attachment_use is false  : Reload from attachment is unticked

The things I tried so far :

  • Restart openerp-server after .RML file modification (no changes)

  • Removed or changed report lines from ir_act_report_xml (crashed odoo)

  • Check that Reload from attachment is unticked

  • Set the values `report_sxw_content_data` and `report_rml_content_data`to null (no changes, in fact they were already null)

Does anybody have a clue about the correct method to update a .RML report ?

Avatar
Discard
Author

@ray does it means I should stop the service and run ./openerp-server.py -u custom_module ?

Author

As recommended by @raycarnes I stopped the open-erp server, backed-up the database and ran

./openerp-server.py --update=custom_module -d db_101209 --stop-after-init

Odoo actually tried to update the module and choked on a xml syntax error somewhere else (a previous contractor made the syntax error 3 years ago, and the module has not been updated in the last 3 years, probably). The resulting database was impossible to use..

So now either I fix the prevous guy's mistakes, or I find another way to update the .RML definitions for open-erp. There MUST be another way.. last year I upgraded the operating system and made a few minor fixes in the .RML files layout.. these changes were accepted into openerp without module updates.

Best Answer

RML files, among others, are loaded into the Odoo database when the database is created.

Odoo then retrieves the RML from the database field(s) - never the file on disk.

You need to update the database to re-load the RML files into the database (or at least upgrade the modules containing those RML files).

This is the same for other files - such as XML. You need to update those modules to re-load the XML into the database.


Avatar
Discard