open-synergy/opnsynid-hr

View on GitHub

Showing 547 of 547 total issues

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

        self.koi_partner = self.obj_partner.create(
            {
                "name": "Kawula Odoo Indonesia",
                "city": "DKI. Jakarta",
                "country_id": self.env.ref("base.id").id,
Severity: Minor
Found in hr_payslip_security/tests/base.py and 1 other location - About 55 mins to fix
hr_payslip_security/tests/base.py on lines 27..33

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

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

    name = fields.Char(
        string="# Document",
        required=True,
        default="/",
        copy=False,
Severity: Major
Found in hr_dicipline/models/hr_dicipline.py and 3 other locations - About 55 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 117..125
hr_award/models/hr_award.py on lines 55..63
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 39..47

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

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",
        selection=[
            ("draft", "Draft"),
            ("inprogress", "In progress"),
Severity: Minor
Found in gamification_analysis/reports/gamification_goal_analysis.py and 1 other location - About 55 mins to fix
hr_career_transition/reports/hr_career_transition_analysis.py on lines 66..73

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

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

    job_id = fields.Many2one(
        string="Job Position",
        comodel_name="hr.job",
        required=True,
        ondelete="restrict",
Severity: Minor
Found in hr_recruitment_request/models/hr_recruitment_request.py and 1 other location - About 55 mins to fix
hr_recruitment_request/models/hr_recruitment_request.py on lines 65..73

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

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

    name = fields.Char(
        string="# Document",
        required=True,
        default="/",
        copy=False,
Severity: Major
Found in hr_award/models/hr_award.py and 3 other locations - About 55 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 117..125
hr_dicipline/models/hr_dicipline.py on lines 53..61
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 39..47

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

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

    schedule_id = fields.Many2one(
        string="Schedule",
        comodel_name="hr.timesheet_attendance_schedule",
        required=True,
        readonly=True,
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 58..65
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 70..77

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

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

Severity: Major
Found in hr_timesheet_tier_validation/models/hr_timesheet_sheet.py and 2 other locations - About 55 mins to fix
hr_attendance_overtime_request_tier_validation/models/hr_overtime_request.py on lines 0..12
hr_expense_tier_validation/models/hr_expense.py on lines 0..12

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

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",
        selection=[
            ("draft", "Draft"),
            ("confirm", "Waiting for Approval"),
Severity: Minor
Found in hr_career_transition/reports/hr_career_transition_analysis.py and 1 other location - About 55 mins to fix
gamification_analysis/reports/gamification_goal_analysis.py on lines 41..48

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

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

    name = fields.Char(
        string="# Overtime Request",
        required=True,
        default="/",
        readonly=True,
Severity: Major
Found in hr_attendance_overtime_request/models/hr_overtime_request.py and 3 other locations - About 55 mins to fix
hr_award/models/hr_award.py on lines 55..63
hr_dicipline/models/hr_dicipline.py on lines 53..61
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 39..47

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

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

    @api.multi
    def action_confirm(self):
        for transition in self:
            transition.write(transition._prepare_confirm_data())
            transition.request_validation()
Severity: Major
Found in hr_career_transition/models/hr_career_transition.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def button_reset(self):
        for participant in self:
            participant.write(participant._prepare_reset_data())
            participant._delete_substitute()
Severity: Major
Found in hr_employee_training/models/hr_training_partisipant.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def button_confirm(self):
        for document in self:
            document.write(document._prepare_confirm_data())
            document.request_validation()
Severity: Major
Found in hr_award/models/hr_award.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def button_confirm(self):
        for document in self:
            document.write(document._prepare_confirm_data())
            document.request_validation()
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def button_cancel(self):
        for document in self:
            document.write(document._prepare_cancel_data())
            document.restart_validation()
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222

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

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

    @api.multi
    def button_confirm(self):
        for document in self:
            document.write(document._prepare_confirm_data())
            document.request_validation()
Severity: Major
Found in hr_dicipline/models/hr_dicipline.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def button_cancel(self):
        for document in self:
            document.write(document._prepare_cancel_data())
            document.restart_validation()
Severity: Major
Found in hr_dicipline/models/hr_dicipline.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def action_valid(self):
        for rec_request in self:
            rec_request.write(rec_request._prepare_valid_data())
            rec_request._close_job_recruitment()
Severity: Major
Found in hr_recruitment_request/models/hr_recruitment_request.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def action_confirm(self):
        for overtime in self:
            overtime.write(overtime._prepare_confirm_data())
            overtime.request_validation()
Severity: Major
Found in hr_attendance_overtime_request/models/hr_overtime_request.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def action_cancel(self):
        for overtime in self:
            overtime.write(overtime._prepare_cancel_data())
            overtime.restart_validation()
Severity: Major
Found in hr_attendance_overtime_request/models/hr_overtime_request.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_employee_training/models/hr_training_session.py on lines 132..136
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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

    @api.multi
    def button_start(self):
        for session in self:
            session.write(session._prepare_start_data())
            session._create_attendance()
Severity: Major
Found in hr_employee_training/models/hr_training_session.py and 11 other locations - About 50 mins to fix
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 318..322
hr_attendance_overtime_request/models/hr_overtime_request.py on lines 329..333
hr_award/models/hr_award.py on lines 271..275
hr_award/models/hr_award.py on lines 292..296
hr_career_transition/models/hr_career_transition.py on lines 421..425
hr_dicipline/models/hr_dicipline.py on lines 269..273
hr_dicipline/models/hr_dicipline.py on lines 290..294
hr_employee_training/models/hr_training_partisipant.py on lines 103..107
hr_recruitment_request/models/hr_recruitment_request.py on lines 239..243
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 218..222
hr_timesheet_attendance_schedule/models/hr_timesheet_attendance_schedule_change.py on lines 230..234

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

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