Normally automatic invoice sent to customer will be note on Label in voice like 3 months is base on next invoice date was set on Subscription. Example next invoice date: 01 April 2024 and subscription 3 months. then the label in the invoice will be note: 3 months 01/04/2024 - 01/07/2024.
As I want to set to send invoice for customer 1 month head before subscription expired. base on above i want invoice label note 3 months 01/05/2024 - 01/08/2024. how can i set up like this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
Experiencing the exact same issue. Did you find any way around?
Alternatively, if I'm not mistaken you can extend the "automatic closing after", but our clients also requested to receive the invoice 1 month prior to the end of the subscription.
Hi,
In the product form, have you tried changing the Invoicing Policy to "Prepaid/Fixed Price"?
C.
Option 1: Use Studio or Custom Code to Offset the Period Label
-
Activate Developer Mode
Go to Settings → Activate Developer Mode. -
Use Odoo Studio or create a custom module to override the invoice description generation logic:
- In the model sale.subscription, the logic for label text (e.g., “3 months 01/04/2024 - 01/07/2024”) is usually built into the method that generates the invoice line description.
- You'll need to override that method (e.g., _prepare_invoice_line) and add a 1-month offset to the dates used in the label.
Phyton Code
start_date = subscription.recurring_next_date + relativedelta(months=1)
Deploy the code or use Studio to set the computed field in the invoice line description with the adjusted label.
end_date = start_date + relativedelta(months=subscription.recurring_interval)
label = f"{subscription.recurring_interval} months {start_date.strftime('%d/%m/%Y')} - {end_date.strftime('%d/%m/%Y')}"
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
|
1
gen 24
|
1839 | ||
|
2
mag 25
|
1864 | ||
|
0
lug 23
|
1750 |
Same issue, somebody with the answer?