-
Notifications
You must be signed in to change notification settings - Fork 23.2k
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
[IMP] core: allow skipping field recomputitation on installation #99571
Open
yelizariev
wants to merge
1
commit into
odoo:master
Choose a base branch
from
odoo-dev:master-skip-recomputation-on-installation-IEL
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[IMP] core: allow skipping field recomputitation on installation #99571
yelizariev
wants to merge
1
commit into
odoo:master
from
odoo-dev:master-skip-recomputation-on-installation-IEL
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
from
September 5, 2022 12:56
e006591
to
f969ccf
Compare
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
5 times, most recently
from
September 6, 2022 13:04
e14bed9
to
0ade5e4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
2 times, most recently
from
February 16, 2023 14:27
4589877
to
6c930a6
Compare
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
2 times, most recently
from
February 17, 2023 11:58
cdfcddd
to
d355674
Compare
C3POdoo
requested review from
a team and
jbw-odoo
and removed request for
a team
February 17, 2023 11:59
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
2 times, most recently
from
February 17, 2023 13:30
ee58a9c
to
69b66da
Compare
Previously discussed in #69132 |
@rco-odoo |
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
from
February 20, 2023 09:22
69b66da
to
d35784a
Compare
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
from
April 17, 2023 12:28
d35784a
to
efa01ac
Compare
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
from
April 27, 2023 08:21
efa01ac
to
e71e31a
Compare
When a module adds new computated field, it may take significant time to make initial computation. Before this commit, the only way to avoid this was using `_auto_init`. Example: https://github.com/odoo/odoo/blob/ca0d8978b6585fe4f96100df56b8a7346468dc6c/addons/l10n_latam_invoice_document/models/account_move.py#L42-L44 https://github.com/odoo/enterprise/blob/46812d9abb3eb6e2b5ac565b4817548317c4a354/l10n_mx_edi_extended/models/account_move.py#L79-L82 But such method requires creating columns manually. This commit allows using `_init_column` method instead by adding return value ``initialized`` Also, make some cleanup in odoo/fields.py and move code "optimization for computing simple related fields like 'foo_id.bar'" to new method `initialize` Also, some fields don't need neither `_init_column` nor `_auto_init` if they are simple related fields
yelizariev
force-pushed
the
master-skip-recomputation-on-installation-IEL
branch
from
April 28, 2023 08:55
e71e31a
to
f55d6e0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a module adds new computated field, it may take significant time to make
initial computation. Before this commit, the only way to avoid this was using
_auto_init
. Example:odoo/addons/l10n_latam_invoice_document/models/account_move.py
Lines 42 to 44 in ca0d897
https://github.com/odoo/enterprise/blob/46812d9abb3eb6e2b5ac565b4817548317c4a354/l10n_mx_edi_extended/models/account_move.py#L79-L82
But such method requires creating columns manually.
This commit allows using
_init_column
method instead by adding return valueinitialized
Also, make some cleanup in odoo/fields.py and move code
"optimization for computing simple related fields like 'foo_id.bar'" to new method
initialize
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr