Skip to content
Health
95/100
good
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by20/25
    2 modules depend on it
  • Maturity25/25
    In 8 Odoo series since 13.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
2
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
9.16 MB
Module directory on disk
Code analysis 0 migration notes 13 models 17 views 1 HTTP endpoint

Description

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
hr_attendance, hr_holidays

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 17

XML IDNameModelTypeStatus
hr_employee_view_form hr.employee.view.form.inherit.hr.work.entry hr.employee form Inherits hr.view_employee_form
hr_export_work_entries_wizard hr.export.work.entries.wizard hr.export.work.entries form New
hr_time_rule_view_form hr.time.rule.form hr.time.rule form New
hr_time_rule_view_list hr.time.rule.list hr.time.rule list New
hr_time_rule_view_search hr.time.rule.search hr.time.rule search New
hr_work_entry_type_view_form hr.work.entry.type.form hr.work.entry.type form New
hr_work_entry_type_view_kanban hr.work.entry.type.kanban.view hr.work.entry.type kanban New
hr_work_entry_type_view_search hr.work.entry.type.view.search hr.work.entry.type search New
hr_work_entry_type_view_tree hr.work.entry.type.list hr.work.entry.type list New
res_company_view_form_inherit_hr_work_entry res.company.view.form.inherit.hr.work.entry res.company form Inherits base.view_company_form
resource_calendar_attendance_view_form resource.calendar.attendance.form.inherit.hr.work.entry resource.calendar.attendance form Inherits resource.view_resource_calendar_attendance_form
resource_calendar_attendance_view_tree resource.calendar.attendance.list.inherit.hr.work.entry resource.calendar.attendance list Inherits resource.view_resource_calendar_attendance_tree
resource_calendar_leave_view_form resource.calendar.leaves.form.inherit.hr.work.entry resource.calendar.leaves form Inherits resource.resource_calendar_leave_form
resource_calendar_leave_view_tree resource.calendar.leaves.list.inherit.hr.work.entry resource.calendar.leaves list Inherits resource.resource_calendar_leave_tree
resource_calendar_leaves_view_search_inherit resource.calendar.leaves.search.inherit resource.calendar.leaves search Inherits resource.view_resource_calendar_leaves_search
view_resource_calendar_attendance_calendar resource.calendar.attendance.calendar.inherit.hr.work.entry resource.calendar.attendance calendar Inherits resource.view_resource_calendar_attendance_calendar
view_resource_calendar_multi_create_form resource.calendar.multi.create.form.inherit.hr.work.entry resource.calendar.attendance form Inherits resource.view_resource_calendar_multi_create_form

HTTP endpoints 1

Route(s)HandlerAuthTypeMethodsFlags
/hr_work_entry/download/<int:company_id>/<int:work_entry_export_id> HrWorkEntry.download_document user http ALL

Models touched 13

New fields (1)
  • external_code Char
    copy=False groups='hr.group_hr_user' help='Use this code to export your data to a third party' args: 'External Code'
Public methods (1)
  • generate_work_entries(self, date_start, date_stop)
    Return the work entry values of the employees of ``self`` between two dates. Selects the versions with contract days in the period, then calls ``hr.version.generate_work_entries``. Called on an empty recordset, it processes all the employees with contract days in the period. :param date_start: first day, included (``date``, ``datetime`` or string, converted to a date) :param date_stop: last day, included :return: final work entry values, see ``hr.version.generate_work_entries`` :rtype: list[dict]

