From 4c307d727e64cd9d75e6fca97e30afffefcbf69a Mon Sep 17 00:00:00 2001 From: moylop260 Date: Thu, 13 Nov 2014 21:18:36 -0600 Subject: [PATCH] [REF] auto-fix conventions --- hr_experience/hr_experience.py | 4 ++-- hr_holidays_extension/hr_holidays.py | 16 ++++++++-------- hr_language/__init__.py | 2 +- hr_payroll_extension/hr_payroll.py | 8 ++++++-- hr_payroll_period/wizard/payroll_period_end.py | 8 ++++---- hr_policy_absence/hr_policy_absence.py | 2 +- hr_policy_accrual/hr_policy_accrual.py | 6 +++--- .../report/attendance_summary.py | 4 ++-- hr_resume/__init__.py | 4 ++-- hr_resume/report/__init__.py | 2 +- hr_skill/__init__.py | 2 +- 11 files changed, 31 insertions(+), 27 deletions(-) diff --git a/hr_experience/hr_experience.py b/hr_experience/hr_experience.py index 47675d118c2..b4e8c97dcdc 100644 --- a/hr_experience/hr_experience.py +++ b/hr_experience/hr_experience.py @@ -29,8 +29,8 @@ class hr_experience(orm.Model): _columns = { 'category': fields.selection((('professional', 'Professional'), - ('academic', 'Academic'), - ('certification', 'Certification')), + ('academic', 'Academic'), + ('certification', 'Certification')), 'Category', required=True, help='category'), } diff --git a/hr_holidays_extension/hr_holidays.py b/hr_holidays_extension/hr_holidays.py index 150f9437dd2..e7e6f7fae98 100644 --- a/hr_holidays_extension/hr_holidays.py +++ b/hr_holidays_extension/hr_holidays.py @@ -170,14 +170,14 @@ def onchange_bynumber( times = tuple() if (ex_rd and employee.contract_id and employee.contract_id.schedule_template_id): - rest_days = sched_tpl_obj.get_rest_days( - cr, uid, employee.contract_id.schedule_template_id.id, - context=context - ) - times = sched_detail_obj.scheduled_begin_end_times( - cr, uid, employee.id, - employee.contract_id.id, dt, - context=context) + rest_days = sched_tpl_obj.get_rest_days( + cr, uid, employee.contract_id.schedule_template_id.id, + context=context + ) + times = sched_detail_obj.scheduled_begin_end_times( + cr, uid, employee.id, + employee.contract_id.id, dt, + context=context) if len(times) > 0: utcdtStart = times[0][0] else: diff --git a/hr_language/__init__.py b/hr_language/__init__.py index 2c22f12a446..38581515dcc 100644 --- a/hr_language/__init__.py +++ b/hr_language/__init__.py @@ -19,4 +19,4 @@ # ############################################################################### -import hr_language +from . import hr_language diff --git a/hr_payroll_extension/hr_payroll.py b/hr_payroll_extension/hr_payroll.py index e3e331b760f..b86adea9bd6 100644 --- a/hr_payroll_extension/hr_payroll.py +++ b/hr_payroll_extension/hr_payroll.py @@ -30,6 +30,7 @@ class last_X_days: + """Last X Days Keeps track of the days an employee worked/didn't work in the last X days. @@ -301,9 +302,9 @@ def leaves_list_init( 'code': leave.holiday_status_id.code, 'tz': tz, 'start': utc.localize(datetime.strptime(leave.date_from, - OE_DATETIMEFORMAT)), + OE_DATETIMEFORMAT)), 'end': utc.localize(datetime.strptime(leave.date_to, - OE_DATETIMEFORMAT)) + OE_DATETIMEFORMAT)) }) return res @@ -966,6 +967,7 @@ def __getattr__(self, attr): return attr in self.dict and self.dict.__getitem__(attr) or 0.0 class InputLine(BrowsableObject): + """a class that will be used into the python code, mainly for usability purposes """ @@ -986,6 +988,7 @@ def sum(self, code, from_date, to_date=None): return res or 0.0 class WorkedDays(BrowsableObject): + """a class that will be used into the python code, mainly for usability purposes """ @@ -1014,6 +1017,7 @@ def sum_hours(self, code, from_date, to_date=None): return res and res[1] or 0.0 class Payslips(BrowsableObject): + """a class that will be used into the python code, mainly for usability purposes """ diff --git a/hr_payroll_period/wizard/payroll_period_end.py b/hr_payroll_period/wizard/payroll_period_end.py index 57d5ca94872..8d055d088f3 100644 --- a/hr_payroll_period/wizard/payroll_period_end.py +++ b/hr_payroll_period/wizard/payroll_period_end.py @@ -602,7 +602,7 @@ def _get_confirmed_amendments(self, cr, uid, context=None): ('pay_period_id', '=', period_id), ('state', 'in', ['validate']), ], context=context - ) + ) return psa_ids def _get_draft_amendments(self, cr, uid, context=None): @@ -975,14 +975,14 @@ def create_payslip_runs( '|', ('department_id.id', '=', dept.id), ('employee_id.department_id.id', '=', dept.id) - ], context=context) + ], context=context) c2_ids = contract_obj.search( cr, uid, [ ('id', 'in', contract_ids), '|', ('job_id.department_id.id', '=', dept.id), ('end_job_id.department_id.id', '=', dept.id), - ], context=context) + ], context=context) for i in c2_ids: if i not in c_ids: c_ids.append(i) @@ -1093,7 +1093,7 @@ def create_payslip_runs( for x in slip_data['value'].get( 'worked_days_line_ids', False) - ], + ], 'date_from': date_start, 'date_to': date_end } diff --git a/hr_policy_absence/hr_policy_absence.py b/hr_policy_absence/hr_policy_absence.py index 370db66921e..5bf58b96020 100644 --- a/hr_policy_absence/hr_policy_absence.py +++ b/hr_policy_absence/hr_policy_absence.py @@ -58,7 +58,7 @@ def unpaid_codes(self, cr, uid, idx, context=None): [res.append((line.code, line.name)) for line in self.browse( cr, uid, idx, context=context - ).line_ids if line.type == 'unpaid'] + ).line_ids if line.type == 'unpaid'] return res diff --git a/hr_policy_accrual/hr_policy_accrual.py b/hr_policy_accrual/hr_policy_accrual.py index e52e5827494..9d4ddd6a4da 100644 --- a/hr_policy_accrual/hr_policy_accrual.py +++ b/hr_policy_accrual/hr_policy_accrual.py @@ -350,7 +350,7 @@ class hr_policy_line(orm.Model): 'hr.accrual', 'Accrual Account', required=True), 'type': fields.selection([ ('standard', 'Standard'), ('calendar', 'Calendar') - ], 'Type', required=True), + ], 'Type', required=True), 'balance_on_payslip': fields.boolean( 'Display Balance on Pay Slip', help='The pay slip report must be modified to display this accrual' @@ -360,7 +360,7 @@ class hr_policy_line(orm.Model): ('weekly', 'Weekly'), ('monthly', 'Monthly'), ('annual', 'Annual'), - ], + ], 'Calculation Frequency', required=True), 'frequency_on_hire_date': fields.boolean( 'Frequency Based on Hire Date'), @@ -398,7 +398,7 @@ class hr_policy_line(orm.Model): ('10', 'October'), ('11', 'November'), ('12', 'December'), - ], 'Month'), + ], 'Month'), 'frequency_annual_day': fields.selection([ ('1', '1'), ('2', '2'), ('3', '3'), ( '4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), diff --git a/hr_report_payroll_attendance_summary/report/attendance_summary.py b/hr_report_payroll_attendance_summary/report/attendance_summary.py index 38f6d3f72db..834eab44a76 100644 --- a/hr_report_payroll_attendance_summary/report/attendance_summary.py +++ b/hr_report_payroll_attendance_summary/report/attendance_summary.py @@ -71,7 +71,7 @@ def get_employee_list(self, department_id): '|', ('department_id.id', '=', department_id), ('saved_department_id.id', '=', department_id) - ]) + ]) ees = ee_obj.browse(self.cr, self.uid, ee_ids) return ees @@ -88,7 +88,7 @@ def get_employee_data(self, department_id): '|', ('department_id.id', '=', department_id), ('saved_department_id.id', '=', department_id) - ]) + ]) for ee in ee_obj.browse(self.cr, self.uid, ee_ids): datas = [] for c in ee.contract_ids: diff --git a/hr_resume/__init__.py b/hr_resume/__init__.py index 41f520dc955..f29b7f0f51b 100644 --- a/hr_resume/__init__.py +++ b/hr_resume/__init__.py @@ -19,5 +19,5 @@ # ############################################################################### -import hr_resume -import report +from . import hr_resume +from . import report diff --git a/hr_resume/report/__init__.py b/hr_resume/report/__init__.py index bd495a322c3..e2e76ea7d1b 100644 --- a/hr_resume/report/__init__.py +++ b/hr_resume/report/__init__.py @@ -19,4 +19,4 @@ # ############################################################################### -import report_resume +from . import report_resume diff --git a/hr_skill/__init__.py b/hr_skill/__init__.py index b9df2227ba5..6d448c43ba0 100644 --- a/hr_skill/__init__.py +++ b/hr_skill/__init__.py @@ -19,4 +19,4 @@ # ############################################################################### -import hr_skill +from . import hr_skill