-
-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8.0 account_financial_report_webkit fix for multilingual Chart of Acc… #123
8.0 account_financial_report_webkit fix for multilingual Chart of Acc… #123
Conversation
Reviewing code, seems 👍, but not tested |
@pedrobaeza |
In this file "account_financial_report_webkit/report/common_reports.py" we need also extension with the context. Please have a look in #121. |
@BT-ojossen |
@luc-demeyer |
I think this one is ready for merge. |
cf. #133 (comment) |
Needs another review at least. I'm not comfortable enough with only my code review to merge by myself. |
@@ -259,7 +261,7 @@ def compute_partner_balance_data(self, data, filter_report_type=None): | |||
# get details for each accounts, total of debit / credit / balance | |||
accounts_by_ids = self._get_account_details( | |||
account_ids, target_move, fiscalyear, main_filter, start, stop, | |||
initial_balance_mode) | |||
initial_balance_mode, context=lang_ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use context=data['form']['used_context']
(or a similar form) instead of this limited context which only contains lang
?
data['form']['used_context']
is defined here : https://github.com/odoo/odoo/blob/8.0/addons/account/wizard/account_report_common.py#L183 and lang
key is already defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very minimal change. By only adding context=lang_ctx to those places in the code where there was no context passing before I fix the multi-language problem of the account.account,name field without risk to break something else.
I tested all reports with this change and everything work fine, hence I prefer that we merge it this way.
Seen the fact that many methods within the standard account module react differently depending on what is in the context, I think we risk to break a set of reports which work fine for several years now (and we all know how sensitive accountants are when this module would start to return wrong financial data).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luc-demeyer I need this (luc-demeyer#1) for a customer project. Can you have a look please ? Thanks
Tested and ok ! |
@luc-demeyer, are you going to include the patch by @damdam-s? |
#121 is a patch for solving the same problem, please judge which one is best. |
+1 Please merge |
@pedrobaeza |
This has conflicts. Forward porting this patch should be done by a contributor. |
merging this fix should imho not be an issue. |
@luc-demeyer Merge is not possible at the moment - there are conflicts (the branch needs to be rebased). |
889fc1e
to
179543d
Compare
@lasley |
[FIX] Bug OCA#115 on account_auto_fy_sequence: auto-create fiscal-year spec...
This PR ensures that the user language is correctly passed in the context which is required for users with the "translate=True" on the account.account name field.