Skip to content

Commit

Permalink
Merge pull request #39 from oca-travis/7.0-autofix-script-01-dev-moyl…
Browse files Browse the repository at this point in the history
…op260

[REF] auto-fix conventions
  • Loading branch information
pedrobaeza committed Nov 25, 2014
2 parents 30cd222 + 4c307d7 commit 348505b
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 27 deletions.
4 changes: 2 additions & 2 deletions hr_experience/hr_experience.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
}
Expand Down
16 changes: 8 additions & 8 deletions hr_holidays_extension/hr_holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion hr_language/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
#
###############################################################################

import hr_language
from . import hr_language
8 changes: 6 additions & 2 deletions hr_payroll_extension/hr_payroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
"""
Expand All @@ -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
"""
Expand Down Expand Up @@ -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
"""
Expand Down
8 changes: 4 additions & 4 deletions hr_payroll_period/wizard/payroll_period_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion hr_policy_absence/hr_policy_absence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
6 changes: 3 additions & 3 deletions hr_policy_accrual/hr_policy_accrual.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions hr_resume/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
#
###############################################################################

import hr_resume
import report
from . import hr_resume
from . import report
2 changes: 1 addition & 1 deletion hr_resume/report/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
#
###############################################################################

import report_resume
from . import report_resume
2 changes: 1 addition & 1 deletion hr_skill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
#
###############################################################################

import hr_skill
from . import hr_skill

0 comments on commit 348505b

Please sign in to comment.