Thursday, April 7, 2022
2 changes · master
Enhancements to existing features
Subscriptions are now managed through sales orders, reducing duplicated processes and making subscription handling more flexible. Businesses can combine different billing periods on one customer record, generate invoices for due lines more accurately, and improve upsell discount handling.
Original PR description
Purpose ======= Migrate subscription to sales order to simplify the code, the UX & make it more flexible for the future and easier to maintain. Subscription still appears as a separate module. This…
Purpose ======= Migrate subscription to sales order to simplify the code, the UX & make it more flexible for the future and easier to maintain. Subscription still appears as a separate module. This PR aims to move the sale.subscription models to sale.order. The implementation is quite similar to the sale_renting module. Before this PR, sale.subscription records are similar to sale.order ones. A lot of logic is duplicated to handle the subscription line computations, tax handling, etc. The current implementation of subscription has several drawbacks: * the sale.subscription records depends on required sale order template. * it is not possible to mix different periodicity in a subscription. Each partner has as many contract as periodicity needed (monthly, yearly etc) * when the flow starts in sale_management, the first invoice must be created from the sale application. * upsell prorata calculation to apply a discount is flawed when the salesman want to apply another discount. This PR fixes these issues and make subscription more flexible. One record can have subscription lines with different periodicity. Each line have a next_invoice_date and invoices are generated when they are due with the matching lines. Before this commit, the sale module could not be used to manage subscriptions in an override. This commit adapts the sale module to odoo/enterprise#21825 Taskid: 2568007
Subscriptions are now managed directly through sales orders, reducing duplicated workflows and making subscription handling more flexible. Businesses can combine different billing periods in one contract and generate invoices only for the lines that are due.
Original PR description
Purpose ======= Migrate subscription to sales order to simplify the code, the UX & make it more flexible for the future and easier to maintain. Subscription still appears as a separate module. This…
Purpose ======= Migrate subscription to sales order to simplify the code, the UX & make it more flexible for the future and easier to maintain. Subscription still appears as a separate module. This PR aims to move the sale.subscription models to sale.order. The implementation is quite similar to the sale_renting module. Before this PR, sale.subscription records are similar to sale.order ones. A lot of logic is duplicated to handle the subscription line computations, tax handling, etc. The current implementation of subscription has several drawbacks: * the sale.subscription records depends on required sale order template. * it is not possible to mix different periodicity in a subscription. Each partner has as many contract as periodicity needed (monthly, yearly etc) * when the flow starts in sale_management, the first invoice must be created from the sale application. * upsell prorata calculation to apply a discount is flawed when the salesman want to apply another discount. This PR fixes these issues and make subscription more flexible. One record can have subscription lines with different periodicity. Each line have a next_invoice_date and invoices are generated when they are due with the matching lines. Taskid: 2568007