From 17a5fd4ee8d9e38e6e94308487f41a0fe2ca88e9 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 27 Oct 2010 18:40:19 +0530 Subject: [PATCH] [REF] bzr revid: mra@mra-laptop-20101027131019-mx6r2q7fgpnkh0sb --- addons/event/event.py | 2 +- addons/hr_holidays/hr_holidays.py | 12 +++++------- addons/hr_payroll/hr_payroll.py | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/addons/event/event.py b/addons/event/event.py index 9951228ef85..d77f3a040fa 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -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}} diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index e8ddc1249a8..b2b4c52865e 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -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: \ No newline at end of file diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index c93d0df83a0..77afdf15676 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -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()