TIP: You can type at any time to perform a new search.

Security findings

Repository
odoo/odoo · module folder
Module version
1.1
Category
Hidden
Folder size
2.64 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
None
Last tracking update
2026-10-05 00:19:44
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Xavier Morel, Raphael Collet, Odoo Translation Bot, Aaron Bohy, Géry Debongnie, Yannick Tivisse, Xavier-Do, Victor Feyens, Julien Mougenot, Prakash Prajapati, Tiffany Chang (tic), Yash Vaishnav, amdi-odoo, Dylan Kiss (dyki), Xavier Bol (xbo), Abderraouf Ghrissi (abgh), Gabriel (gdpf), Tanguy Quéguineur, Harsh Shah, Mathieu Coutant, Yassin Abdelkarim, Abdelrahman Mahmoud (amah), Michaël Mattiello, Corentin Heinix (cohe), Krzysztof Magusiak (krma), Maeva De Keyser (MDEK), kareem, Bertrand Dossogne, romc-odoo, Julien Launois (jula), Ziri, Atovange, Dilya Anvarbekova, Martin Lefèvre (mlef), Farah (ahmfa), ELCO, 3amo-magdy, hamza, usseif, Mélanie Peyrat (mepe), FedericoBraidi, Sara Briki, Ahmed Naem (Ahnae), Mohamed-moali, Jean Schoenlaub, amgom-odoo, Ramez Ibrahim
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
base_automation, crm, digest, hr_holidays, mrp, point_of_sale, project, resource_mail, test_resource
Description
Module for resource management.
===============================

A resource represent something that can be scheduled (a developer on a task or a
work center on manufacturing orders). This module manages a resource calendar
associated to every resource. It also manages the leaves of every resource.
    

Code Analysis info_outline

Views touched (14)
XML IDNameModelTypeStatus
resource_calendar_form resource.calendar.form resource.calendar form New
resource_calendar_leave_form resource.calendar.leaves.form resource.calendar.leaves form New
resource_calendar_leave_tree resource.calendar.leaves.list resource.calendar.leaves list New
resource_resource_form resource.resource.form resource.resource form New
resource_resource_tree resource.resource.list resource.resource list New
view_resource_calendar resource.calendar.leaves.calendar resource.calendar.leaves calendar New
view_resource_calendar_attendance_calendar resource.calendar.attendance.calendar resource.calendar.attendance calendar New
view_resource_calendar_attendance_form resource.calendar.attendance.form resource.calendar.attendance form New
view_resource_calendar_attendance_tree resource.calendar.attendance.list resource.calendar.attendance list New
view_resource_calendar_leaves_search resource.calendar.leaves.search resource.calendar.leaves search New
view_resource_calendar_multi_create_form resource.calendar.multi.create.form resource.calendar.attendance form New
view_resource_calendar_search resource.calendar.search resource.calendar search New
view_resource_calendar_tree resource.calendar.list resource.calendar list New
view_resource_resource_search resource.resource.search resource.resource search New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (3)
  • resource_calendar_id Many2one → resource.calendar
    ondelete='restrict' args: 'resource.calendar', 'Default Working Hours'
  • resource_calendar_ids One2many → resource.calendar
    args: 'resource.calendar', 'company_id', 'Working Hours'
  • tz Selection
    compute='_compute_tz' readonly=False store=True string='Timezone' args: _tz_get
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (2)
  • resource_calendar_id Many2one → resource.calendar
    readonly=False related='resource_ids.calendar_id' args: 'resource.calendar', 'Default Working Hours'
  • resource_ids One2many → resource.resource
    args: 'resource.resource', 'user_id', 'Resources'
Public methods (0)

No public methods.

