Draft: [18.0][FIX] change membership product on invoice line #1319
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:
This is a ported fix from
petrus-v fix for v14.0 for Odoo v18.0.
While changing information on invoice line, the related membership line is not updated.
This is done as part of OCA Internal Working Group: task 871862
Current behavior before PR:
create 2 membership products
create an invoice with one membership product and save the draft invoice
(you can see the mebership line is already created with proper information)
go back to the invoice and use the other product
💥 member ship line is not updated
(So, this also happen while duplicating an invoice from previous year changing the membership product.)
Desired behavior after PR is merged:
The member ship line is updated with fresh informations changed on the invoice:
price
start /end date (used to compute the membership state)
...