Repository navigation
[19.0][IMP] membership & membership_variable_period: update membership line data when updating invoice line + code cleaning - #241
Open
arnaudlayec wants to merge 6 commits into
Conversation
8 tasks done
Contributor
…re inheritable + pylinting
…move lines Examples: - updating invoice's partner moves the membership line to target partner - updating invoice line's product update the product in membership line (bronze / silver / gold) - changing the product to a non-membership one in the move line deletes the membership line
arnaudlayec
force-pushed
the
19.0-membership-imp-lines-create-update-disable
branch
from
November 7, 2026 04:48
52a255a to
b00a635
Compare
…epare_membership_line_dates()' from membership module
…f create/write) + pylinting
arnaudlayec
force-pushed
the
19.0-membership-imp-lines-create-update-disable
branch
from
November 7, 2026 04:55
b00a635 to
2a678ec
Compare
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
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.
This is mainly a technical code-improvement + bug fix of edge cases
The goal was to reduce the module
membership_variable_periodto a clean minimum, and put shared code in basemembershipSorry for putting 2 modules in the same PR but they are closely interdependent
Changes in
membershipCode refactor:
account.move.line: more inheritable for other modules of the repo, especiallymembership_variable_periodaccount.move.membership_line_idsis a O2m, it's like a M2o for business logics.membership.line: simplify_compute_state(more linear to read)Better manage edge cases like:
Changes in
membership_variable_periodcreateandwrite--> the create/update logics should now live inmembershipFalseby 1 clean_computemethodInspirations
membership_variable_periodbecause the inheritance of_prepare_membership_line_datawas complicated in v18Note: I can squash some commits if needed