[FIX] hr_timesheet_sheet: Display warning in user's language
Closes https://github.com/odoo/odoo/pull/17254/files
This commit is contained in:
committed by
Yannick Tivisse
parent
5c0355c033
commit
5e652c856d
@@ -466,6 +466,13 @@ msgstr ""
|
||||
msgid "You cannot duplicate a timesheet."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_timesheet_sheet
|
||||
#: code:addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py:85
|
||||
#, python-format
|
||||
msgid "You cannot have 2 timesheets that overlap!\n"
|
||||
"Please use the menu 'My Current Timesheet' to avoid this problem."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_timesheet_sheet
|
||||
#: code:addons/hr_timesheet_sheet/models/account_analytic_line.py:60
|
||||
#, python-format
|
||||
|
||||
@@ -85,7 +85,7 @@ class HrTimesheetSheet(models.Model):
|
||||
AND id <> %s''',
|
||||
(sheet.date_to, sheet.date_from, new_user_id, sheet.id))
|
||||
if any(self.env.cr.fetchall()):
|
||||
raise ValidationError('You cannot have 2 timesheets that overlap!\nPlease use the menu \'My Current Timesheet\' to avoid this problem.')
|
||||
raise ValidationError(_('You cannot have 2 timesheets that overlap!\nPlease use the menu \'My Current Timesheet\' to avoid this problem.'))
|
||||
|
||||
@api.onchange('employee_id')
|
||||
def onchange_employee_id(self):
|
||||
|
||||
Reference in New Issue
Block a user