Merge lp:~red15/openobject-addons/small-fixes-5.0 into lp:openobject-addons/5.0

Proposed by Niels Huylebroeck
Status: Merged
Merged at revision: not available
Proposed branch: lp:~red15/openobject-addons/small-fixes-5.0
Merge into: lp:openobject-addons/5.0
Diff against target: None lines
To merge this branch: bzr merge lp:~red15/openobject-addons/small-fixes-5.0
Reviewer Review Type Date Requested Status
Fabien (Open ERP) Approve
Review via email: mp+11126@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Niels Huylebroeck (red15) wrote :

Requesting another merge, fixed a problem in hr_holidays where the report would freak out if you entered 01-01-2009 as date.

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

Thanks for your contribution. It has been merged into stable.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_holidays/report/holidays_summary_report.py'
2--- hr_holidays/report/holidays_summary_report.py 2009-03-13 06:25:53 +0000
3+++ hr_holidays/report/holidays_summary_report.py 2009-09-03 14:00:45 +0000
4@@ -130,7 +130,7 @@
5
6 while day_diff1>0:
7 if month+i<=12:
8- if day_diff1>30:
9+ if day_diff1 > lengthmonth(year,i+month)+1: # Not on 30 else you have problems when entering 01-01-2009 for example
10 som1=datetime.date(year,month+i,1)
11 date_xml += ['<dayy number="%d" name="%s" cell="%d"/>' % (x, som1.replace(day=x).strftime('%a'),cell+x) for x in range(1, lengthmonth(year,i+month)+1)]
12 i=i+1