This question has been flagged
1 Reply
5485 Views

Dear Community,

can you explain me how OpenERP 7 can be still loading default .rml report templates after having set up WebKit? I have just read several documentation and I think I considered everything:

  • Installed wkhtml2pdf
  • entered webkit_path in technical settings
  • installed the following modules: base_headers_webkit, invoice_webkit, purchase_order_webkit
  • disabled reload from attachment option

I have just checked the reports service registration (Settings --> Actions --> Reports) and the report I want to test is indeed replaced with the webkit one. There is no clue left to it, but nevertheless, when pressing invoice print button, the system loads the default .rml template. What do I have to do else for having the system load the webkit maco replacements?

Avatar
Discard

Have you been create html template version of your report?

Have you tried creating a new invoice or copy an existing invoice after you installed the new modules?

Author Best Answer

@aharoen: If I am honest, I do not know what you mean with your comment... I hope you can explain me...

I only set up the community's predefined webkit replacements for the reports I need. I expected that they are completely finished replacing the old .rml ones and that I can simply edit the .maco file to customize them. That's why I did not install them inside OpenERP's general addon directory, but in my own additional addon folder already containing other custom modules made by me.

I read several documentation what I have to do to get webkit running and I followed all steps. Maybe, there is little information missing which seems to go without saying, but I do not know about. I wonder how the system can still print the old .rml report, if all connection to it was replaced by webkit replacements...

Could this simply be a module update thing? - Yesterday, I downloaded some bzr branches to my additional addon folder (yes, this is entered in openerp config, too), but although having changed rights and owner of these branches, logged off my database, restarted openerp service, logged in again, updated all modules, I was not able to see them in module management to install them. I use Ubuntu 12.04. I think, openerp has got a real problem with its module update functionality: For example, I did some test overrides for some reporting services to replace the standard .rml files. These are inside my addon folder and only installed into one special database. When changing the database (I logged off this database and into another one), the system was searching for these replacing reports, although they were not installed into this database ??? I was not able to work with this new database, before having completely removed these services from my addon folder ???

@Jaakko Komulainen: For such kinds of tests I always duplicate a preconfigured template database with no data and special modules installed so far. So I first had to set up webkit and afterwards, I created a new test invoice, pressed the print button and the old .rml report appeared.

Avatar
Discard
Author

I found the reason myself: wkhtmltopdf is buggy for linux and it has not been maintained for a quite long time. Although release notes claim that no GUI components are required to successfully execute the lib, when executing it in shell, it tells that it can not find any GUI components. Installing GUI components on a server system - for what??? No, definitely not for me. Furthermore, webkit appears to be very troublesome when multipage reports are required. These two reasons brought me away from my wish to base my reporting on webkit.

Author

I was doing some testing during the last days and decided for the following reporting solution - using Open Office Report Designer's conversion logic by hand:

  1. Download Open Office Report Designer module from OpenERP Apps Page and extract it somewhere to your client
  2. Download report (sxw file) you want to customize to your client (addons-Folder --> <module> --> report) (best is to put it here: base_report_designer/openerp_sxw2rml)
  3. Open downloaded sxw file with OpenOffice or LibreOffice.
  4. Now you can comfortably do your layout changes, insert additional fields, remove fields not desir