<% from datetime import datetime, timedelta %> %for o in objects: %for task in o.task_ids:

%if task.type == 'ins': <% first_form = True for insp in task.inspection_line_ids: if insp.header == True: first_form = False break %> %if first_form == True:
CERTIFICATE #
${task.certificate}
${task.equipment_id.name} Inspection Certificate
CUSTOMER${o.customer_id.name}WORK ORDER #${o.name}

Data: ${task.equipment_id.name} <% index=0 length = len(task.equipment_feature) max = 5*3 %> %for feature in task.equipment_feature: %if index < max: %if index and index%3 == 0: %endif <% index=index+1 %> %if ((index == length) and (index%3 != 0)): %for i in range(0, 3-index%3): %endfor %endif %endif %endfor
${feature.name}${feature.value or ''}

<% index=0 %> %for insp in task.inspection_line_ids: %if index < 13: %endif <% index=index+1 %> %endfor
Inspection PointOKNOT OKComment
${insp.name} ${insp.comment or ''}

Overall Comments:

${task.notes or ''}


STATUS:Safe Not Safe


Technician's Signature %if task.approve_uid: ${ helper.embed_image('png',task.approve_uid.signature_image,235,65)|n } %endif Date${task.completion_date}
%endif %if first_form == False:
CERTIFICATE #
${task.certificate}
${task.equipment_id.name} Inspection Report
CUSTOMER${o.customer_id.name}WORK ORDER #${o.name}

Data: ${task.equipment_id.name} <% index=0 length = len(task.equipment_feature) max=5*3 %> %for feature in task.equipment_feature: %if index < max: %if index and index%3 == 0: %endif <% index=index+1 %> %if ((index == length) and (index%3 != 0)): %for i in range(0, 3-index%3): %endfor %endif %endif %endfor
${feature.name}${feature.value or ''}

<% transposed = [] for i in range(39): transposed.append([]) for j in range(3): transposed[i].append(False) col_i=0 row_i=0 tab_i=0 first = True for point in task.inspection_line_ids: if point.header and not first: if col_i==2: if tab_i == 0: tab_i=20 else: break col_i=0 else: col_i=col_i+1 row_i=0 if row_i < 20: transposed[row_i+tab_i][col_i] = point row_i=row_i+1 first = False index=0 %> %for row in transposed: %if index < 33: %if row[0] and row[0].header: %if row[1]: %if row[2]: %endif %endif %else: %endif %endif <% index=index+1 %> %endfor
${row[0].name}${row[1].name}${row[2].name}
GoodRepairReplace GoodRepairReplace GoodRepairReplace
${row[0] and row[0].name or ''} ${row[1] and row[1].name or ''} ${row[2] and row[2].name or ''}

STATUS:Safe Not Safe


Technician's Signature %if task.approve_uid: ${ helper.embed_image('png',task.approve_uid.signature_image,235,65)|n } %endif Date${task.completion_date}
%endif %endif %if task.type == 'serv':
CERTIFICATE #
${task.certificate}
${task.equipment_id.name} Service Report
CUSTOMER${o.customer_id.name}WORK ORDER #${o.name}

Date${task.completion_date}
Customer${o.customer_id.name}Work Order${o.origin or ''}
Address/Jobsite${o.location}PO #${o.po_number or ''}

Data: ${task.equipment_id.name} <% index=0 length = len(task.equipment_feature) max=5*3 %> %for feature in task.equipment_feature: %if index < max: %if index and index%3 == 0: %endif <% index=index+1 %> %if ((index == length) and (index%3 != 0)): %for i in range(0, 3-index%3): %endfor %endif %endif %endfor
${feature.name}${feature.value or ''}

Description of Work

${task.description or ''}


<% index=0 %> %for part in task.part_line_ids: %if index < 5: %endif <% index=index+1 %> %endfor <% index=0 %> %for labor in task.labor_line_ids: %if index < 5: %endif <% index=index+1 %> %endfor
QTYPart NumberMaterial (Stock)
${part.qty}${part.name}${part.description}
ServicemanHours Shown Include Travel Time
Start TimeFinish TimeReq.O/TD/T
AMPMAMPM
${labor.user_id.name} <% of_hours=int(user.partner_id.tz_offset[0:3]) of_minutes=int(user.partner_id.tz_offset[0] + user.partner_id.tz_offset[3:5]) start_datetime = datetime.strptime(labor.start_date, "%Y-%m-%d %H:%M:%S") + timedelta(hours=of_hours,minutes=of_minutes) %> %if int(start_datetime.strftime("%H")) < 12: ${start_datetime.strftime("%I:%M")} %endif %if int(start_datetime.strftime("%H")) >= 12: ${start_datetime.strftime("%I:%M")} %endif <% end_datetime = datetime.strptime(labor.end_date, "%Y-%m-%d %H:%M:%S") + timedelta(hours=of_hours,minutes=of_minutes) %> %if int(end_datetime.strftime("%H")) < 12: ${end_datetime.strftime("%I:%M")} %endif %if int(end_datetime.strftime("%H")) >= 12: ${end_datetime.strftime("%I:%M")} %endif

JOB COMPLETED: %if task.state == 'done': YES %else: NO %endif FOLLOW UP: %if o.origin: YES %else: NO %endif REPORT REVIEW WITH CUSTOMER: %if o.reviewed: YES %else: NO %endif

Technician's Signature %if task.approve_uid: ${ helper.embed_image('png',task.approve_uid.signature_image,235,65)|n } %endif Date${task.completion_date}
%endif

%endfor %endfor