Adding fields to report.template

Hi,

I find myself in the incapacity to add fields to the model report.template.
I have a module where I try to overload this model. I did like any other overloads:

  • added the dependency report_engine to the tryton.cfg of my module
  • added ReportTemplate to init.py and the file report_engine.py
  • updated the module, and also ir and res ==> fails on ir

It seems like I have another module in conflict. However, even when I add this conflicted module in trytond.cfg, the update of the ir module does not fail this time but my new field is not seen on the database.

Any reason why this happens ? I have no problem with any other modules.
Thank you for your answers.

I guess this is a third party module. Can you post the link where it is available?

Could you post the error? It may help to understand the problem.

It is between 2 internal modules in my company. I’m sorry I cannot give you a link, it’s on private repositories.

My tryton.cfg : I tried to move up or down report_engine and report_engine.xml with no success.

The error at the ir update : tells me there’s an error with a xml file but it has been working for years now.

It seems that you have a custom module that adds a new field on ReportTemplate so you must run a database update for this module first.

I tried but it doesn’t work either.
The only thing I did was to add a field on report.template in a “module 1”, update this one, then update ir.
The error comes from a “module 2”, that doesn’t add fields on this model.

If I add the dependency of the “module 2” for the “module 1”, there is no error but the field is not added to the database. I’m very confused.

If the module that should add the field, does not create the column in the database, then it means that it is done wrong.

I don’t know, I simply do this.
image

I guess the class is not correctly registered in the pool.

In your tryton.cfg the branch is 2.4. which was python 2.7 only, IIRC. But in your trace back you are using Python 3.6. Please clarify the Tryton version you use and post your init.py content.

1 Like