diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py index 1fdcac9f7c6..bdb0ddbb116 100644 --- a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py @@ -54,8 +54,8 @@ class hr_timesheet_report(osv.osv): min(t.id) as id, l.date as date, to_char(l.date, 'YYYY-MM-DD') as day, - to_char(l.date,'YYYY') as year, - to_char(l.date,'MM') as month, + to_char(l.date, 'YYYY') as year, + to_char(l.date, 'MM') as month, sum(l.amount) as cost, sum(l.unit_amount) as quantity, l.account_id as account_id, diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py index 497fe8da117..0b541f18b3f 100644 --- a/addons/hr_timesheet_sheet/report/timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/timesheet_report.py @@ -46,6 +46,7 @@ class timesheet_report(osv.osv): 'department_id':fields.many2one('hr.department','Department',readonly=True), 'date_from': fields.date('Date from',readonly=True,), 'date_to': fields.date('Date to',readonly=True), + 'date_current': fields.date('Current date', required=True), 'state' : fields.selection([ ('new', 'New'), ('draft','Draft'), @@ -64,6 +65,9 @@ class timesheet_report(osv.osv): htss.name, htss.date_from, htss.date_to, + to_char(htss.date_from, 'YYYY-MM-DD') as day, + to_char(htss.date_from, 'YYYY') as year, + to_char(htss.date_from, 'MM') as month, count(*) as nbr, aal.unit_amount as quantity, aal.amount as cost, @@ -105,6 +109,7 @@ class timesheet_report(osv.osv): htss.id, htss.department_id, htss.user_id + ) """) timesheet_report()