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

[16.0][ADD] base_partition #2615

Merged
merged 6 commits into from
Jul 18, 2023
Merged

Conversation

glitchov
Copy link
Contributor

Migrtion from #1893.

This module adds a partition(self, accessor) method to every model.
It accepts for accessor any parameter that would be accepted by mapped,
i.e. a string "field(.subfield)*" or a function (lambda x: not x.b).
It returns a dictionary with keys that are equal to set(record.mapped(accessor)),
and with values that are recordsets.

@rvalyi
Copy link
Member

rvalyi commented Apr 24, 2023

are you sure AGPL is the best fit for such a module? It seems it's a small utility module that could have a broad usage and LGPL might fit better. If such module is AGPL, people not playing the AGPL game could easily just copy the feature instead of adopting the module and help to debug and maintain it... But of course this decision is up to you the authors.

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Code review. Seems great. Minor comment

Agree with @rvalyi. Better to move to LGPL

base_partition/models/models.py Outdated Show resolved Hide resolved
@rousseldenis
Copy link
Contributor

@glitchov

@rousseldenis
Copy link
Contributor

This is a better implementation of https://github.com/odoo/odoo/blob/15.0/odoo/tools/misc.py#L260

@glitchov glitchov force-pushed the 16.0-add-base_partition-hda branch from 3d5794b to e07142b Compare April 25, 2023 07:32
Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

LGTM (Code review)

A very useful addon heavily used in Odoo 10....

@OCA-git-bot
Copy link
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). 🤖

@dreispt
Copy link
Member

dreispt commented Jul 18, 2023

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-2615-by-dreispt-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jul 18, 2023
Signed-off-by dreispt
@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 3f72a44 into OCA:16.0 Jul 18, 2023
@OCA-git-bot
Copy link
Contributor

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

@lmignon lmignon deleted the 16.0-add-base_partition-hda branch February 22, 2024 11:18
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.

8 participants