Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix elechi Trasferimento #804

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--extra-index-url https://devpi.iast.it/nephila/public/+simple/
Django==1.9.12
Django==1.9.13
Markdown==2.6
django-bootstrap3==7.0.0
django-filter==0.9.2
Expand Down Expand Up @@ -29,19 +29,22 @@ newrelic==2.60.0.46
django_compressor==2.0
csscompressor==0.9.4
slimit==0.8.1
pyBarcode==0.7
cssselect==0.9.1
splinter==0.7.7
tblib==1.3.0
selenium==3.8.1
https://github.com/nephila/django-filer/archive/296fa6170a3749532b85ceb033eeae0fb839e9a6.zip
django-ckeditor-filebrowser-filer==0.2.0
django-nocaptcha-recaptcha==0.0.19
django-two-factor-auth==1.4.0
django-otp-yubikey==0.3.4
freezegun==0.3.9
unicodecsv==0.14.1
celery[redis]==4.1.0
celery[redis]==4.1.1
django-oauth-toolkit==0.12.0
django-cors-middleware
djangorestframework==3.6
xhtml2pdf
xlwt==1.3.0
django-oidc-provider==0.6.2
https://github.com/emfcamp/python-barcode/archive/0.7.zip # pyBarcode==0.7
https://github.com/nephila/django-filer/archive/296fa6170a3749532b85ceb033eeae0fb839e9a6.zip
11 changes: 7 additions & 4 deletions ufficio_soci/elenchi.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,16 @@ def risultati(self):
def excel_colonne(self):

def _data(p):
return Trasferimento.objects.filter(persona=p.id, ritirata=False).order_by('creazione').first().protocollo_data
d = Trasferimento.objects.filter(persona=p.id, ritirata=False).order_by('creazione')
return d.first().protocollo_data if d else ''

def _motivo(p):
return Trasferimento.objects.filter(persona=p.id, ritirata=False).order_by('creazione').first().motivo
d = Trasferimento.objects.filter(persona=p.id, ritirata=False).order_by('creazione')
return d.first().motivo if d else ''

def _destinazione(p):
return Trasferimento.objects.filter(persona=p.id, ritirata=False).order_by('creazione').first().destinazione
d = Trasferimento.objects.filter(persona=p.id, ritirata=False).order_by('creazione')
return d.first().destinazione if d else ''

return super(ElencoTrasferiti, self).excel_colonne() + (
('Data del trasferimento', lambda p: _data(p)),
Expand Down Expand Up @@ -824,4 +827,4 @@ def risultati(self):
).distinct('cognome', 'nome', 'codice_fiscale')

def template(self):
return "us_elenchi_inc_tesserini_rifiutati.html"
return "us_elenchi_inc_tesserini_rifiutati.html"