diff options
| author | Yenthe V.G <yenthevg@gmail.com> | 2017-05-29 09:08:44 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-05-29 11:28:42 +0200 |
| commit | 5e652c856da4e4b627344c854b41886526da268a (patch) | |
| tree | ac1809f62152c811be38a44b7cb70446d96d5ad6 /addons | |
| parent | 5c0355c0334f5887a3556d87e371903f017b5917 (diff) | |
[FIX] hr_timesheet_sheet: Display warning in user's language
Closes https://github.com/odoo/odoo/pull/17254/files
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot | 7 | ||||
| -rw-r--r-- | addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot index ff96a97cda0..415249f1248 100644 --- a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot +++ b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot @@ -467,6 +467,13 @@ 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 msgid "You cannot modify an entry in a confirmed timesheet." diff --git a/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py index f017760e070..62f4685a84b 100644 --- a/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py @@ -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): |
