Skip to content

Commit

Permalink
[IMP] hr_expense: Improve error wording
Browse files Browse the repository at this point in the history
This improves the wording for the "missing journal" error,
matching odoo#185054

closes odoo#186138

closes odoo#186669

Signed-off-by: Olivier Colson (oco) <[email protected]>
Signed-off-by: Julien Alardot (jual) <[email protected]>
  • Loading branch information
JulienAlardot committed Nov 12, 2024
1 parent 1ed6dbe commit 4d417f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions addons/hr_expense/i18n/hr_expense.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,14 @@ msgstr ""
msgid "Phone bills, postage, etc."
msgstr ""

#. module: hr_expense
#. odoo-python
#: code:addons/hr_expense/models/hr_expense_sheet.py:0
#, python-format
msgid ""
"Please specify an expense journal in order to generate accounting entries."
msgstr ""

#. module: hr_expense
#. odoo-javascript
#: code:addons/hr_expense/static/src/views/list.xml:0
Expand Down
2 changes: 1 addition & 1 deletion addons/hr_expense/models/hr_expense_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def _check_can_create_move(self):
raise UserError(_("You can only generate accounting entry for approved expense(s)."))

if any(not sheet.journal_id for sheet in self):
raise UserError(_("Specify expense journal to generate accounting entries."))
raise UserError(_("Please specify an expense journal in order to generate accounting entries."))

missing_email_employees = self.filtered(lambda sheet: not sheet.employee_id.work_email).employee_id
if missing_email_employees:
Expand Down

0 comments on commit 4d417f2

Please sign in to comment.