Skip to content

[19.0][IMP] subscription_oca: split invoicing mode into orthogonal options#1468

Open
alvaro-domatix wants to merge 1 commit into
OCA:19.0from
alvaro-domatix:19.0-imp-subscription_oca-invoicing-options
Open

[19.0][IMP] subscription_oca: split invoicing mode into orthogonal options#1468
alvaro-domatix wants to merge 1 commit into
OCA:19.0from
alvaro-domatix:19.0-imp-subscription_oca-invoicing-options

Conversation

@alvaro-domatix

Copy link
Copy Markdown

The invoicing_mode selection 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 (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 status (invoice_state): leave the generated invoice in draft or post it automatically.
  • Send invoice by email (send_invoice): send the posted invoice using the template's mail template.

A post-migration script backfills the new fields from the legacy invoicing_mode values 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).

@alvaro-domatix alvaro-domatix force-pushed the 19.0-imp-subscription_oca-invoicing-options branch from 66a972a to d9b49f1 Compare June 25, 2026 17:54
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.
@alvaro-domatix alvaro-domatix force-pushed the 19.0-imp-subscription_oca-invoicing-options branch from d9b49f1 to 4914636 Compare June 25, 2026 18:20

@idris-domatix idris-domatix left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@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). 🤖

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.

7 participants