This question has been flagged
3 Replies
6528 Views

I using Odoo14,

I have custom module that have state field for my customers.

and now want to generate invoice each month for my specificst customers,

i.e: if my customers is on active state, then send invoice for thems each month every 1st of every month,



how to achive that?
please, any help, source or tutorial how to achive that will be very appreciated.



Thanks,

Tri Nanda


Avatar
Discard
Best Answer

Hi,

You can create a scheduled action and run it in the every month, inside the scheduled action you can apply the logic of creating invoice and sending it to the customer.

Creating scheduled action: https://www.youtube.com/watch?v=_P_AVSNr6uU

Also you can check out this module, which helps to create recurring invoice:  OCA Recurring Invoice

Thanks

Avatar
Discard
Author

Thank you very much Niyas, you're a good man that helps peoples

Best Answer

This is now a feature of Odoo 16, on the Other Info tab of the transaction:


Avatar
Discard

Could you help me understand how to make a subscription automatically invoice a customer?

I've created the subscription. Invoiced the first one. And then assumed it was on auto pilot, only to find out that it is not.

What do I need to do to make a subscription to automatically invoice a customer and automatically bill their credit card?

Your question is different from the one I answered. If you can't find the answer after reviewing our documentation at https://www.odoo.com/documentation/16.0/applications/sales/subscriptions.html then I would suggest opening a ticket with Odoo Support.

Andrew, did you figure out how to automatically invoice the customer based on a subscription?

I think I got it.  Thank you for your help

Andrew Valenzuela

Texas Technician

Phone:  806-560-0704

Email:  andrew@txtechnician.com

Website:  www.txtechnician.com

 


From: Tord Røsstad <notifications@mail.odoo.com>
Sent: Tuesday, June 27, 2023 7:28 AM
To: Andrew Valenzuela <Andrew@txtechnician.com>
Subject: Re: How to create Invoice automatically every month?
 
Andrew, did you figure out how to automatically invoice the customer based on a subscription? ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​

Andrew, did you figure out how to automatically invoice the customer based on a subscription?

--
Tord Røsstad


Odoo S.A.

+32 81 81 37 00 | info@odoo.com | https://www.odoo.com

Powered by Odoo

Author Best Answer

I solved this by creating this method on my model:

def monthly_tuition_fee_invoice(self):
invoice = self.env['account.move']
students_course = self.env['aqur.student.course'].search([('state', '=', 'active_student')])
for rec in students_course:
invoice.create({
'move_type': 'out_invoice',
'partner_id': rec.student_id.partner_id.id,
'invoice_line_ids': (
{
'product_id': rec.course_category_id.product_id,
'quantity': 1,
'price_unit': rec.course_category_id.product_id.lst_price,
'tax_ids': False
},
)
})
Then I call the method on Odoo Scheduled Actions, to access the menu:
  1. Active developer mode
  2. got to  Settings ->  Automation  -> Scheduled Actions
  3. Then create new Scheduled Actions

Here is how I set up the schedule actions:

Thank you to @ Niyas and all of the person who have help me to achive this.

Thanks,

Tri Nanda

Avatar
Discard