summaryrefslogtreecommitdiff
path: root/addons/resource/models
diff options
context:
space:
mode:
authorjbm-odoo <jbm@odoo.com>2018-12-13 11:10:15 +0000
committerYannick Tivisse <yti@odoo.com>2019-01-21 11:29:30 +0000
commita3daff6bc121a42bf293ca91b8f522c26bac7c8a (patch)
tree7cdc12fc34bf66068e51970bb60f946c06c30a7e /addons/resource/models
parent344877a0813a915344a230f1aaf1f932f2f9d5cb (diff)
[IMP] hr_holidays: Rename 'leave' into 'time off' + add dashboard
Purpose ======= We need to use an international word to define holidays and leaves, rename everything into Time Off. Employees needs a good dashboard and leaves summary Specification ============= 1/ Add a new dashboard: https://balsamiq.cloud/sm5j0d/pg5w04r Create a new dashboard with a calendar and a summary of all time off and time off request 2/ Rename leaves into Time Off everywhere 3/ Improve general usability TaskID: 1916871 closes odoo/odoo#29634
Diffstat (limited to 'addons/resource/models')
-rw-r--r--addons/resource/models/resource.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/resource/models/resource.py b/addons/resource/models/resource.py
index 54575a6c354..28d16768a47 100644
--- a/addons/resource/models/resource.py
+++ b/addons/resource/models/resource.py
@@ -174,9 +174,9 @@ class ResourceCalendar(models.Model):
'resource.calendar.attendance', 'calendar_id', 'Working Time',
copy=True, default=_get_default_attendance_ids)
leave_ids = fields.One2many(
- 'resource.calendar.leaves', 'calendar_id', 'Leaves')
+ 'resource.calendar.leaves', 'calendar_id', 'Time Off')
global_leave_ids = fields.One2many(
- 'resource.calendar.leaves', 'calendar_id', 'Global Leaves',
+ 'resource.calendar.leaves', 'calendar_id', 'Global Time Off',
domain=[('resource_id', '=', False)]
)
hours_per_day = fields.Float("Average Hour per Day", default=HOURS_PER_DAY,
@@ -506,7 +506,7 @@ class ResourceResource(models.Model):
class ResourceCalendarLeaves(models.Model):
_name = "resource.calendar.leaves"
- _description = "Resource Leaves Detail"
+ _description = "Resource Time Off Detail"
name = fields.Char('Reason')
company_id = fields.Many2one(
@@ -517,14 +517,14 @@ class ResourceCalendarLeaves(models.Model):
date_to = fields.Datetime('End Date', required=True)
resource_id = fields.Many2one(
"resource.resource", 'Resource',
- help="If empty, this is a generic holiday for the company. If a resource is set, the holiday/leave is only for this resource")
- time_type = fields.Selection([('leave', 'Leave'), ('other', 'Other')], default='leave',
- help="Whether this should be computed as a holiday or as work time (eg: formation)")
+ 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")
+ time_type = fields.Selection([('leave', 'Time Off'), ('other', 'Other')], default='leave',
+ help="Whether this should be computed as a time off or as work time (eg: formation)")
@api.constrains('date_from', 'date_to')
def check_dates(self):
if self.filtered(lambda leave: leave.date_from > leave.date_to):
- raise ValidationError(_('The start date of the leave must be earlier end date.'))
+ raise ValidationError(_('The start date of the time off must be earlier end date.'))
@api.onchange('resource_id')
def onchange_resource(self):