Skip to content

Conversation

kmagusiak
Copy link
Contributor

@kmagusiak kmagusiak commented Oct 23, 2024

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

@robodoo
Copy link
Contributor

robodoo commented Oct 23, 2024

Pull request status dashboard

@kmagusiak kmagusiak requested a review from rco-odoo October 23, 2024 14:50
@kmagusiak kmagusiak marked this pull request as ready for review October 23, 2024 14:50
@C3POdoo C3POdoo requested review from a team, hupo-odoo, adgu-odoo, HydrionBurst, aab-odoo, kebeclibre and Julien00859 and removed request for a team October 23, 2024 14:51
@rco-odoo rco-odoo force-pushed the master-orm-expose-clean-krma branch from edc26cb to 477bd1f Compare November 6, 2024 11:00
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
@kmagusiak kmagusiak force-pushed the master-orm-expose-clean-krma branch from 477bd1f to 0ca6340 Compare November 6, 2024 11:43
@rco-odoo
Copy link
Member

rco-odoo commented Nov 6, 2024

@robodoo rebase-ff r+

@robodoo
Copy link
Contributor

robodoo commented Nov 6, 2024

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>
@robodoo robodoo closed this Nov 6, 2024
@robodoo robodoo added the 18.1 label Nov 6, 2024
@kmagusiak kmagusiak deleted the master-orm-expose-clean-krma branch November 7, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
18.1 RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants