-
Notifications
You must be signed in to change notification settings - Fork 29.7k
ORM clean exports #184928
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
Closed
Closed
ORM clean exports #184928
Conversation
This file contains hidden or 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
edc26cb
to
477bd1f
Compare
Just move the definition to the export on the fields since this is not strictly part of the ORM.
Returns the first record of a recordset while keeping the prefetch. We can use `next(iter(` and avoid the overhead of the function.
Should be imported from odoo.tools.
`odoo.fields` expose `Date` and `Datetime` fields that have methods for the ORM. If needed to import python `datetime` module, developers should do it directly.
Import from `odoo.tools` instead.
Import from `odoo.fields`.
Import from `odoo.api`.
Import errors from `odoo.exceptions`.
Method to get the ids is generic for any model, rewrite it as so.
- GC_UNLINK_LIMIT - PREFETCH_MAX - check_property_field_value_name - expand_ids - regex_object_name
477bd1f
to
0ca6340
Compare
@robodoo rebase-ff r+ |
Merge method set to rebase and fast-forward. |
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Just move the definition to the export on the fields since this is not strictly part of the ORM. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Returns the first record of a recordset while keeping the prefetch. We can use `next(iter(` and avoid the overhead of the function. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Should be imported from odoo.tools. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
`odoo.fields` expose `Date` and `Datetime` fields that have methods for the ORM. If needed to import python `datetime` module, developers should do it directly. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Import from `odoo.tools` instead. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Import from `odoo.fields`. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Import from `odoo.api`. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Import errors from `odoo.exceptions`. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
Method to get the ids is generic for any model, rewrite it as so. Part-of: #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Nov 6, 2024
- GC_UNLINK_LIMIT - PREFETCH_MAX - check_property_field_value_name - expand_ids - regex_object_name closes #184928 Related: odoo/enterprise#72624 Signed-off-by: Raphael Collet <rco@odoo.com>
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.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
odoo/enterprise#72624
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr