Re: Django developer Resume

2022-08-17 Thread DJANGO DEVELOPER
Can you please share any project in which you have implemented a stripe
recurring system?

On Wed, Aug 17, 2022 at 8:21 PM M Adnan  wrote:

> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABNyTSqv8Km%3DtWg-KnqQNZ_fo3zZ-Y_yo5Kx%2Bns18-voYj0Gzw%40mail.gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKPY9pnUiO9fbi4ZY4eQDU-kRak1GG_DCgHuzu4ZLUJR%2ByPXzg%40mail.gmail.com.


Re: tmichroservices in django

2022-08-17 Thread Abdul Qoyyuum
Package each app as a separate django app.

On Wed, Aug 17, 2022 at 10:51 PM yaron amir  wrote:

> do you implement michroservices in django and if so how?
> Like
> Comment
> Send
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fd81706b-6765-4805-9360-afb35753cc62n%40googlegroups.com
> 
> .
>


-- 
Abdul Qoyyuum Bin Haji Abdul Kadir
HP No: +673 720 8043

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA3DN%3DXaaw6c3Az4fDghGsK%3DOXPhW6-C3g9Fzc%2BUO%2BOP7JvOKg%40mail.gmail.com.


Re: I need help with saving data to django database.

2022-08-17 Thread Anh Nguyen
Problem is you try to use sth you can’t control it.
You should not modify admin page. Try to create a new one as your
knowledge. That way keep you learn and stay away unpredictable issues.
On Wed, 17 Aug 2022 at 20:02 Paul Kudla (SCOM.CA Internet Services Inc.) <
p...@scom.ca> wrote:

>
> ok i had a hudge problem when writing my invoice system
>
> in general you need to over ride the save defination in the admin and
> models.py files
>
> this was never clearly documented in django.
>
>
> I use inlines so the code gets really complicated really quickly
>
> i have given my code you will need to muddle through it to do your own
> thing.
>
> my code was designed to run inlines, update an invoice number from
> another form, do the math, taxes etc etc etc
>
> it also interfaces to a customer database (kinda required for repeat
> invoices)
>
> i did everything in admin but you should look at the models override for
> other stuff :
>
> class InvoiceAdmin(admin.ModelAdmin):
>
> class Invoice_Items_Inline(admin.TabularInline):
> model = Invoice_Items
> extra = 1
>
> class Invoice_Payment_Inline(admin.TabularInline):
> model = Invoice_Payment
> extra = 1
>
> formfield_overrides = {
> models.CharField: {'widget':
> TextInput(attrs={'size':'40','style':
> 'height: 1em;'})},
> models.TextField: {'widget': Textarea(attrs={'rows':1,
> 'cols':40,'style': 'height: 2em;'})},
> }
>
> def customer_name_sold_to(self, obj):
> if (obj.sold_to):
> return obj.sold_to.customer_name
> return None
> customer_name_sold_to.short_description = "Sold To"
>
> def attention_sold_to(self, obj):
> if (obj.sold_to):
> return obj.sold_to.attention_to
> return None
> attention_sold_to.short_description = "Attention to"
>
> def getinvoicebody(self, obj):
>
>
> return None
>
>
> def attention_ship_to(self, obj):
> if (obj.ship_to):
> return obj.ship_to.attention_to
> return None
> attention_ship_to.short_description = "Attention to"
>
>
> def invoice_paid_total(self,obj) :
> obj.paid_total = float(0.00)
> try :
> record = Invoice_Payment.objects.all().filter(
> payment_item = '%s'
> %obj.invoice_number )
> for nn in range (0,len(record)) : #start the update
> paid_total = float(paid_total) +
> float(record[nn].cashbook_amount)
>
> except : pass #No entries found against this invoice
>
> return obj.paid_total
>
> attention_ship_to.short_description = "Attention to"
>
> def Print_Invoice(modeladmin, request, queryset) :
> queryset.update(printed=True)
>
> Print_Invoice.short_description = "Print Invoice(s)"
>
>
> actions = [Print_Invoice]
>
> #('attention_sold_to','attention_ship_to'),
>
> fieldsets = [
> ('Info', {'fields':
> [('invoice_number','invoice_date'),('sold_to','ship_to',),('purchase_order','terms','currency_type','delivery_type','foreign_account',)]}),
>
> #,('sold_to_address',)
> ('#inline', {
> 'fields': (),
> 'description': 0
> }),
> ('Details', {'fields':
>
> [('sub_total'),('gst_tax_exempt','gst_tax_value','gst_tax_amount'),('hst_tax_exempt','hst_tax_value','hst_tax_amount'),('pst_tax_exempt','pst_tax_value','pst_tax_amount'),('invoice_total'),]}),
> ('#inline', {
> 'fields': (),
> 'description': 1
> }),
> ('Status', {'fields':
> [('ar_owing','printed','faxed','emailed','new_invoice'), ]}),
> ]
>
>
> inlines = [Invoice_Items_Inline, Invoice_Payment_Inline, ]
> reorder_inlines = True
> list_display = ('invoice_number',
>
> 'invoice_date','customer_name_sold_to','body_search','sub_total','hst_tax_amount','invoice_total','invoice_paid_total','ar_owing')
>
> search_fields = search_with_fk(['^invoice_number',
>  'body_search',
> ])
>
>
> #readonly_fields = ('sold_to_address','ship_to_address')
>
> date_hierarchy = 'invoice_date'
> ordering = ('-invoice_date','-invoice_number_sort','ar_owing')
>
> list_per_page = 100
>
> index = True
>
> adminextra_fields = [
> ('m21', 'sold_to', Contacts_Admin.list_display),
> #('fkd', 'sold_to_address', ('sold_to',)),
> ('m21', 'ship_to', Contacts_Admin.list_display),
> #('fkd', 'ship_to_address', ('ship_to',)),
> ]
>
> def save_model(self, request, obj, form, change): #This 

Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread Gobi Dasu
I'd recommend these Django developers
 from our
