-
-
Notifications
You must be signed in to change notification settings - Fork 536
[13.0][FIX] base_import_async - User's lang is ignored #407
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
Conversation
Use the current company to trigger the job (+ add related tests)
Fill allowed_company_ids from context with the job's company instead of every allowed companies of the user.
Because most of the time, a job is related to only one company. And adding every allowed companies of the user into the context may load some unexpected records (during search for example). Because standards ir.rule use ['|',('company_id','=',False),('company_id', 'in', company_ids)] and this 'company_ids' is filled with every allowed companies from the context.
In some case, the lang set into the context is important to do the import. For example when the file contain a translatable name as a key (ex: product.attribute) and currently as there is no context, the search is executed in English (default lang) instead of user's lang
|
Thanks for your PR. Any reason why the context is not stored in the recordset as I proposed in #283? |
|
Hi @acsonefho , let us know if you need any help finishing this. We're planning to port this to 14 as soon as it's ready |
|
@guewen We want to backport this to 11.0, but could you clarify your point about "storing it on the recordset" ? It's not clear to me from the issue you point to what you mean, or why it should be done. |
|
@thomaspaulb here: #406 (comment) but check with @acsonefho who maybe already started to work on it |
|
@thomaspaulb @guewen |
|
Hi @acsonefho , what are the next steps in light of #432 having been merged? |
I have to update this PR according to the one merge :) |
makes sense :) |
|
I close this PR because with the context stored in the job, we have nothing else to do in this module. |
Keep context during import.
In some case, the lang set into the context is important to do the import.
For example when the file contain a translatable name as a key (ex: product.attribute) and currently as there is no context, the search is executed in English (default lang) instead of user's lang.
Depends on #406