[19.0][IMP] subscription_oca: split invoicing mode into orthogonal options#1468
Open
alvaro-domatix wants to merge 1 commit into
Open
[19.0][IMP] subscription_oca: split invoicing mode into orthogonal options#1468alvaro-domatix wants to merge 1 commit into
alvaro-domatix wants to merge 1 commit into
Conversation
66a972a to
d9b49f1
Compare
The invoicing_mode selection conflated three independent decisions and treated "Invoice" and "Invoice & send" identically (both posted and sent the invoice). Replace it with three orthogonal template fields: * create_sale_order: generate a confirmed sale order before invoicing * invoice_state: leave the invoice in draft or post it automatically * send_invoice: send the posted invoice by email once it is posted A warning banner is shown on templates that do not create a sale order, since those subscriptions will not appear in Sales analysis reports. A post-migration script backfills the new fields from the legacy invoicing_mode values.
d9b49f1 to
4914636
Compare
gerard-domatix
approved these changes
Jun 26, 2026
Gerloav
approved these changes
Jun 26, 2026
javier-domatix
approved these changes
Jun 26, 2026
pablolopez-domatix
approved these changes
Jun 26, 2026
Contributor
|
This PR has the |
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.
The
invoicing_modeselection on subscription templates conflated three independent decisions, and treated Invoice and Invoice & send identically (both posted the invoice and sent it by email).It is replaced by three orthogonal fields:
create_sale_order): generate and confirm a sale order before invoicing. Required for the subscription to appear in Sales analysis reports; templates without it show a warning banner.invoice_state): leave the generated invoice in draft or post it automatically.send_invoice): send the posted invoice using the template's mail template.A post-migration script backfills the new fields from the legacy
invoicing_modevalues and drops the old column, so existing templates keep behaving as before (the only intentional change is that Invoice no longer sends the email that Invoice & send sends).