Uh oh!
There was an error while loading. Please reload this page.
[13.0][FIX] base_import_async - User's lang is ignored - #407
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
guewen
commented
Feb 16, 2022
Thanks for your PR. Any reason why the context is not stored in the recordset as I proposed in #283? |
rousseldenis
commented
Mar 25, 2022
francesco-ooops
commented
Mar 30, 2022
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 |
thomaspaulb
commented
Apr 12, 2022
@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. |
guewen
commented
Apr 12, 2022
@thomaspaulb here: #406 (comment) but check with @acsonefho who maybe already started to work on it |
acsonefho
commented
Apr 12, 2022
@thomaspaulb@guewen |
francesco-ooops
commented
May 20, 2022
Hi @acsonefho , what are the next steps in light of #432 having been merged? |
acsonefho
commented
May 20, 2022
I have to update this PR according to the one merge :) |
francesco-ooops
commented
May 20, 2022
makes sense :) |
acsonefho
commented
May 23, 2022
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