New fields (17)
  • active Boolean
    default=True help='If the active field is set to false, it will allow you to hide the Working Time without removing it.' args: 'Active'
  • attendance_ids One2many → resource.calendar.attendance
    compute='_compute_attendance_ids' copy=True precompute=True readonly=False store=True args: 'resource.calendar.attendance', 'calendar_id', 'Working Time'
  • calendar_type Selection
    default='fixed' help='\n - Fixed: a weekly attendance pattern that repeats identically every week.\n - Variable: attendances set on specific dates rather than a repeating weekly pattern, such as a one-off schedule or a multi-week rotation.\n - Undefined: no predefined slots at all. The resource can work whenever it wants, optionally up to an hours target.\n ' required=True string='Calendar Type' args: [('fixed', 'Fixed'), ('variable', 'Variable'), ('undefined', 'Undefined')]
  • company_id Many2one → res.company
    default=<expr> domain=<expr> index='btree_not_null' args: 'res.company', 'Company'
  • country_code Char
    depends=['country_id'] related='country_id.code'
  • country_id Many2one
    related='company_id.country_id'
  • days_per_week Float
    compute='_compute_days_per_week' digits=(10, 5) readonly=False store=True args: 'Days per Week'
  • full_time_required_hours Float
    compute='_compute_full_time_required_hours' help='Number of hours to work on the company schedule to be considered as fulltime.' readonly=False store=True string='Full Time Equivalent'
  • global_leave_ids One2many → resource.calendar.leaves
    compute='_compute_global_leave_ids' domain=[('resource_id', '=', False)] readonly=False store=True args: 'resource.calendar.leaves', 'calendar_id', 'Global Time Off'
  • hours_per_day Float
    compute='_compute_hours_per_day' digits=(10, 5) help='Average hours per day a resource is supposed to work with this calendar.' readonly=False store=True args: 'Average Hour per Day'
  • hours_per_week Float
    compute='_compute_hours_per_week' copy=False digits=(10, 5) readonly=False store=True string='Hours per Week'
  • is_fulltime Boolean
    compute='_compute_is_fulltime' string='Is Full Time'
  • leave_ids One2many → resource.calendar.leaves
    args: 'resource.calendar.leaves', 'calendar_id', 'Time Off'
  • name Char
    required=True
  • reference_calendar_id Many2one → resource.calendar
    check_company=True default=<expr> help='Reference working hours used to compute the full-time equivalent.' index='btree_not_null' string='Reference Calendar' args: 'resource.calendar'
  • work_resources_count Integer
    compute='_compute_work_resources_count' args: 'Work Resources count'
  • work_time_rate Float
    compute='_compute_work_time_rate' help='Work time rate versus full time working schedule, should be between 0 and 100 %.' store=True string='Work Time Rate'
Public methods (9)
  • create(self, vals_list)
    @api.model_create_multi
  • default_get(self, fields)
    @api.model
  • get_attendances(self, date_from, date_to, fields_to_fetch, domain=None)
  • get_work_duration_data(self, from_datetime, to_datetime, compute_leaves=True, domain=None)
    Get the working duration (in days and hours) for a given period, only based on the current calendar. This method does not use resource to compute it. `domain` is used in order to recognise the leaves to take, None means default value ('count_as', '=', 'absence') Returns a dict {'days': n, 'hours': h} containing the quantity of working time expressed as days and as hours.
  • get_work_hours_count(self, start_dt, end_dt, compute_leaves=True, domain=None)
    `compute_leaves` controls whether or not this method is taking into account the global leaves. `domain` controls the way leaves are recognized. None means default value ('count_as', '=', 'absence') Counts the number of work hours between two dates/datetimes.
  • is_calendar_referenced(self)
  • plan_days(self, days, day_dt, compute_leaves=False, domain=None)
    `compute_leaves` controls whether or not this method is taking into account the global leaves. `domain` controls the way leaves are recognized. None means default value ('count_as', '=', 'absence') Returns the datetime of a days scheduling.
  • plan_hours(self, hours, day_dt, compute_leaves=False, domain=None, resource=None)
    `compute_leaves` controls whether or not this method is taking into account the global leaves. `domain` controls the way leaves are recognized. None means default value ('count_as', '=', 'absence') Return datetime after having planned hours
  • write(self, vals)

New fields (17)
  • calendar_id Many2one → resource.calendar
    index=True ondelete='cascade' required=True string="Resource's Calendar" args: 'resource.calendar'
  • calendar_type Selection
    readonly=True related='calendar_id.calendar_type'
  • date Date
  • day_period Selection
    compute='_compute_day_period' store=True args: [('morning', 'Morning'), ('afternoon', 'Afternoon'), ('full_day', 'Full Day')]
  • dayofweek Selection
    compute='_compute_dayofweek' index=True precompute=True readonly=False required=True store=True args: [('0', 'Monday'), ('1', 'Tuesday'), ('2', 'Wednesday'), ('3', 'Thursday'), ('4', 'Friday'), ('5', 'Saturday'), ('6', 'Sunday')], 'Day of Week'
  • duration_based Boolean
    compute='_compute_duration_based' precompute=True store=True
  • duration_hours Float
    compute='_compute_duration_hours' readonly=False store=True string='Hours'
  • hour_from Float
    compute='_compute_hours' default=0 help='Start and End time of working.\nA specific value of 24:00 is interpreted as 23:59:59.999999.' index=True precompute=True readonly=False required=True store=True string='Work from'
  • hour_to Float
    compute='_compute_hours' default=0 precompute=True readonly=False required=True store=True string='Work to'
  • recurrency Boolean
  • recurrency_count Integer
    default=1 string='Number of Repetitions'
  • recurrency_end_type Selection
    default='forever' string='Recurrence End Condition' args: [('forever', 'Forever'), ('times', 'Occurrences'), ('date', 'Until')]
  • recurrency_excluded_occurences Json
  • recurrency_interval Integer
    default=1 help='Number of days or weeks between each occurrence.' string='Interval'
  • recurrency_type Selection
    default='weeks' args: [('days', 'Days'), ('weeks', 'Weeks')]
  • recurrency_until Date
    compute='_compute_recurrency_until' precompute=True readonly=False store=True string='Recurrence End Date'
  • sequence Integer
    default=10 help='Gives the sequence of this line when displaying the resource calendar.'
Public methods (5)
  • create_ad_hoc(self, date, changes)
  • create_new_recurrency(self, date, changes)
  • exclude_multiple_occurences(self, dates)
  • exclude_occurence(self, date)
  • stop_recurrency(self, date)

New fields (7)
  • calendar_id Many2one → resource.calendar
    check_company=True compute='_compute_calendar_id' domain="[('company_id', 'in', [company_id, False])]" index=True readonly=False store=True args: 'resource.calendar', 'Working Hours'
  • company_id Many2one → res.company
    compute='_compute_company_id' default=<expr> readonly=True store=True string='Company' args: 'res.company'
  • count_as Selection
    default='absence' help='Whether this should be computed as a time off or as work time (eg: formation)' args: [('absence', 'Absence'), ('working_time', 'Working Time')]
  • date_from Datetime
    required=True args: 'Start Date'
  • date_to Datetime
    compute='_compute_date_to' readonly=False required=True store=True args: 'End Date'
  • name Char
    args: 'Reason'
  • resource_id Many2one → resource.resource
    help='If empty, this is a generic time off for the company. If a resource is set, the time off is only for this resource' index=True args: 'resource.resource', 'Resource'
Public methods (2)
  • check_dates(self)
    @api.constrains('date_from', 'date_to')
  • default_get(self, fields)
    @api.model

New fields (4)
  • company_id Many2one → res.company
    default=<expr> index=True precompute=True readonly=False related='resource_id.company_id' store=True args: 'res.company', 'Company'
  • resource_calendar_id Many2one → resource.calendar
    default=<expr> index=True readonly=False related='resource_id.calendar_id' store=True args: 'resource.calendar', 'Working Hours'
  • resource_id Many2one → resource.resource
    bypass_search_access=True index=True ondelete='restrict' required=True args: 'resource.resource', 'Resource'
  • tz Selection
    help='This field is used in order to define in which timezone the resources will work.' readonly=False related='resource_id.tz' string='Timezone'
Public methods (2)
  • copy_data(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi

New fields (15)
  • active Boolean
    default=True help='If the active field is set to False, it will allow you to hide the resource record without removing it.' args: 'Active'
  • avatar_128 Image
    compute='_compute_avatar_128' compute_sudo=True
  • calendar_id Many2one → resource.calendar
    default=<expr> domain="[('company_id', '=', company_id)]" help='Define the working schedule of the resource. Assign a flexible calendar for fully flexible working hours.' required=True string='Working Time' args: 'resource.calendar'
  • color Integer
    default=_default_color
  • company_id Many2one → res.company
    default=<expr> string='Company' args: 'res.company'
  • email Char
    related='user_id.email'
  • hours_per_day Float
    readonly=True related='calendar_id.hours_per_day' string='Hours per Day'
  • hours_per_week Float
    readonly=True related='calendar_id.hours_per_week' string='Hours per Week'
  • name Char
    required=True
  • phone Char
    related='user_id.phone'
  • resource_type Selection
    default='user' required=True string='Type' args: [('user', 'Human'), ('material', 'Material')]
  • share Boolean
    related='user_id.share'
  • time_efficiency Float
    default=100 help='This field is used to calculate the expected duration of a work order at this work center. For example, if a work order takes one hour and the efficiency factor is 100%, then the expected duration will be one hour. If the efficiency factor is 200%, however the expected duration will be 30 minutes.' required=True args: 'Efficiency Factor'
  • tz Selection
    default=<expr> required=True string='Timezone' args: _tz_get
  • user_id Many2one → res.users
    help='Related user name for the resource to manage its access.' index='btree_not_null' string='User' args: 'res.users'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • default_get(self, fields)
    @api.model
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…