Rucha (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-configuration-rework-fixes-rpa into 
lp:~openerp-dev/openobject-addons/trunk-configuration-rework.

Requested reviews:
  qdp (OpenERP) (qdp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configuration-rework-fixes-rpa/+merge/65494

fixed warning for remaining leaves at the time of installation of hr_holidays
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configuration-rework-fixes-rpa/+merge/65494
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-configuration-rework.
=== modified file 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py	2011-06-10 10:27:23 +0000
+++ hr_holidays/hr_holidays.py	2011-06-22 13:11:45 +0000
@@ -349,10 +349,6 @@
         return True
 
    def _get_remaining_days(self, cr, uid, ids, name, args, context=None):
-        type_obj = self.pool.get('hr.holidays.status')
-        status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
-        if len(status_ids) != 1 :
-            raise osv.except_osv(_('Warning !'),_("You should have only one leave type without the option 'Allow to Override Limit' set. (%s Found).") % (len(status_ids)))
         cr.execute("SELECT sum(h.number_of_days_temp) as days, h.employee_id from hr_holidays h join hr_holidays_status s on (s.id=h.holiday_status_id) where h.type='add' and h.state='validate' and s.limit=False group by h.employee_id")
         res = cr.dictfetchall()
         remaining = {}

_______________________________________________
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