test3
This commit is contained in:
@@ -45,9 +45,9 @@ class Clientes(models.Model):
|
||||
conteo_mes = models.IntegerField(blank=True,null=True,default=0)
|
||||
def timbres_X_MES(self, mes=None, year=None, PAC=None):
|
||||
today = datetime.date.today()
|
||||
if year is None:
|
||||
if not year:
|
||||
year = today.year
|
||||
if mes==None:
|
||||
if not mes:
|
||||
mes = today.month
|
||||
|
||||
dat = datetime.datetime(int(year),int(mes),1)
|
||||
|
||||
@@ -343,7 +343,7 @@ def export_Excel(request):
|
||||
else:
|
||||
objeto_a_trabajar = Clientes.objects.all()
|
||||
for i,ii in enumerate(objeto_a_trabajar):
|
||||
ii.timbres_X_MES(mes=mes )
|
||||
ii.timbres_X_MES(mes=mes,year=year )
|
||||
|
||||
wb = Workbook()
|
||||
ws = wb.active
|
||||
|
||||
Reference in New Issue
Block a user