Skip to content

[19.0][MIG] base_partition: Migration to 19.0 - #3465

Merged
OCA-git-bot merged 24 commits into
OCA:19.0from
apikcloud:19.0-mig-base_partition
Feb 13, 2026
Merged

[19.0][MIG] base_partition: Migration to 19.0#3465
OCA-git-bot merged 24 commits into
OCA:19.0from
apikcloud:19.0-mig-base_partition

Conversation

@therbin200

Copy link
Copy Markdown

No description provided.

nans and others added 24 commits December 12, 2025 10:48
Currently translated at 100.0% (2 of 2 strings)

Translation: server-tools-16.0/server-tools-16.0-base_partition
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_partition/es/
Currently translated at 100.0% (2 of 2 strings)

Translation: server-tools-16.0/server-tools-16.0-base_partition
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_partition/it/
Currently translated at 100.0% (2 of 2 strings)

Translation: server-tools-17.0/server-tools-17.0-base_partition
Translate-URL: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_partition/zh_CN/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-18.0/server-tools-18.0-base_partition
Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-base_partition/

@rrebollo rrebollo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: Great work! The code looks good to me (LGTM). Thank you for your contribution! I've provided a few suggestions for your consideration—feel free to address them as you see fit.

Comment on lines +44 to +55
def batch(self, batch_size=None):
"""Yield successive batches of size batch_size, or ."""
if not (batch_size or "_default_batch_size" in dir(self)):
raise UserError(
self.env._(
"Either set up a '_default_batch_size' on the model"
" or provide a batch_size parameter."
)
)
batch_size = batch_size or self._default_batch_size
for i in range(0, len(self), batch_size):
yield self[i : i + batch_size]

@rrebollo rrebollo Dec 13, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice include some documentation in addon's description about this method too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recently I discovered split_every. Maybe this could be deprecated in favor of the built-in helper.

Comment on lines +57 to +63
def read_per_record(self, fields=None, load="_classic_read"):
result = {}
data_list = self.read(fields=fields, load=load)
for d in data_list:
key = d.pop("id")
result[key] = d
return result

@rrebollo rrebollo Dec 13, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice include some documentation in addon's description about this method too.

@rousseldenis rousseldenis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@len-foss Maybe something to add in an improvement PR ?

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@thomaspaulb

Copy link
Copy Markdown
Contributor

/ocabot migration base_partition

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 19.0-ocabot-merge-pr-3465-by-thomaspaulb-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Feb 13, 2026
OCA-git-bot added a commit that referenced this pull request Feb 13, 2026
Signed-off-by thomaspaulb
@OCA-git-bot

Copy link
Copy Markdown
Contributor

It looks like something changed on 19.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 19.0-ocabot-merge-pr-3465-by-thomaspaulb-bump-nobump, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit edacd1a into OCA:19.0 Feb 13, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at b9c61bb. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.