Fix
This commit is contained in:
parent
1fa45fc60a
commit
75a04759d6
File diff suppressed because it is too large
Load Diff
14
crop.py
14
crop.py
|
@ -1095,10 +1095,10 @@ class CropActivitiesReport(Report):
|
||||||
Company = pool.get('company.company')
|
Company = pool.get('company.company')
|
||||||
Crop = pool.get('farming.crop')
|
Crop = pool.get('farming.crop')
|
||||||
date_start = data['start_date']
|
date_start = data['start_date']
|
||||||
|
date_end = data['start_date'] + timedelta(days=(7*17))
|
||||||
dom = [
|
dom = [
|
||||||
('start_date', '<=', date_start),
|
('activities.planned_date', '>=', date_start),
|
||||||
('end_date', '>=', date_start),
|
('activities.planned_date', '<=', date_end),
|
||||||
('activities', '!=', None)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if data['location']:
|
if data['location']:
|
||||||
|
@ -1236,7 +1236,6 @@ class CropSuppliesReport(Report):
|
||||||
])
|
])
|
||||||
|
|
||||||
supplies_list = []
|
supplies_list = []
|
||||||
# total_list = [0 for x in range(13)]
|
|
||||||
|
|
||||||
for crop in crops:
|
for crop in crops:
|
||||||
for activity in crop.activities:
|
for activity in crop.activities:
|
||||||
|
@ -1258,7 +1257,7 @@ class CropSuppliesReport(Report):
|
||||||
'unit': '',
|
'unit': '',
|
||||||
}
|
}
|
||||||
supply_info_list.append(spl)
|
supply_info_list.append(spl)
|
||||||
# supply_name = ''
|
|
||||||
for supply in activity.supplies:
|
for supply in activity.supplies:
|
||||||
for index, week in enumerate(week_list):
|
for index, week in enumerate(week_list):
|
||||||
week_number = week['number']
|
week_number = week['number']
|
||||||
|
@ -1278,11 +1277,6 @@ class CropSuppliesReport(Report):
|
||||||
}
|
}
|
||||||
crop_list.append(suply_crop)
|
crop_list.append(suply_crop)
|
||||||
|
|
||||||
#location_list.append({'name':location.name, 'crops':crop_list, 'total_time': total_list})
|
|
||||||
|
|
||||||
#report_context['records'] = supplies_list
|
|
||||||
#report_context['totals'] = total_report
|
|
||||||
#report_context['company'] = .party.name
|
|
||||||
report_context['weeks'] = week_list
|
report_context['weeks'] = week_list
|
||||||
report_context['supplies'] = supplies_list
|
report_context['supplies'] = supplies_list
|
||||||
report_context['company'] = Company(data['company'])
|
report_context['company'] = Company(data['company'])
|
||||||
|
|
Loading…
Reference in New Issue