fix reports
This commit is contained in:
parent
4a9fdc42b2
commit
1f2c6ad54e
|
@ -0,0 +1 @@
|
|||
,presik,presik,05.11.2022 11:37,file:///home/presik/.config/libreoffice/4;
|
9
crop.py
9
crop.py
|
@ -1139,7 +1139,8 @@ class CropActivitiesReport(Report):
|
|||
Company = pool.get('company.company')
|
||||
|
||||
date_start = date(data['start_date'].year, data['start_date'].month, 1)
|
||||
date_end = date(data['start_date'].year, data['start_date'].month + 2, 28)
|
||||
calculate_month = data['start_date'] + timedelta(days=30)
|
||||
date_end = date(data['start_date'].year, calculate_month.month, 28)
|
||||
week_list = []
|
||||
date_calculate_week = date_start + timedelta(7)
|
||||
for w in range(13):
|
||||
|
@ -1408,7 +1409,8 @@ class CropForecastWeekReport(Report):
|
|||
Company = pool.get('company.company')
|
||||
|
||||
date_start = date(data['start_date'].year, data['start_date'].month, 1)
|
||||
date_end = date(data['start_date'].year, data['start_date'].month + 2, 28)
|
||||
calculate_month = data['start_date'] + timedelta(days=30)
|
||||
date_end = date(data['start_date'].year, calculate_month.month, 28)
|
||||
week_list = []
|
||||
date_calculate_week = date_start + timedelta(7)
|
||||
for w in range(13):
|
||||
|
@ -1443,7 +1445,7 @@ class CropForecastWeekReport(Report):
|
|||
for bed in lot.beds:
|
||||
beds = beds + '-' +bed.bed.number
|
||||
lot_dict = {
|
||||
'number': '',
|
||||
'number': crop.number,
|
||||
'variety': crop.variety.product.name,
|
||||
'lot': 'Lote: ' + lot.lot.number,
|
||||
'total_plants': lot.total_plants,
|
||||
|
@ -1472,6 +1474,7 @@ class CropForecastWeekReport(Report):
|
|||
'name': stage.stage.name,
|
||||
'production_rate': stage.production_rate * lot_report['total_plants'] * crop.production_rate
|
||||
}
|
||||
total_list[index-1] = total_list[index-1] + (stage.production_rate * lot_report['total_plants'] * crop.production_rate)
|
||||
break
|
||||
lot_report['stages'] = stage_list
|
||||
pprint(stage_list)
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue