~clearcorp-drivers/openerp-hr-payroll-cr/5.0

« back to all changes in this revision

Viewing changes to hr_payroll_cr/hr_payroll_cr.py

  • Committer: Juan Felipe Muñoz
  • Date: 2011-05-04 15:47:36 UTC
  • Revision ID: juan.munoz@clearcorp.co.cr-20110504154736-aj1a8ashy61hxdvk
[FIX] cronjob for vacation acumulator

Show diffs side-by-side

added added

removed removed

Lines of Context:
2283
2283
                        date_start = self.str2date(contract.date_start)
2284
2284
                        debug(today)
2285
2285
                        debug(date_start)
2286
 
                        if today > date_start and today.day == date_start.day:
 
2286
                        if month == 2:
 
2287
                                if  today == 29:
 
2288
                                        a=none
 
2289
                                elif today == 28 and contract_id >= 28:
 
2290
                                        plus_one = contract.accumulated_holidays + 1
 
2291
                                        debug(plus_one)
 
2292
                                        self.pool.get('hr.contract').write(cr, uid, contract_id, {'accumulated_holidays':plus_one}, None)
 
2293
                                elif today > date_start and today.day == date_start.day:
 
2294
                                        plus_one = contract.accumulated_holidays + 1
 
2295
                                        debug(plus_one)
 
2296
                                        self.pool.get('hr.contract').write(cr, uid, contract_id, {'accumulated_holidays':plus_one}, None)
 
2297
                        elif month in months30:
 
2298
                                if today==30 and contract_id >= 30:
 
2299
                                        plus_one = contract.accumulated_holidays + 1
 
2300
                                        debug(plus_one)
 
2301
                                        self.pool.get('hr.contract').write(cr, uid, contract_id, {'accumulated_holidays':plus_one}, None)
 
2302
                                elif today > date_start and today.day == date_start.day:
 
2303
                                        plus_one = contract.accumulated_holidays + 1
 
2304
                                        debug(plus_one)
 
2305
                                        self.pool.get('hr.contract').write(cr, uid, contract_id, {'accumulated_holidays':plus_one}, None)
 
2306
                        
 
2307
                        elif today > date_start and today.day == date_start.day:
2287
2308
                                        plus_one = contract.accumulated_holidays + 1
2288
2309
                                        debug(plus_one)
2289
2310
                                        self.pool.get('hr.contract').write(cr, uid, contract_id, {'accumulated_holidays':plus_one}, None)