New fields (6)
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • eligible_employee_line_ids One2many → hr.export.work.entries.employee
    string='Eligible Employees' args: 'hr.export.work.entries.employee', 'export_id'
  • period_start Date
    compute='_compute_period_dates' readonly=False store=True args: 'Period Start'
  • period_stop Date
    compute='_compute_period_dates' readonly=False store=True args: 'Period Stop'
  • reference_month Selection
    default=<expr> required=True string='Month' args: [('1', 'January'), ('2', 'February'), ('3', 'March'), ('4', 'April'), ('5', 'May'), ('6', 'June'), ('7', 'July'), ('8', 'August'), ('9', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')]
  • reference_year Integer
    default=<expr> required=True string='Year'
Public methods (2)
  • default_get(self, fields)
    @api.model
  • download_export(self)

New fields (3)
  • employee_id Many2one → hr.employee
    check_company=True ondelete='cascade' required=True args: 'hr.employee'
  • export_id Many2one → hr.export.work.entries
    index=True ondelete='cascade' required=True args: 'hr.export.work.entries'
  • version_ids Many2many → hr.version
    compute='_compute_version_ids' ondelete='cascade' readonly=False required=True store=True args: 'hr.version'
Public methods (0)

No public methods.

New fields (32)
  • active Boolean
    default=True
  • amount_rate Float
    compute='_compute_amount_rate' readonly=False store=True args: 'Salary Rate'
  • apply_friday Boolean
    default=True
  • apply_monday Boolean
    default=True help='Define a condition based on the timing of the time entry.'
  • apply_on_public_holidays Boolean
    default=True
  • apply_saturday Boolean
    default=True
  • apply_sunday Boolean
    default=True
  • apply_thursday Boolean
    default=True
  • apply_tuesday Boolean
    default=True
  • apply_wednesday Boolean
    default=True
  • calendar_source Selection
    compute='_compute_calendar_source' help='Which schedule to use as the expected-hours baseline.' readonly=False store=True string='Calendar Source' args: [('employee', 'Employee Schedule'), ('reference', 'Reference Schedule')]
  • company_id Many2one → res.company
    args: 'res.company'
  • condition_label Char
    compute='_compute_condition_label' string='Condition'
  • condition_work_entry_type_ids Many2many → hr.work.entry.type
    domain="[('id', 'in', country_work_entry_type_ids)]" help='If set, only the selected types will be considered by this rule.' required=True string='Time Type' args: 'hr.work.entry.type', 'hr_time_rule_condition_work_entry_type_rel'
  • country_code Char
    related='country_id.code'
  • country_id Many2one → res.country
    compute='_compute_country_id' index='btree_not_null' readonly=False store=True args: 'res.country'
  • country_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_country_work_entry_type_ids' args: 'hr.work.entry.type', 'hr_time_rule_allowed_work_entry_type_rel'
  • description Text
  • employee_domain Char
    default='[]' help='The rule will automatically apply to all time entries for matching employees.' string='Employees'
  • employee_tolerance Float
  • employer_tolerance Float
  • expected_hours Float
    compute='_compute_expected_hours' readonly=False store=True string='Usual work hours'
  • name Char
    required=True
  • quantity_period Selection
    compute='_compute_quantity_period' store=True args: [('day', 'Day'), ('week', 'Week')]
  • resource_calendar_id Many2one → resource.calendar
    string='Schedule' args: 'resource.calendar'
  • sequence Integer
    default=10
  • threshold_operator Selection
    default='exceed' required=True args: [('exceed', 'Exceed'), ('less_than', 'Less than')]
  • timing_start Float
    default=0 args: 'From'
  • timing_stop Float
    default=24 args: 'To'
  • week_start Selection
    default='0' string='Week Starts On' args: [('0', 'Monday'), ('1', 'Tuesday'), ('2', 'Wednesday'), ('3', 'Thursday'), ('4', 'Friday'), ('5', 'Saturday'), ('6', 'Sunday')]
  • work_entry_type_id Many2one → hr.work.entry.type
    domain="[('id', 'in', country_work_entry_type_ids)]" help='Define a time type that will be created to count the amount of time in excess or missing.' index='btree_not_null' string='Set Excess to' args: 'hr.work.entry.type'
  • working_hours_mode Selection
    default='schedule_day' help='Define a condition based on the quantity of work made by the employee on a specific period of time.' required=True string='Working Hours Mode' args: [('schedule_day', 'the daily schedule'), ('schedule_week', 'the weekly schedule'), ('day', 'per day'), ('week', 'per week')]
Public methods (1)
  • copy_data(self, default=None)

New fields (0)

No new fields.

Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (4)
  • active Boolean
    default=True args: 'Active'
  • employee_id Many2one → hr.employee
    required=True args: 'hr.employee', 'Employee'
  • is_checked Boolean
    default=True
  • user_id Many2one → res.users
    default=<expr> ondelete='cascade' required=True args: 'res.users', 'Me'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • generate_work_entries(self, date_start, date_stop)
    Return the final work entry values of the versions of ``self`` between two dates. Main entry point, used by payroll (``hr.payslip._compute_worked_days_line_ids``). Nothing is stored: the values are computed on the fly. The days are localized in the version's timezone, then the versions are processed per (company, timezone) as superuser with :meth:`_generate_work_entries`, which clips the period to each version's validity. :param date date_start: first day, included (``datetime`` is refused) :param date date_stop: last day, included (``datetime`` is refused) :return: list of dicts, at most one per (``date``, type, employee, version, company) and extra merge key parts (see :meth:`_get_work_entry_merge_key`), with keys: - ``date``: local day (``datetime.date``) in the version's timezone - ``duration``: hours (float, never zero) - ``work_entry_type_id``, ``employee_id``, ``version_id``, ``company_id``: records - optional keys added by extensions: ``leave_ids`` (``hr.leave``), ``attendance_ids`` (``hr.attendance``), ``category_options_ids``, ``trimmed_duration`` (``hr_payroll``)... :rtype: list[dict]
  • has_static_work_entries(self)
    Tell whether the work entries of this version come from its working schedule. ``True`` (default): worked time is generated from the calendar attendances. ``False``: worked time comes from another source; ``hr_holidays_attendance`` returns ``not attendance_based``, worked time then coming from validated ``hr.attendance`` records. See :meth:`_get_attendance_intervals` for what an override must also do. :rtype: bool

New fields (14)
  • active Boolean
    default=True help='If the active field is set to false, it will allow you to hide the time type without removing it.' tracking=True args: 'Active'
  • amount_rate Float
    default=1.0 help='The percentage of wages paid. For standard paid leave set to 100%, for unpaid leave to 0%, or for double-pay to 200%.' string='Rate' tracking=True
  • code Char
    help='The code is used as a reference in salary rules. Careful, changing an existing code can lead to unwanted behaviors.' required=True string='Payroll Code' tracking=True
  • color Integer
    default=0
  • count_as Selection
    default='working_time' help='Determines if the entry counts as working time or absence.' required=True tracking=True args: [('working_time', 'Working Time'), ('absence', 'Absence')]
  • country_code Char
    related='country_id.code'
  • country_id Many2one → res.country
    domain=<expr> string='Country' tracking=True args: 'res.country'
  • description Text
    tracking=True translate=True
  • display_code Char
    help='This code can be changed, it is only for a display purpose (3 letters max)' size=3 string='Display Code' tracking=True translate=True
  • external_code Char
    help='Use this code to export your data to a third party' tracking=True
  • name Char
    required=True tracking=True translate=True
  • resource_calendar_attendance_ids One2many → resource.calendar.attendance
    copy=False readonly=True args: 'resource.calendar.attendance', 'work_entry_type_id'
  • resource_calendar_selectable Boolean
    compute='_compute_resource_calendar_selectable' readonly=False store=True string='Selectable in Working Schedule' tracking=True
  • sequence Integer
    default=25
Public methods (1)
  • copy_data(self, default=None)

New fields (2)
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • external_code Char
    copy=False groups='hr.group_hr_user' help='Use this code to export your data to a third party' args: 'External Code'
Public methods (0)

No public methods.

New fields (1)
  • external_code Char
    readonly=False related='company_id.external_code' string='External Code'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • color Integer
    related='work_entry_type_id.color'
  • display_code Char
    related='work_entry_type_id.display_code'
  • work_entry_type_id Many2one → hr.work.entry.type
    domain="[('id', 'in', allowed_work_entry_type_ids)]" groups='hr.group_hr_user' index='btree_not_null' args: 'hr.work.entry.type', 'Time Type'
Public methods (0)

No public methods.

New fields (2)
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • work_entry_type_id Many2one → hr.work.entry.type
    compute='_compute_work_entry_type_id' domain="[('id', 'in', allowed_work_entry_type_ids)]" groups='hr.group_hr_user' readonly=False store=True args: 'hr.work.entry.type', 'Time Type'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…