Navigation Menu

Skip to content
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

[FIX] base_import: unscoped self can bear side effects #31793

Conversation

blaggacao
Copy link
Contributor

Access to an unscoped self (global context) can bear side effects.
This does not happen in standard Odoo, however in one instance, I found
a leaked self in the global context which obviously did not conform to
what is expected to be accessed here. self beeing volatile it is probably
an utterly bad idea to fetch it from the global context.

This PR access the windows invariant keyword instead.

Description of the issue/feature this PR addresses:

  • Global self beard side effects in custom deployment
  • As a consequence, the import wizard did not work

Current behavior before PR:

  • Global self is accessed (without guarantees about it's shape)

Desired behavior after PR is merged:

  • Global self is not accessed
  • A more invariant window is accessed instead (maybe there is still a more suitable variable, but window does the trick)

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@xoe-labs

@robodoo robodoo added seen 🙂 CI 🤖 Robodoo has seen passing statuses labels Mar 12, 2019
@blaggacao blaggacao force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from c835e86 to cd170be Compare March 13, 2019 23:12
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 13, 2019
@Deiber Deiber force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from cd170be to 6a4d092 Compare March 29, 2019 00:37
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 29, 2019
@Deiber Deiber force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from 6a4d092 to dd20de5 Compare April 2, 2019 15:56
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Apr 2, 2019
@Deiber Deiber force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from dd20de5 to 91b47a9 Compare April 5, 2019 23:35
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Apr 5, 2019
@Deiber Deiber force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from 91b47a9 to e8a3292 Compare April 16, 2019 01:17
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Apr 16, 2019
@Deiber Deiber force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from e8a3292 to f2939ce Compare April 27, 2019 00:46
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Apr 27, 2019
@Deiber Deiber force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from f2939ce to a5226c4 Compare May 4, 2019 00:35
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels May 4, 2019
@blaggacao blaggacao force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from a5226c4 to b7a397d Compare May 4, 2019 02:05
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels May 4, 2019
@blaggacao blaggacao force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from b7a397d to 6b1fb55 Compare November 13, 2019 03:07
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Nov 13, 2019
@blaggacao blaggacao force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from 6b1fb55 to e0f6736 Compare November 25, 2019 21:00
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Nov 25, 2019
Access to an unscoped self (global context) can bear side effects.
This does not happen in standard Odoo, however in one instance, I found
a leaked self in the global context which obviously did not conform to
what is expected to be accessed here. self beeing volatile it is probably
an utterly bad idea to fetch it from the global context.

This PR access the windows invariant keyword instead.
@blaggacao blaggacao force-pushed the 12.0-FIX-base-import-unscoped-access-to-self branch from e0f6736 to 1b46b08 Compare March 14, 2020 01:12
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 14, 2020
@C3POdoo
Copy link
Contributor

C3POdoo commented Apr 22, 2022

Dear @blaggacao,

Thank you for your contribution but the version 12.0 is no longer supported.
We only support the last 3 stable versions so no longer accepts patches into this branch.

We apology if we could not look at your request in time.
If the contribution still makes sense for the upper version, please let us know and do not hesitate to recreate one for the recent versions. We will try to check it as soon as possible.

This is an automated message.

@C3POdoo C3POdoo closed this Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants