open-synergy/opnsynid-hr

View on GitHub

Showing 547 of 547 total issues

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

    @api.multi
    @api.depends("job_id")
    def _compute_job_grade(self):
        for employee in self:
            result = False
Severity: Major
Found in hr_job_family_modelling/models/hr_employee.py and 3 other locations - About 2 hrs to fix
hr_career_transition_job_family/models/hr_career_transition.py on lines 11..18
hr_employee_job_family_from_contract/models/hr_contract.py on lines 11..18
hr_job_family_modelling/models/hr_job.py on lines 11..18

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 52.

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 4 locations. Consider refactoring.
Open

    @api.multi
    @api.depends("job_family_level_id")
    def _compute_job_grade(self):
        for job in self:
            result = False
Severity: Major
Found in hr_job_family_modelling/models/hr_job.py and 3 other locations - About 2 hrs to fix
hr_career_transition_job_family/models/hr_career_transition.py on lines 11..18
hr_employee_job_family_from_contract/models/hr_contract.py on lines 11..18
hr_job_family_modelling/models/hr_employee.py on lines 11..18

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_termination_transition/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_attendance_overtime_request/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 4 locations. Consider refactoring.
Open

    @api.multi
    @api.depends("new_job_id")
    def _compute_job_grade(self):
        for transition in self:
            result = False
hr_employee_job_family_from_contract/models/hr_contract.py on lines 11..18
hr_job_family_modelling/models/hr_employee.py on lines 11..18
hr_job_family_modelling/models/hr_job.py on lines 11..18

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 52.

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 15 locations. Consider refactoring.
Open

hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_award/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_join_transition/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_timesheet_attendance_schedule/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_promotion_transition/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 4 locations. Consider refactoring.
Open

    @api.multi
    @api.depends("job_id")
    def _compute_job_grade(self):
        for contract in self:
            result = False
Severity: Major
Found in hr_employee_job_family_from_contract/models/hr_contract.py and 3 other locations - About 2 hrs to fix
hr_career_transition_job_family/models/hr_career_transition.py on lines 11..18
hr_job_family_modelling/models/hr_employee.py on lines 11..18
hr_job_family_modelling/models/hr_job.py on lines 11..18

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_payslip_multiple_approval/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_mutation_transition/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_expense_tier_validation/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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 15 locations. Consider refactoring.
Open

Severity: Major
Found in hr_expense_tier_validation/models/tier_definition.py and 14 other locations - About 2 hrs to fix
hr_assignment_transition/models/tier_definition.py on lines 0..16
hr_attendance_overtime_request/models/tier_definition.py on lines 0..15
hr_attendance_overtime_request_tier_validation/models/tier_definition.py on lines 0..15
hr_award/models/tier_definition.py on lines 0..15
hr_demotion_transition/models/tier_definition.py on lines 0..16
hr_dicipline/models/tier_definition.py on lines 0..15
hr_join_transition/models/tier_definition.py on lines 0..16
hr_mutation_transition/models/tier_definition.py on lines 0..16
hr_payslip_multiple_approval/models/tier_definition.py on lines 0..15
hr_promotion_transition/models/tier_definition.py on lines 0..16
hr_termination_transition/models/tier_definition.py on lines 0..16
hr_timesheet_attendance_schedule/models/tier_definition.py on lines 0..15
hr_timesheet_sheet_multiple_approval/models/tier_definition.py on lines 0..15
hr_timesheet_tier_validation/models/tier_definition.py on lines 0..15

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 52.

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

    state = fields.Selection(
        string="State",
        required=True,
        readonly=True,
        track_visibility="onchange",
Severity: Major
Found in hr_career_transition/models/hr_career_transition.py and 1 other location - About 2 hrs to fix
hr_recruitment_request/models/hr_recruitment_request.py on lines 136..146

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 52.

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

    @api.model
    def create(self, values):
        _super = super(HrCareerTransition, self)
        result = _super.create(values)
        result.write(
Severity: Major
Found in hr_career_transition/models/hr_career_transition.py and 1 other location - About 2 hrs to fix
hr_recruitment_request/models/hr_recruitment_request.py on lines 329..338

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 52.

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

    state = fields.Selection(
        string="State",
        required=True,
        readonly=True,
        track_visibility="onchange",
Severity: Major
Found in hr_recruitment_request/models/hr_recruitment_request.py and 1 other location - About 2 hrs to fix
hr_career_transition/models/hr_career_transition.py on lines 331..341

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 52.

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

    @api.model
    def create(self, values):
        _super = super(HrRecruitmentRequest, self)
        result = _super.create(values)
        result.write(
Severity: Major
Found in hr_recruitment_request/models/hr_recruitment_request.py and 1 other location - About 2 hrs to fix
hr_career_transition/models/hr_career_transition.py on lines 530..539

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 52.

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 4 locations. Consider refactoring.
Open

    @api.model
    def _default_employee_id(self):
        employees = self.env.user.employee_ids
        if len(employees) > 0:
            employee = employees[0]
hr_award/models/hr_award.py on lines 32..37
hr_career_transition/models/hr_career_transition.py on lines 44..49
hr_dicipline/models/hr_dicipline.py on lines 30..35

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 51.

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