Django invoice generation system

136 views
Skip to first unread message

USMAN MALIK

unread,
Jul 14, 2016, 7:31:45 AM7/14/16
to Django users
Hi. I'm new to django and i'm creating a buisness application for my company. i want to generate a monthly invoice for every member in my company and for this i have two models in which all the information is stored. Is there a way to generate an automatic invoice based on the information in these two models? kindly help me. thanks .

Amandeep Singh

unread,
Jul 15, 2016, 11:51:20 PM7/15/16
to django...@googlegroups.com

Firstly you could create a function that uses these to models and renders a html  or csv  format invoice. Then you could mail this to yourself. Once the function is created then you could create a scheduled cron job using celery or a even simple way would be to use crontab linux command with monthly interval.


On 14-Jul-2016 5:01 pm, "USMAN MALIK" <umal...@gmail.com> wrote:
Hi. I'm new to django and i'm creating a buisness application for my company. i want to generate a monthly invoice for every member in my company and for this i have two models in which all the information is stored. Is there a way to generate an automatic invoice based on the information in these two models? kindly help me. thanks .

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ab6fca84-0cc7-4789-9e62-9d02cba01f6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Schneider

unread,
Jul 16, 2016, 2:33:03 AM7/16/16
to django...@googlegroups.com

On Jul 14, 2016 4:31 AM, "USMAN MALIK" <umal...@gmail.com> wrote:
>
> Hi. I'm new to django and i'm creating a buisness application for my company. i want to generate a monthly invoice for every member in my company and for this i have two models in which all the information is stored. Is there a way to generate an automatic invoice based on the information in these two models? kindly help me. thanks .
>

If you can code the logic necessary to extract the information needed on a regular basis, then you can absolutely automate the task. Simple, recurring cases can be handled by cron on *nix, and task scheduler on Windows. The scripts are generally written as custom Django-admin commands, since you usually need access to the ORM and your models for most tasks:

https://docs.djangoproject.com/en/1.9/howto/custom-management-commands/

More complicated tasks may require extra infrastructure like Celery. It provides more flexibility, but is also more complicated to setup and manage:

http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html

Start with cron, and work your way up to Celery.

-James


Reply all
Reply to author
Forward
0 new messages