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
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
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')}"
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
sty 24
|
1834 | ||
|
2
maj 25
|
1859 | ||
|
0
lip 23
|
1744 |
Same issue, somebody with the answer?