From 45226a3e1671d07dc5c1ec5f49c8355a229307c2 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Wed, 10 Sep 2008 12:20:29 +0530 Subject: [PATCH] formatted report of hr, hr_expense and hr_timesheet_invoice module. bzr revid: solanki.priyesh@gmail.com-20080910065029-5i29sfktrmvba1e1 --- addons/hr/report/attendance_errors.rml | 243 ++++--- addons/hr_expense/report/expense.rml | 288 ++++++--- .../report/account_analytic_profit.rml | 598 +++++++++++------- 3 files changed, 702 insertions(+), 427 deletions(-) diff --git a/addons/hr/report/attendance_errors.rml b/addons/hr/report/attendance_errors.rml index c81da90c57b..ee0e0a24c93 100644 --- a/addons/hr/report/attendance_errors.rml +++ b/addons/hr/report/attendance_errors.rml @@ -2,7 +2,7 @@ @@ -10,141 +10,184 @@ - + - - - + + + + + + - + - - + + + + + + + + + + + + + - + - - - - - - + + + + + + - + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + [[ repeatIn(objects,'o') ]] + HR Expenses [[ o.name or '' ]] + + + + Employee: [[ o.employee_id.name ]] + Date: [[ time.strftime('%d/%m/%Y', time.strptime(o.date, '%Y-%m-%d')) ]] + Reference: [[ o.ref ]] + + + + - Report - From: [[ data['form']['init_date'] ]] - To: [[ data['form']['end_date'] ]] + Date - Attendance Errors + Name - Date Printed: - [[ time.strftime('%Y/%m/%d') ]] + Ref. + + + Unit price + + + Qty + + + Total - + + + + [[ repeatIn(o.line_ids,'line') ]] + + + + [[ time.strftime('%d/%m/%Y', time.strptime(line.date_value, '%Y-%m-%d')) or '' ]] + + + [[ line.name or '' ]][[ line.description or '' ]] + + + [[ line.ref or '' ]] + + + [[ '%.2f' % line.unit_amount or '' ]] + + + [[ '%.2f' % line.unit_quantity or '' ]] + + + [[ '%.2f' % line.total_amount or '' ]][[ company.currency_id.name ]] + + + + + + + + + + + + + + + Total: + + + [[ '%.2f' % o.amount ]][[ company.currency_id.name ]] + + + + -
- [[ repeatIn(objects, 'employee') ]] - - - - [[ employee.name ]] - - - - - - - Operation - - - Date Signed - - - Date Recorded - - - Delay - - - Avg Delay - - - - - [[repeatIn(lst(employee.id,data['form']['init_date'], data['form']['end_date'], data['form']['max_delay']), 'att') ]] [[att['action'] ]] - - - [[ att['date'] ]] - - - [[ att['create_date'] ]] - - - [[ att['delay'] ]] - - - [[ att['delay2'] ]] - - - - - - - Total period: - - - - [[total(employee.id,data['form']['init_date'], data['form']['end_date'], data['form']['max_delay'])[0] ]] - - - - - [[total(employee.id,data['form']['init_date'], data['form']['end_date'], data['form']['max_delay'])[1] ]] - - - - - - - -
- + [[ o.note or '' ]][[ setTag('para','xpre') ]] + - (*) A positive delay means that the employee worked less than recorded. - (*) A negative delay means that the employee worked more than encoded. + Certified honest and conform, + (Date and signature) + + + + + + + This document must be dated and signed for reimbursment
- diff --git a/addons/hr_expense/report/expense.rml b/addons/hr_expense/report/expense.rml index 239b3cbeea8..f42dfb11761 100644 --- a/addons/hr_expense/report/expense.rml +++ b/addons/hr_expense/report/expense.rml @@ -2,7 +2,7 @@ @@ -10,39 +10,110 @@ - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + @@ -51,118 +122,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + - [[ repeatIn(objects,'o') ]] + [[ repeatIn(objects,'o') ]] + HR Expenses [[ o.name or '' ]] - HR Expenses [[ o.name or '' ]] + Employee: [[ o.employee_id.name ]] + Date: [[ time.strftime('%d/%m/%Y', time.strptime(o.date, '%Y-%m-%d')) ]] + Reference: [[ o.ref ]] - Employee: [[ o.employee_id.name ]] - Date: [[time.strftime('%d/%m/%Y', time.strptime(o.date, '%Y-%m-%d'))]] - Reference: [[o.ref]] - - - - + - Date + Date - Name + Name - Reference + Ref. - Unit price + Unit price - Quantities + Qty - Total - - - - - [[ repeatIn(o.line_ids,'line') ]] - [[ time.strftime('%d/%m/%Y', time.strptime(line.date_value, '%Y-%m-%d')) or '' ]] - - - [[ line.name or '']] - [[ line.description or '']] - - - [[ line.ref or '']] - - - [[ '%.2f' % line.unit_amount or '']] - - - [[ '%.2f' % line.unit_quantity or '']] - - - [[ '%.2f' % line.total_amount or '' ]] [[company.currency_id.name ]] + Total - - - - - - - + - + [[ repeatIn(o.line_ids,'line') ]] + + + + [[ time.strftime('%d/%m/%Y', time.strptime(line.date_value, '%Y-%m-%d')) or '' ]] + + + [[ line.name or '' ]][[ line.description or '' ]] + + + [[ line.ref or '' ]] + + + + + + + + + + + + + + + + + + + + [[ '%.2f' % line.unit_amount or '' ]] + + + [[ '%.2f' % line.unit_quantity or '' ]] + + + [[ '%.2f' % line.total_amount or '' ]] + + + [[ company.currency_id.name ]] + + + + + + + + + + - Total: + Total: - [[ '%.2f' % o.amount ]] [[ company.currency_id.name ]] + [[ '%.2f' % o.amount ]] + + + [[ company.currency_id.name ]] - + - [[ o.note or '' ]] [[ setTag('para','xpre') ]] - + [[ o.note or '' ]][[ setTag('para','xpre') ]] + - Certified honest and conform, - (Date and signature) - + Certified honest and conform, + (Date and signature) + - + - - - - - - - - - - - - - - - - This document must be dated and signed for reimbursment + This document must be dated and signed for reimbursment - diff --git a/addons/hr_timesheet_invoice/report/account_analytic_profit.rml b/addons/hr_timesheet_invoice/report/account_analytic_profit.rml index f3be0f31da3..0fc27c8c1a1 100644 --- a/addons/hr_timesheet_invoice/report/account_analytic_profit.rml +++ b/addons/hr_timesheet_invoice/report/account_analytic_profit.rml @@ -1,236 +1,368 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[[ company.name ]] - - -Invoice rate by user - - -Period from [[ data['form']['date_from'] ]] -to [[ data['form']['date_to'] ]] -Currency: [[ company.currency_id.name ]] - - - - - - - - - -Employee - - - - - - - -Units - - -Theorical - - -Income - - -Cost - - -Profit - - -Eff. - - - - - - -
-[[ repeatIn(user_ids(lines(data['form'])), 'e') ]] -[[ e.name ]] - - - -[[ repeatIn(journal_ids(data['form'], e.id), 'j') ]] -[[ j.name ]] - - - - - - - - - - -[[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], [j.id], [e.id]), 0)]] - - -[[ reduce(lambda x, y: x+y['amount_th'], line(data['form'], [j.id], [e.id]), 0) ]] - - -[[ reduce(lambda x, y: x+y['amount'], line(data['form'], [j.id], [e.id]), 0) ]] - - -[[ reduce(lambda x, y: x+y['cost'], line(data['form'], [j.id], [e.id]), 0) ]] - - -[[ reduce(lambda x, y: x+y['profit'], line(data['form'], [j.id], [e.id]), 0)]] - - -[[ '%d' % (-reduce(lambda x, y: x+y['amount'], line(data['form'], [j.id], [e.id]), 0) / reduce(lambda x, y: x+y['cost'], line(data['form'], [j.id], [e.id]), 0) * 100.0,)]] % - - - - - -[[ repeatIn(line(data['form'], [j.id], [e.id]), 'l') ]] -[[ l['name'] ]] - - -[[ l['unit_amount'] ]] - - -[[ l['amount_th'] ]] - - -[[ l['amount'] ]] - - -[[ l['cost'] ]] - - -[[ l['profit'] ]] - - -[[ l['eff'] ]] % - - - - - - -
- - - -Totals - - - - - - - - - - -[[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] - - - - - - - -[[ reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] - - -[[ reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] - - -[[ reduce(lambda x, y: x+y['profit'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] - - -[[ '%d' % (-reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)/reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)* 100, )]] % - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invoice rate by user + + + + + + + + + + + + + + + + + + Period from startdate + + + Period to enddate + + + Currency + + + + + + + [[ data['form']['date_from'] ]] + + + [[ data['form']['date_to'] ]] + + + [[ company.currency_id.name ]] + + + + + + + + + + + + + Employee + + + + + + + + Units + + + Theorical + + + Income + + + Cost + + + Profit + + + Eff. + + + + + + +
+ [[ repeatIn(user_ids(lines(data['form'])), 'e') ]] + + + + [[ e.name ]] + + + + + [[ repeatIn(journal_ids(data['form'], e.id), 'j') ]] + [[ j.name ]] + + + + + + + + + [[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], [j.id], [e.id]), 0) ]] + + + [[ reduce(lambda x, y: x+y['amount_th'], line(data['form'], [j.id], [e.id]), 0) ]] + + + [[ reduce(lambda x, y: x+y['amount'], line(data['form'], [j.id], [e.id]), 0) ]] + + + [[ reduce(lambda x, y: x+y['cost'], line(data['form'], [j.id], [e.id]), 0) ]] + + + [[ reduce(lambda x, y: x+y['profit'], line(data['form'], [j.id], [e.id]), 0) ]] + + + [[ '%d' % (reduce(lambda x, y: x+y['amount'], line(data['form'], [j.id], [e.id]), 0) / reduce(lambda x, y: x+y['cost'], line(data['form'], [j.id], [e.id]), 0) * 100.0,)]] % + + + + + [[ repeatIn(line(data['form'], [j.id], [e.id]), 'l') ]] + [[ l['name'] ]] + + + [[ l['unit_amount'] ]] + + + [[ l['amount_th'] ]] + + + [[ l['amount'] ]] + + + [[ l['cost'] ]] + + + [[ l['profit'] ]] + + + [[ l['eff'] ]] % + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Totals + + + + + + + + + + + [[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] + + + + + + + + [[ reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] + + + [[ reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] + + + [[ reduce(lambda x, y: x+y['profit'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]] + + + [[ round(reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)/reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)* -100, 2)]] % + + + + + + + + + + + + +
+
+
-