talent network - in particular Obua, Francis, Kobina, and others of your
choice. You can recruit them as co founders too.

You'll get introduced to them in the LD Talent slack.

Happy to jump on a call
 as well.

*Regards,*
*Gobi Dasu*  (calendar
)
*Stanford CS **·* *Northwestern HCI*
*LD Talent  *(demo
)


On Wed, Aug 17, 2022 at 8:35 PM Mannoj Tewari  wrote:

> Hi,
>
> I am looking for Django Developer / Co-founder for fintech product in
> Mumbai.
>
> Regards
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4342bea5-af4b-4fd7-833e-830e636c9ea0n%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMk8evm3nxdWxWj_fV7RNJis-wdCfvxJf406KSE%3DtCA2C2C5MA%40mail.gmail.com.


Re: end to end encryption

2022-08-17 Thread Akobir Baxtiyorov
Ok

ср, 17 авг. 2022 г., 10:54 habti habtamu :

> Thank you... so how can you help me? I mean can we have meeting or any
> other way to get your help Please ?
>
> On Wed, 17 Aug 2022, 01:24 Adebileje Nurudeen, 
> wrote:
>
>> Sure, I can help you with that
>>
>> On Tue, Aug 16, 2022, 9:09 PM habti habtamu  wrote:
>>
>>> hello , I just want to know how can I implement end to end encryption
>>> text chat app in Django, any one who has experience please help me??
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/6b25da37-7ad2-41ea-bb73-cea3849b0f1dn%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAOfwBVg7fuW%2BaR7K7cwUpC7LQxzUQj-EAvgRabJMQ2Hq9hU8YA%40mail.gmail.com
>> 
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJWp2ZBePkqj_Eyn7jF7ZS9pXqLx8RU5h9Mw5g9VYYmwmp0YQw%40mail.gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BeiPfeBdV-8PKB9PyohdM6%2BWdbn-iYs7U5snKm-mqSJTf-emw%40mail.gmail.com.


