Merge lp:~openerp-dev/openobject-addons/trunk-bug-902391-hpa into lp:openobject-addons

Proposed by Hemendra Paregi (OpenERP)
Status: Merged
Merged at revision: 6174
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-902391-hpa
Merge into: lp:openobject-addons
Diff against target: 51 lines (+5/-4)
2 files modified
hr_attendance/report/attendance_by_month.py (+4/-4)
hr_attendance/wizard/hr_attendance_bymonth.py (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-902391-hpa
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+85994@code.launchpad.net

Description of the change

Hello

=============hr_attendance==================

       -> passed correct active_ids in report/attendance_by_month.py" --fixes=lp:902391

Thanks
Hemendra.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_attendance/report/attendance_by_month.py'
2--- hr_attendance/report/attendance_by_month.py 2011-10-16 01:28:00 +0000
3+++ hr_attendance/report/attendance_by_month.py 2011-12-16 06:14:27 +0000
4@@ -52,7 +52,7 @@
5 if context is None:
6 context = {}
7 month = datetime(datas['form']['year'], datas['form']['month'], 1)
8- emp_ids = context.get('active_ids', [])
9+ emp_ids = datas['active_ids']
10 user_xml = ['<month>%s</month>' % _(month2name[month.month]), '<year>%s</year>' % month.year]
11 if emp_ids:
12 for emp in obj_emp.read(cr, uid, emp_ids, ['name']):
13@@ -96,7 +96,7 @@
14 days_xml.append(today_xml)
15 today, tomor = tomor, tomor + one_day
16 user_xml.append(user_repr % '\n'.join(days_xml))
17-
18+
19 rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee')
20 rml_obj=report_sxw.rml_parse(cr, uid, rpt_obj._name,context)
21 header_xml = '''
22@@ -105,7 +105,7 @@
23 <company>%s</company>
24 </header>
25 ''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name)
26-
27+
28 first_date = str(month)
29 som = datetime.strptime(first_date, '%Y-%m-%d %H:%M:%S')
30 eom = som + timedelta(int(dy)-1)
31@@ -130,7 +130,7 @@
32 month=som.month
33 month_dict[j]=som.strftime('%B')
34 width_dict[j]=cell
35-
36+
37 while day_diff1>0:
38 if month+i<=12:
39 if day_diff1 > lengthmonth(year,i+month): # Not on 30 else you have problems when entering 01-01-2009 for example
40
41=== modified file 'hr_attendance/wizard/hr_attendance_bymonth.py'
42--- hr_attendance/wizard/hr_attendance_bymonth.py 2011-01-14 00:11:01 +0000
43+++ hr_attendance/wizard/hr_attendance_bymonth.py 2011-12-16 06:14:27 +0000
44@@ -38,6 +38,7 @@
45 def print_report(self, cr, uid, ids, context=None):
46 datas = {
47 'ids': [],
48+ 'active_ids': context['active_ids'],
49 'model': 'hr.employee',
50 'form': self.read(cr, uid, ids)[0]
51 }

Subscribers

People subscribed via source and target branches

to all changes: