bzr revid: mra@mra-laptop-20101027131019-mx6r2q7fgpnkh0sb
This commit is contained in:
Mustufa Rangwala 2010-10-27 18:40:19 +05:30
parent b2d68ddd42
commit 17a5fd4ee8
3 changed files with 8 additions and 10 deletions

View File

@ -604,7 +604,7 @@ class event_registration(osv.osv):
@param event_id: Event ID
@param partner_invoice_id: Partner Invoice ID
"""
context={}
context = {}
if not event_id:
return {'value': {'unit_price': False, 'event_product': False}}

View File

@ -216,12 +216,12 @@ class hr_holidays(osv.osv):
def onchange_type(self, cr, uid, ids, holiday_type):
result = {}
if holiday_type=='employee':
if holiday_type == 'employee':
ids_employee = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
if ids_employee:
result['value'] = {
'employee_id': ids_employee[0]
}
}
return result
def _get_number_of_days(self, date_from, date_to):
@ -314,8 +314,7 @@ class hr_holidays(osv.osv):
vals['manager_id'] = ids2[0]
else:
raise osv.except_osv(_('Warning !'),_('No user related to the selected employee.'))
self.write(cr, uid, ids, vals)
return True
return self.write(cr, uid, ids, vals)
def holidays_validate(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee')
@ -399,8 +398,7 @@ class hr_holidays(osv.osv):
return True
def holidays_draft(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'draft'})
return True
return self.write(cr, uid, ids, {'state': 'draft'})
def check_holidays(self, cr, uid, ids):
holi_status_obj = self.pool.get('hr.holidays.status')
@ -474,4 +472,4 @@ class resource_calendar_leaves(osv.osv):
resource_calendar_leaves()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -55,6 +55,7 @@ class hr_contract_wage_type(osv.osv):
_columns = {
'type': fields.selection([('basic','Basic'), ('gross','Gross'), ('net','Net')], 'Type', required=True),
}
hr_contract_wage_type()
class hr_passport(osv.osv):
@ -121,8 +122,7 @@ class hr_payroll_structure(osv.osv):
'code':code+"(copy)",
'company_id':self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
}
res_id = super(hr_payroll_structure, self).copy(cr, uid, id, default, context=context)
return res_id
return super(hr_payroll_structure, self).copy(cr, uid, id, default, context=context)
hr_payroll_structure()