Re: remove user from a specific group in django

2022-08-17 Thread Ryan Nowakowski
usuario isn't a username, it's a QuerySet so I don't think:

User.objects.get(username=usuario)

... will work.

Please post the specific error you're getting including any traceback.

On August 16, 2022 3:30:46 PM CDT, "José Ángel Encinas" 
 wrote:
>hi guys, im trying to remove user from a specific group using a function in 
>django but can to do it, can help me someone?
>
>this is the function
>def accesstosystem(request):
>usuario = User.objects.filter(groups__name='revisión')
>user = User.objects.get(username=usuario)
>group = Group.objects.get(name='revisión')
>user.groups.remove(group)
>
>kind regards 
>
>-- 
>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+unsubscr...@googlegroups.com.
>To view this discussion on the web visit 
>https://groups.google.com/d/msgid/django-users/d36d5c76-9824-4971-94ed-a2288827b656n%40googlegroups.com.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/482D57FC-EA71-4681-B824-92517C65770A%40fattuba.com.


Re: data model question

2022-08-17 Thread Ryan Nowakowski
How much data are you expecting from each data source? The volume of data will 
partially determine your solution.

On August 17, 2022 7:13:14 AM CDT, yaron amir  wrote:
>we are developing a control system that looks at data from multiple sources.
>some of the data is extracted from AWS, some from postgres databases, some 
>from hibob (human management reources)
>the question is this,
>here are my 
>1. do I use a disconnected external ETL process or use django for everything
>2. do I create all data resources using django data modeling or use the 
>internal management using django and some create manually 
>thanks
>
>Yaron
>
>-- 
>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+unsubscr...@googlegroups.com.
>To view this discussion on the web visit 
>https://groups.google.com/d/msgid/django-users/4cd6bb3e-c749-4b75-af6e-9a607fa90c92n%40googlegroups.com.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/280A30DC-51D3-4BFE-8707-BCCB8C410FBC%40fattuba.com.


Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread Eugene Davis
My name is Eugene a backend Django developer. Link to my github  https//
github.com/Daemonlite

On Wed, Aug 17, 2022, 2:50 PM Mannoj Tewari  wrote:

> Hi,
>
> I am looking for Django Developer / Co-founder for fintech product in
> Mumbai.
>
> Regards
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4342bea5-af4b-4fd7-833e-830e636c9ea0n%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPTk%3DxcBiEriA76cL3OVMfr%3DuGzwDRW_Mzbe9eDwZy3ASgYi9A%40mail.gmail.com.


Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread Sympa Kalambay
I’m there

Le mercredi 17 août 2022, M Adnan  a écrit :

> Where I will Send my resume?
>
> On Wed, 17 Aug 2022, 7:50 pm Mannoj Tewari,  wrote:
>
>> Hi,
>>
>> I am looking for Django Developer / Co-founder for fintech product in
>> Mumbai.
>>
>> Regards
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/4342bea5-af4b-4fd7-833e-830e636c9ea0n%
>> 40googlegroups.com
>> 
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CABNyTSr%2Bq_3MSxLu9VQsMb1hSs8d4sKgkveT2O-
> JVCBj5_nXhg%40mail.gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPuDzSeKLPsv94-AsUJ6PSxgiLCKFnAzRd-Gs%2BSsQ%2B3FpyvKZg%40mail.gmail.com.


Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread Hassan Shah
Hi I am a web developer with 2 years of experience in python Django and php
Laravel.
I am interested to work with you.



On Wed, Aug 17, 2022, 7:50 PM Mannoj Tewari  wrote:

