You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use the OCA module account_credit_control (https://github.com/OCA/account-financial-tools/tree/8.0/account_credit_control) with my prefered reporting engine (aeroo). This module has a report based on the object credit.control.communication (TransientModel) developped in Qweb. So I replaced this Qweb report by an Aeroo report with the following XML code:
for each="o in objects"
setLang(o.partner_id.lang or 'en_US')
In the module account_credit_control, you have a wizard to print the credit control letters which outputs one big PDF file with all the letters for all the customers. Each page contains the letter for one particular customer in the customer's language.
With Qweb, it works well, each page contains the fields "o.current_policy_level.name" and "o.current_policy_level.custom_text" in the language of the customer.
With Aeroo, it doesn't work : all the pages use the language of the current user, without taking into accout the setLang instructions inside the report. I added some getLang instructions inside the report to check that it has the right value and I can see that getLang reports the right value, but all the pages are still in the user's language.
I found one interesting thing in my long debug party: the problem doesn't happen any more in Aeroo if the object "credit.control.communication" is converted from TransientModel to a regular Model. I made this change in the code in account_credit_control/wizard/credit_control_communication.py:
class CreditCommunication(models.Model)
then I restart odoo with "-u account_credit_control", and then I see that each page of the report is in the language of the customer.
I would really like to use account_credit_control with Aeroo. If you have an idea on how to solve this bug, I would appreciate it very much. I have already spent a lot of hours on it and all I found is explained above.
The text was updated successfully, but these errors were encountered:
It's quite interesting bug. Upon porting Aeroo to v8 I had to change part that relates to setting language, due to changes in Odoo architecture. I do not know how it is now, but at the time original reports never were able to print multi language reports. Probably they have changed something ever since, have not checked by myself...
@sraps Thanks for your answer. Could you tell me in which part of the code of Odoo and/or Aeroo those changes are located ? I would like to help fix this issue if I can.... but I don't know where to start searching in the code.
I use Odoo v8.
I want to use the OCA module account_credit_control (https://github.com/OCA/account-financial-tools/tree/8.0/account_credit_control) with my prefered reporting engine (aeroo). This module has a report based on the object credit.control.communication (TransientModel) developped in Qweb. So I replaced this Qweb report by an Aeroo report with the following XML code:
My ODT file is available here:
http://people.via.ecp.fr/~alexis/credit_control.odt
As you can see in this ODT file, it starts with
In the module account_credit_control, you have a wizard to print the credit control letters which outputs one big PDF file with all the letters for all the customers. Each page contains the letter for one particular customer in the customer's language.
With Qweb, it works well, each page contains the fields "o.current_policy_level.name" and "o.current_policy_level.custom_text" in the language of the customer.
With Aeroo, it doesn't work : all the pages use the language of the current user, without taking into accout the setLang instructions inside the report. I added some getLang instructions inside the report to check that it has the right value and I can see that getLang reports the right value, but all the pages are still in the user's language.
I found one interesting thing in my long debug party: the problem doesn't happen any more in Aeroo if the object "credit.control.communication" is converted from TransientModel to a regular Model. I made this change in the code in account_credit_control/wizard/credit_control_communication.py:
then I restart odoo with "-u account_credit_control", and then I see that each page of the report is in the language of the customer.
I would really like to use account_credit_control with Aeroo. If you have an idea on how to solve this bug, I would appreciate it very much. I have already spent a lot of hours on it and all I found is explained above.
The text was updated successfully, but these errors were encountered: