open-synergy/opnsynid-hr

View on GitHub

Showing 547 of 547 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        self.user_8 = self.obj_user.sudo().create(
            {
                "login": "user.8",
                "name": "User 8",
                "password": "a",
Severity: Major
Found in hr_payslip_security/tests/base.py and 2 other locations - About 3 hrs to fix
hr_payslip_security/tests/base.py on lines 151..171
hr_payslip_security/tests/base.py on lines 205..225

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 67.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        self.user_4 = self.obj_user.sudo().create(
            {
                "login": "user.4",
                "name": "User 4",
                "password": "a",
Severity: Major
Found in hr_payslip_security/tests/base.py and 2 other locations - About 3 hrs to fix
hr_payslip_security/tests/base.py on lines 151..171
hr_payslip_security/tests/base.py on lines 325..345

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 67.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        self.user_2 = self.obj_user.sudo().create(
            {
                "login": "user.2",
                "name": "User 2",
                "password": "a",
Severity: Major
Found in hr_payslip_security/tests/base.py and 2 other locations - About 3 hrs to fix
hr_payslip_security/tests/base.py on lines 205..225
hr_payslip_security/tests/base.py on lines 325..345

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 67.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

hr_employee_training/models/hr_training_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_method.py on lines 0..20
hr_employee_training/models/hr_training_participant_type.py on lines 0..20
hr_employee_training/models/hr_training_purpose.py on lines 0..20
hr_employee_training/models/hr_training_syllabus.py on lines 0..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Severity: Major
Found in hr_employee_training/models/hr_training_syllabus.py and 5 other locations - About 3 hrs to fix
hr_employee_training/models/hr_training_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_method.py on lines 0..20
hr_employee_training/models/hr_training_participant_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_participant_type.py on lines 0..20
hr_employee_training/models/hr_training_purpose.py on lines 0..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Severity: Major
Found in hr_employee_training/models/hr_training_method.py and 5 other locations - About 3 hrs to fix
hr_employee_training/models/hr_training_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_participant_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_participant_type.py on lines 0..20
hr_employee_training/models/hr_training_purpose.py on lines 0..20
hr_employee_training/models/hr_training_syllabus.py on lines 0..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

hr_timesheet_computation_attendance_schedule/models/hr_timesheet_computation_item.py on lines 0..16
hr_timesheet_computation_overtime/models/hr_timesheet_computation_item.py on lines 0..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Severity: Major
Found in hr_employee_training/models/hr_training_cancel_reason.py and 5 other locations - About 3 hrs to fix
hr_employee_training/models/hr_training_method.py on lines 0..20
hr_employee_training/models/hr_training_participant_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_participant_type.py on lines 0..20
hr_employee_training/models/hr_training_purpose.py on lines 0..20
hr_employee_training/models/hr_training_syllabus.py on lines 0..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Severity: Major
Found in hr_employee_training/models/hr_training_participant_type.py and 5 other locations - About 3 hrs to fix
hr_employee_training/models/hr_training_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_method.py on lines 0..20
hr_employee_training/models/hr_training_participant_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_purpose.py on lines 0..20
hr_employee_training/models/hr_training_syllabus.py on lines 0..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Severity: Major
Found in hr_employee_training/models/hr_training_purpose.py and 5 other locations - About 3 hrs to fix
hr_employee_training/models/hr_training_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_method.py on lines 0..20
hr_employee_training/models/hr_training_participant_cancel_reason.py on lines 0..20
hr_employee_training/models/hr_training_participant_type.py on lines 0..20
hr_employee_training/models/hr_training_syllabus.py on lines 0..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

hr_timesheet_computation_holiday/models/hr_timesheet_computation_item.py on lines 0..17
hr_timesheet_computation_overtime/models/hr_timesheet_computation_item.py on lines 0..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

hr_timesheet_computation_attendance_schedule/models/hr_timesheet_computation_item.py on lines 0..16
hr_timesheet_computation_holiday/models/hr_timesheet_computation_item.py on lines 0..17

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

HrOvertimeRequest has 27 functions (exceeds 20 allowed). Consider refactoring.
Open

class HrOvertimeRequest(models.Model):
    _name = "hr.overtime_request"
    _description = "Attendance Overtime Request"
    _inherit = [
        "mail.thread",
Severity: Minor
Found in hr_attendance_overtime_request/models/hr_overtime_request.py - About 3 hrs to fix

    Identical blocks of code found in 5 locations. Consider refactoring.
    Open

        def init(self, cr):
            tools.drop_view_if_exists(cr, self._table)
            # pylint: disable=locally-disabled, sql-injection
            cr.execute(
                """CREATE or REPLACE VIEW %s as (
    gamification_analysis/reports/gamification_goal_analysis.py on lines 100..117
    hr_career_transition/reports/hr_career_transition_analysis.py on lines 140..157
    hr_employee_project_experince_from_user/reports/hr_employee_project_experience_report.py on lines 79..96
    hr_payslip_analysis/reports/hr_payslip_analysis.py on lines 125..142

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 5 locations. Consider refactoring.
    Open

        def init(self, cr):
            tools.drop_view_if_exists(cr, self._table)
            # pylint: disable=locally-disabled, sql-injection
            cr.execute(
                """CREATE or REPLACE VIEW %s as (
    gamification_analysis/reports/gamification_goal_analysis.py on lines 100..117
    hr_employee_project_experince_from_user/reports/hr_employee_project_experience_report.py on lines 79..96
    hr_payslip_analysis/reports/hr_payslip_analysis.py on lines 125..142
    hr_timesheet_computation/reports/hr_timesheet_computation_analysis.py on lines 110..127

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 5 locations. Consider refactoring.
    Open

        def init(self, cr):
            tools.drop_view_if_exists(cr, self._table)
            # pylint: disable=locally-disabled, sql-injection
            cr.execute(
                """CREATE or REPLACE VIEW %s as (
    Severity: Major
    Found in hr_payslip_analysis/reports/hr_payslip_analysis.py and 4 other locations - About 3 hrs to fix
    gamification_analysis/reports/gamification_goal_analysis.py on lines 100..117
    hr_career_transition/reports/hr_career_transition_analysis.py on lines 140..157
    hr_employee_project_experince_from_user/reports/hr_employee_project_experience_report.py on lines 79..96
    hr_timesheet_computation/reports/hr_timesheet_computation_analysis.py on lines 110..127

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 5 locations. Consider refactoring.
    Open

        def init(self, cr):
            tools.drop_view_if_exists(cr, self._table)
            # pylint: disable=locally-disabled, sql-injection
            cr.execute(
                """CREATE or REPLACE VIEW %s as (
    Severity: Major
    Found in gamification_analysis/reports/gamification_goal_analysis.py and 4 other locations - About 3 hrs to fix
    hr_career_transition/reports/hr_career_transition_analysis.py on lines 140..157
    hr_employee_project_experince_from_user/reports/hr_employee_project_experience_report.py on lines 79..96
    hr_payslip_analysis/reports/hr_payslip_analysis.py on lines 125..142
    hr_timesheet_computation/reports/hr_timesheet_computation_analysis.py on lines 110..127

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 5 locations. Consider refactoring.
    Open

        def init(self, cr):
            tools.drop_view_if_exists(cr, self._table)
            # pylint: disable=locally-disabled, sql-injection
            cr.execute(
                """CREATE or REPLACE VIEW %s as (
    gamification_analysis/reports/gamification_goal_analysis.py on lines 100..117
    hr_career_transition/reports/hr_career_transition_analysis.py on lines 140..157
    hr_payslip_analysis/reports/hr_payslip_analysis.py on lines 125..142
    hr_timesheet_computation/reports/hr_timesheet_computation_analysis.py on lines 110..127

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 63.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            self.user_10 = self.obj_user.sudo().create(
                {
                    "login": "user.10",
                    "name": "User 10",
                    "password": "a",
    Severity: Major
    Found in hr_payslip_security/tests/base.py and 1 other location - About 2 hrs to fix
    hr_payslip_security/tests/base.py on lines 400..407

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            self.user_11 = self.obj_user.sudo().create(
                {
                    "login": "user.11",
                    "name": "User 11",
                    "password": "a",
    Severity: Major
    Found in hr_payslip_security/tests/base.py and 1 other location - About 2 hrs to fix
    hr_payslip_security/tests/base.py on lines 379..386

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language