Hemendra Paregi(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-902391-hpa into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #902391 in OpenERP Addons: "hr_attendance web client active_ids"
  https://bugs.launchpad.net/openobject-addons/+bug/902391

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-902391-hpa/+merge/85994

Hello

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

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

Thanks
Hemendra.

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-902391-hpa/+merge/85994
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-902391-hpa.
=== modified file 'hr_attendance/report/attendance_by_month.py'
--- hr_attendance/report/attendance_by_month.py	2011-10-16 01:28:00 +0000
+++ hr_attendance/report/attendance_by_month.py	2011-12-16 06:14:27 +0000
@@ -52,7 +52,7 @@
         if context is None:
             context = {}
         month = datetime(datas['form']['year'], datas['form']['month'], 1)
-        emp_ids = context.get('active_ids', [])
+        emp_ids = datas['active_ids']
         user_xml = ['<month>%s</month>' % _(month2name[month.month]), '<year>%s</year>' % month.year]
         if emp_ids:
             for emp in obj_emp.read(cr, uid, emp_ids, ['name']):
@@ -96,7 +96,7 @@
                     days_xml.append(today_xml)
                     today, tomor = tomor, tomor + one_day
                 user_xml.append(user_repr % '\n'.join(days_xml))
-                
+
         rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee')
         rml_obj=report_sxw.rml_parse(cr, uid, rpt_obj._name,context)
         header_xml = '''
@@ -105,7 +105,7 @@
         <company>%s</company>
         </header>
         ''' % (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)
-       
+
         first_date = str(month)
         som = datetime.strptime(first_date, '%Y-%m-%d %H:%M:%S')
         eom = som + timedelta(int(dy)-1)
@@ -130,7 +130,7 @@
         month=som.month
         month_dict[j]=som.strftime('%B')
         width_dict[j]=cell
-        
+
         while day_diff1>0:
             if month+i<=12:
                 if day_diff1 > lengthmonth(year,i+month): # Not on 30 else you have problems when entering 01-01-2009 for example

=== modified file 'hr_attendance/wizard/hr_attendance_bymonth.py'
--- hr_attendance/wizard/hr_attendance_bymonth.py	2011-01-14 00:11:01 +0000
+++ hr_attendance/wizard/hr_attendance_bymonth.py	2011-12-16 06:14:27 +0000
@@ -38,6 +38,7 @@
     def print_report(self, cr, uid, ids, context=None):
         datas = {
              'ids': [],
+             'active_ids': context['active_ids'],
              'model': 'hr.employee',
              'form': self.read(cr, uid, ids)[0]
         }

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to