~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:13:30 UTC
  • Revision ID: juan.munoz@clearcorp.co.cr-20110504151330-5a7cng1xllhd5x7a
[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 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:
 
2286
                        if today > date_start and today.day == date_start.day:
2308
2287
                                        plus_one = contract.accumulated_holidays + 1
2309
2288
                                        debug(plus_one)
2310
2289
                                        self.pool.get('hr.contract').write(cr, uid, contract_id, {'accumulated_holidays':plus_one}, None)