diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2008-11-20 16:38:25 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2008-11-20 16:38:25 +0100 |
| commit | d126387243ff9ecc5f295083dde0a0e2f5a33b1f (patch) | |
| tree | 30e8f59a3195479e6182d04e2d64927e39b9f8a7 /addons | |
| parent | 1557e18e44d6124d8a88e5e249b38ba58149da1d (diff) | |
[FIX] use string instead of numeric format for day of week
lp bug: https://launchpad.net/bugs/289035 fixed
bzr revid: christophe@tinyerp.com-20081120153825-ksfmm1rtrr359c6c
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr/hr.py | 2 | ||||
| -rw-r--r-- | addons/hr/report/bymonth.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 5324470e4b5..bd403ce2c42 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -45,7 +45,7 @@ class hr_timesheet_group(osv.osv): cycle = 0 result = [] while todo>0: - cr.execute('select hour_from,hour_to from hr_timesheet where dayofweek=%s and tgroup_id=%d order by hour_from', (dt_from.day_of_week,id)) + cr.execute("select hour_from,hour_to from hr_timesheet where dayofweek='%s' and tgroup_id=%d order by hour_from", (dt_from.day_of_week,id)) for (hour_from,hour_to) in cr.fetchall(): h1,m1 = map(int,hour_from.split(':')) h2,m2 = map(int,hour_to.split(':')) diff --git a/addons/hr/report/bymonth.py b/addons/hr/report/bymonth.py index a2f05b75e2e..98a613608b1 100644 --- a/addons/hr/report/bymonth.py +++ b/addons/hr/report/bymonth.py @@ -94,14 +94,14 @@ class report_custom(report_rml): inner join (hr_timesheet_group as g inner join hr_timesheet_employee_rel as rel on rel.tgroup_id = g.id and rel.emp_id = %s) on t.tgroup_id = g.id - where dayofweek = %s + where dayofweek = '%s' and date_from = (select max(date_from) from hr_timesheet inner join (hr_timesheet_employee_rel inner join hr_timesheet_group on hr_timesheet_group.id = hr_timesheet_employee_rel.tgroup_id and hr_timesheet_employee_rel.emp_id = %s) on hr_timesheet.tgroup_id = hr_timesheet_group.id - where dayofweek = %s and date_from <= '%s') + where dayofweek = '%s' and date_from <= '%s') order by date_from desc ''' isPH = False |