> Hi,
>
> I am looking for Django Developer / Co-founder for fintech product in
> Mumbai.
>
> Regards
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4342bea5-af4b-4fd7-833e-830e636c9ea0n%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJEEgNYbBuk1GD0n3mLkjcd6Cm%3DoGnYfcVubCXHNV17jFHghtA%40mail.gmail.com.


Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread André Hangalo
I’m interested if a remotely work!

On Wed, 17/08/2022 at 16:18 Sujata Aghor  wrote:

> Hello
> I am interested if remote working is an option.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJCP8KAVFMRRUyyZbAgNPCfiCy%3DQ9hfPO1aj3VpZnYWNBZVnnA%40mail.gmail.com
> 
> .
>
-- 
RICK DEU

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACQ9QcEHAyFNwAdur8805XWsDxJposrndnkpa4yc8Sb-YqUFkw%40mail.gmail.com.


Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread Sujata Aghor
Hello
I am interested if remote working is an option.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJCP8KAVFMRRUyyZbAgNPCfiCy%3DQ9hfPO1aj3VpZnYWNBZVnnA%40mail.gmail.com.


Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread M Adnan
Where I will Send my resume?

On Wed, 17 Aug 2022, 7:50 pm Mannoj Tewari,  wrote:

> Hi,
>
> I am looking for Django Developer / Co-founder for fintech product in
> Mumbai.
>
> Regards
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4342bea5-af4b-4fd7-833e-830e636c9ea0n%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABNyTSr%2Bq_3MSxLu9VQsMb1hSs8d4sKgkveT2O-JVCBj5_nXhg%40mail.gmail.com.


Re: Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread Lipede Tope
I'm a beginner here Need an expert to work with remotely (like an
intern)... You may not pay me... I just want to add up and learn under
you...
Thanks

I'm a fresh graduate (computer science).. with little knowledge of Django...

Whatsapp: +2347017964747

I'm also open to other IT related tasks...
Thanks

On Wed, Aug 17, 2022, 3:50 PM Mannoj Tewari  wrote:

> Hi,
>
> I am looking for Django Developer / Co-founder for fintech product in
> Mumbai.
>
> Regards
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4342bea5-af4b-4fd7-833e-830e636c9ea0n%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABp6AaBKK5v1EFGtQ33c698v-30YHpdzHPMn8DgFMvoP3P55OA%40mail.gmail.com.


Understanding schema editor()

2022-08-17 Thread Alucor Rpa
Hi,
We are trying to understand the schema editor and how new fields are added 
to the tables when running makemigrations and migrate commands. Can you 
please help me with some materials or links to understand this?

Thanks
Sherlin.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a383abc7-959e-4c76-b34e-04f37a98b964n%40googlegroups.com.


tmichroservices in django

2022-08-17 Thread yaron amir
do you implement michroservices in django and if so how?
Like
Comment
Send

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fd81706b-6765-4805-9360-afb35753cc62n%40googlegroups.com.


data model question

2022-08-17 Thread yaron amir
we are developing a control system that looks at data from multiple sources.
some of the data is extracted from AWS, some from postgres databases, some 
from hibob (human management reources)
the question is this,
here are my 
1. do I use a disconnected external ETL process or use django for everything
2. do I create all data resources using django data modeling or use the 
internal management using django and some create manually 
thanks

Yaron

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4cd6bb3e-c749-4b75-af6e-9a607fa90c92n%40googlegroups.com.


Looking for Django Developer - Co founder for Fintech Product

2022-08-17 Thread Mannoj Tewari
Hi,

I am looking for Django Developer / Co-founder for fintech product in 
Mumbai.

Regards

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4342bea5-af4b-4fd7-833e-830e636c9ea0n%40googlegroups.com.


Re: I need help with saving data to django database.

2022-08-17 Thread Paul Kudla (SCOM.CA Internet Services Inc.)



ok i had a hudge problem when writing my invoice system

in general you need to over ride the save defination in the admin and 
models.py files


this was never clearly documented in django.


I use inlines so the code gets really complicated really quickly

