Showing 88 of 547 total issues
Function check_sign_in_out
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_sign_in_out(self, row, column, line_num, sign_in_code, sign_out_code):
Function search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def search(self, args, offset=0, limit=None, order=None, count=False):
Function search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def search(self, args, offset=0, limit=None, order=None, count=False):
Function check_datetime
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_datetime(self, row, date_format, time_format, column, line_num):
Function _prepare_fine_move_line
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _prepare_fine_move_line(self, name, debit, credit, account_id, partner_id):
Function _compute_triggering_attendance_id
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _compute_triggering_attendance_id(self):
for attendance in self:
attendance.triggering_attendance_id = False
if attendance.action == "sign_in":
attendance.triggering_attendance_id = attendance.id
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_birthday_list
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_birthday_list(self, employee_ids):
self.ensure_one()
employee_birtday_list = []
date_start_conv, date_end_conv = self._compute_date_offset()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function import_data
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def import_data(self):
# Variable Object
obj_payslip_run = self.env["hr.payslip.run"]
# Get Payslip Run ID
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _prepare_write_data
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _prepare_write_data(self):
self.ensure_one()
list_participant = []
for employee in self.employee_ids:
criteria = [
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_test
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _check_test(self):
if not self._do_check():
return True
prev_attns = self._get_prev_attendance()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _compute_real_start
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _compute_real_start(self):
for overtime in self:
overtime.real_date_start = False
if not overtime.start_attendance_id or not overtime.date_start:
continue
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function button_import
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def button_import(self):
self.ensure_one()
obj_hr_attendance = self.env["hr.attendance"]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _compute_work_longetivity
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _compute_work_longetivity(self):
for document in self:
year_work = month_work = 0
if document.date_join:
if not document.date_termination:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_holidays_sequence
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_holidays_sequence(self):
self.ensure_one()
context = self._context
default_type = context.get("default_type", False)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function unlink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def unlink(self):
strWarning = _("You can only delete data on draft state")
for document in self:
if document.state != "draft":
if not self.env.context.get("force_unlink", False):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _create_participant_evaluation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _create_participant_evaluation(self):
self.ensure_one()
obj_evaluation = self.env["hr.training_participant_evaluation"]
for participant in self.partisipant_ids:
for evaluation in self.evaluation_ids:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_session_close
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_session_close(self):
strWarning = _("There are unfinished session(s)")
if self.state == "finish":
for session in self.session_ids:
if session.state not in ["finish", "cancel"]:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_min_max_grade
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_min_max_grade(self):
obj_jg = self.env["hr.job_grade"]
job_grade_ids = obj_jg.search([]).ids
msg = _("Wrong Max Min Grade")
for jf in self:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function unlink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def unlink(self):
strWarning = _("You can only delete data on draft state")
for document in self:
if document.state != "draft":
if not self.env.context.get("force_unlink", False):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _compute_current_contract
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _compute_current_contract(self):
for employee in self:
contract = False
if employee.contract_ids:
contracts = employee.contract_ids.sorted(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"