Skip to content

Commit

Permalink
[11.0][MIG] hr_timesheet_sheet (OCA#125)
Browse files Browse the repository at this point in the history
* [10.0] hr_timesheet_sheet

* [11.0][MIG] hr_timesheet_sheet

* [REMOVE] hr_timesheet.sheet.account

* [REMOVE] 'new' state

* [ADD] Tests

* [UPD] Adapt to multicompany

* [ADD] Add more tests (include multicompany tests)

* [FIX] project_task_stage_allow_timesheet: show error message only if task

* [ADD] Migration scripts to v11
  • Loading branch information
MiquelRForgeFlow authored and sergiocorato committed Sep 6, 2023
1 parent 7c1b9bf commit 4fb5851
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 5 deletions.
40 changes: 40 additions & 0 deletions project_task_stage_allow_timesheet/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_stage_allow_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-02-13 16:24+0000\n"
"Last-Translator: j-zaballa <jonzaballa@digital5.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.4\n"

#. module: project_task_stage_allow_timesheet
#: model:ir.model.fields,field_description:project_task_stage_allow_timesheet.field_project_task_type_allow_timesheet
msgid "Allow timesheets"
msgstr "Permitir partes de horas"

#. module: project_task_stage_allow_timesheet
#: model:ir.model,name:project_task_stage_allow_timesheet.model_account_analytic_line
msgid "Analytic Line"
msgstr "Línea analítica"

#. module: project_task_stage_allow_timesheet
#: model:ir.model,name:project_task_stage_allow_timesheet.model_project_task_type
msgid "Task Stage"
msgstr "Etapa de tarea"

#. module: project_task_stage_allow_timesheet
#: code:addons/project_task_stage_allow_timesheet/models/account_analytic_line.py:22
#, python-format
msgid "You can't link a timesheet line to a task if its stage doesn't allow it. (Task: %s, Stage: %s)"
msgstr ""
"No puedes imputar horas en una tarea cuyo estado no lo permite. (Tarea: %s, "
"Etapa: %s)"
12 changes: 8 additions & 4 deletions project_task_stage_allow_timesheet/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_stage_allow_timesheet
# * project_task_stage_allow_timesheet
#
msgid ""
msgstr ""
Expand All @@ -10,6 +10,7 @@ msgstr ""
"PO-Revision-Date: 2018-03-02 06:48+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
Expand All @@ -33,6 +34,9 @@ msgstr "Étape de tâche"
#. module: project_task_stage_allow_timesheet
#: code:addons/project_task_stage_allow_timesheet/models/account_analytic_line.py:22
#, python-format
msgid "You can't link a timesheet line to a task if its stage doesn't allow it. (Task: %s, Stage: %s)"
msgstr "Vous ne pouvez pas lier une ligne de feuille temps à une tâche si son étape ne le permet pas. (Tâche: %s, Etape: %s)"

msgid ""
"You can't link a timesheet line to a task if its stage doesn't allow it. "
"(Task: %s, Stage: %s)"
msgstr ""
"Vous ne pouvez pas lier une ligne de feuille temps à une tâche si son étape "
"ne le permet pas. (Tâche: %s, Etape: %s)"
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_stage_allow_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: project_task_stage_allow_timesheet
#: model:ir.model.fields,field_description:project_task_stage_allow_timesheet.field_project_task_type_allow_timesheet
msgid "Allow timesheets"
msgstr ""

#. module: project_task_stage_allow_timesheet
#: model:ir.model,name:project_task_stage_allow_timesheet.model_account_analytic_line
msgid "Analytic Line"
msgstr ""

#. module: project_task_stage_allow_timesheet
#: model:ir.model,name:project_task_stage_allow_timesheet.model_project_task_type
msgid "Task Stage"
msgstr ""

#. module: project_task_stage_allow_timesheet
#: code:addons/project_task_stage_allow_timesheet/models/account_analytic_line.py:22
#, python-format
msgid "You can't link a timesheet line to a task if its stage doesn't allow it. (Task: %s, Stage: %s)"
msgstr ""

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _check_task_allow_timesheet(self):
for rec in self:
task = rec.task_id
stage = task.stage_id
if not stage.allow_timesheet:
if task and not stage.allow_timesheet:
raise ValidationError(_(
"You can't link a timesheet line to a task if its stage "
"doesn't allow it. (Task: %s, Stage: %s)"
Expand Down

0 comments on commit 4fb5851

Please sign in to comment.