i have given my code you will need to muddle through it to do your own 
thing.


my code was designed to run inlines, update an invoice number from 
another form, do the math, taxes etc etc etc


it also interfaces to a customer database (kinda required for repeat 
invoices)


i did everything in admin but you should look at the models override for 
other stuff :


class InvoiceAdmin(admin.ModelAdmin):

class Invoice_Items_Inline(admin.TabularInline):
model = Invoice_Items
extra = 1

class Invoice_Payment_Inline(admin.TabularInline):
model = Invoice_Payment
extra = 1

formfield_overrides = {
		models.CharField: {'widget': TextInput(attrs={'size':'40','style': 
'height: 1em;'})},
		models.TextField: {'widget': Textarea(attrs={'rows':1, 
'cols':40,'style': 'height: 2em;'})},

}

def customer_name_sold_to(self, obj):
if (obj.sold_to):
return obj.sold_to.customer_name
return None
customer_name_sold_to.short_description = "Sold To"

def attention_sold_to(self, obj):
if (obj.sold_to):
return obj.sold_to.attention_to
return None
attention_sold_to.short_description = "Attention to"

def getinvoicebody(self, obj):


return None


def attention_ship_to(self, obj):
if (obj.ship_to):
return obj.ship_to.attention_to
return None
attention_ship_to.short_description = "Attention to"  


def invoice_paid_total(self,obj) :
obj.paid_total = float(0.00)
try :
			record = Invoice_Payment.objects.all().filter( payment_item = '%s' 
%obj.invoice_number )

for nn in range (0,len(record)) : #start the update
paid_total = float(paid_total) + 
float(record[nn].cashbook_amount)

except : pass #No entries found against this invoice

return obj.paid_total

attention_ship_to.short_description = "Attention to"  

def Print_Invoice(modeladmin, request, queryset) :
queryset.update(printed=True)

Print_Invoice.short_description = "Print Invoice(s)"


actions = [Print_Invoice]   

#('attention_sold_to','attention_ship_to'),

fieldsets = [
	('Info', {'fields': 
[('invoice_number','invoice_date'),('sold_to','ship_to',),('purchase_order','terms','currency_type','delivery_type','foreign_account',)]}), 
#,('sold_to_address',)

('#inline', {
'fields': (),
'description': 0
}),
	('Details', {'fields': 
[('sub_total'),('gst_tax_exempt','gst_tax_value','gst_tax_amount'),('hst_tax_exempt','hst_tax_value','hst_tax_amount'),('pst_tax_exempt','pst_tax_value','pst_tax_amount'),('invoice_total'),]}),

('#inline', {
'fields': (),
'description': 1
}),
	('Status', {'fields': 
[('ar_owing','printed','faxed','emailed','new_invoice'), ]}),

]


inlines = [Invoice_Items_Inline, Invoice_Payment_Inline, ]  
reorder_inlines = True
	list_display = ('invoice_number', 
'invoice_date','customer_name_sold_to','body_search','sub_total','hst_tax_amount','invoice_total','invoice_paid_total','ar_owing')


search_fields = search_with_fk(['^invoice_number',
'body_search',
])


#readonly_fields = ('sold_to_address','ship_to_address')

date_hierarchy = 'invoice_date'
ordering = ('-invoice_date','-invoice_number_sort','ar_owing')

list_per_page = 100

index = True

adminextra_fields = [
('m21', 'sold_to', Contacts_Admin.list_display),
#('fkd', 'sold_to_address', ('sold_to',)),
('m21', 'ship_to', Contacts_Admin.list_display),
#('fkd', 'ship_to_address', ('ship_to',)),
]

def save_model(self, request, obj, form, change): #This will save create
#Check to see if this will be an invoice copy
copy = False
current_invoice = obj.invoice_number
		if obj.new_invoice :	#clear the flag and save the current object then 
set new & date

obj.new_invoice = False
obj.save()