Skip to content

Commit

Permalink
TA#72205 [16.0][MIG] project_time_range
Browse files Browse the repository at this point in the history
  • Loading branch information
lanto-razafindrabe committed Dec 17, 2024
1 parent b355230 commit 47287f7
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 53 deletions.
7 changes: 3 additions & 4 deletions .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@
"category": "Other",
"summary": "Install all addons required for testing.",
"depends": [
"project",
"project_default_task_stage",
"project_parent_enhanced",
"project_stage_allow_timesheet",
"project_task_date_planned",
"project_task_deadline_from_project",
"project_task_editable_list_view",
"project_task_full_text_search",
"project_time_range",
"project_track_end_date",
"project_type_advanced",
"project_default_task_stage",
"project_parent_enhanced",
"project_stage_allow_timesheet",
],
"installable": True,
}
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ RUN gitoo install-all --conf_file /gitoo.yml --destination "${THIRD_PARTY_ADDONS

USER odoo

COPY project_stage_allow_timesheet mnt/extra-addons/project_stage_allow_timesheet
COPY project_default_task_stage /mnt/extra-addons/project_default_task_stage
COPY project_parent_enhanced mnt/extra-addons/project_parent_enhanced
COPY project_stage_allow_timesheet mnt/extra-addons/project_stage_allow_timesheet
COPY project_task_date_planned /mnt/extra-addons/project_task_date_planned
COPY project_task_deadline_from_project /mnt/extra-addons/project_task_deadline_from_project
COPY project_task_editable_list_view /mnt/extra-addons/project_task_editable_list_view
COPY project_task_full_text_search /mnt/extra-addons/project_task_full_text_search
COPY project_time_range /mnt/extra-addons/project_time_range
COPY project_track_end_date /mnt/extra-addons/project_track_end_date
COPY project_type_advanced /mnt/extra-addons/project_type_advanced
COPY project_default_task_stage /mnt/extra-addons/project_default_task_stage


COPY .docker_files/main /mnt/extra-addons/main
COPY .docker_files/odoo.conf /etc/odoo
44 changes: 20 additions & 24 deletions project_time_range/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * project_task_time_range
# * project_time_range
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-24 14:59+0000\n"
"PO-Revision-Date: 2021-02-24 10:06-0500\n"
"Last-Translator: <>\n"
"POT-Creation-Date: 2024-12-17 05:35+0000\n"
"PO-Revision-Date: 2024-12-17 05:35+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"X-Generator: Poedit 2.0.6\n"

#. module: project_time_range
#: model_terms:ir.ui.view,arch_db:project_time_range.portal_my_task_with_time_range
Expand All @@ -38,7 +36,8 @@ msgid "Consumed Hours"
msgstr "Heures consommées"

#. module: project_time_range
#: code:addons/project_time_range/models/project_task.py:51
#. odoo-python
#: code:addons/project_time_range/models/project_task.py:0
#, python-format
msgid "Hours must be positive numbers."
msgstr "Les heures doivent être des nombres positives."
Expand All @@ -51,19 +50,17 @@ msgstr "Les heures doivent être des nombres positives."
msgid "Ideal"
msgstr "Idéal"

#. module: project_time_range
#: model_terms:ir.ui.view,arch_db:project_time_range.project_task_form
msgid "Ideal (days)"
msgstr "Idéal (jours)"

#. module: project_time_range
#: model:ir.model.fields,field_description:project_time_range.field_project_project__planned_hours
#: model:ir.model.fields,field_description:project_time_range.field_project_task__planned_hours
msgid "Ideal Planned Hours"
msgstr "Heures planifiées idéal"

#. module: project_time_range
#: model:ir.model.fields,help:project_time_range.field_project_task__planned_hours
msgid ""
"It is the time planned to achieve the task. If this document has sub-tasks, "
"it means the time needed to achieve this tasks and its childs."
msgstr ""

#. module: project_time_range
#: model_terms:ir.ui.view,arch_db:project_time_range.project_form
msgid "Management"
Expand All @@ -75,10 +72,11 @@ msgstr "Pilotage"
#: model_terms:ir.ui.view,arch_db:project_time_range.project_task_form
#: model_terms:ir.ui.view,arch_db:project_time_range.project_task_list
msgid "Max"
msgstr "Max"
msgstr ""

#. module: project_time_range
#: code:addons/project_time_range/models/project_task.py:38
#. odoo-python
#: code:addons/project_time_range/models/project_task.py:0
#, python-format
msgid "Max Hours must be greater than the planned hours."
msgstr "Les heures Max doivent être supérieures aux heures idéales."
Expand All @@ -95,10 +93,11 @@ msgstr "Heures maximales plannifiées"
#: model_terms:ir.ui.view,arch_db:project_time_range.project_task_form
#: model_terms:ir.ui.view,arch_db:project_time_range.project_task_list
msgid "Min"
msgstr "Min"
msgstr ""

#. module: project_time_range
#: code:addons/project_time_range/models/project_task.py:45
#. odoo-python
#: code:addons/project_time_range/models/project_task.py:0
#, python-format
msgid "Min Hours must be lesser than the planned hours."
msgstr "Les heures Min doivent être inférieures aux heures idéales."
Expand Down Expand Up @@ -128,7 +127,7 @@ msgstr "Restant"
#. module: project_time_range
#: model:ir.model.fields,field_description:project_time_range.field_project_project__remaining_hours
msgid "Remaining Hours"
msgstr "Heures restantes"
msgstr "Temps facturé restant"

#. module: project_time_range
#: model_terms:ir.ui.view,arch_db:project_time_range.project_form
Expand Down Expand Up @@ -159,7 +158,4 @@ msgstr "Tâche"
#. module: project_time_range
#: model_terms:ir.ui.view,arch_db:project_time_range.project_form
msgid "Time Range"
msgstr "Intervalle de temps"

#~ msgid "Initially Planned Hours"
#~ msgstr "Heures planifiées initialement"
msgstr "Intervalle de temps"
Binary file modified project_time_range/static/description/portal_task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified project_time_range/static/description/project_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified project_time_range/static/description/project_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified project_time_range/static/description/task_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified project_time_range/static/description/task_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 33 additions & 22 deletions project_time_range/views/project_task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,46 @@
<field name="model">project.task</field>
<field name="inherit_id" ref="hr_timesheet.view_task_form2_inherited" />
<field name="arch" type="xml">
<!-- RENDER TO CHECK AFTER COMMENTING IT : Add a label to the group that wraps the field planned hours. -->
<!-- <xpath expr="//field[@name='planned_hours']/parent::group" position="attributes">

<!-- Add string to group -->
<xpath expr="//page[@id='timesheets_tab']/group/group" position="attributes">
<attribute name="string">Planned Hours</attribute>
</xpath> -->
</xpath>

<field name="planned_hours" position="before">
<field name="min_hours" string="Min" widget="float_time" />
</field>
<field name="planned_hours" position="attributes">
<!-- Change label of planned_hours -->
<xpath expr="//page[@id='timesheets_tab']/group/group/label[@for='planned_hours'][1]" position="attributes">
<attribute name="string">Ideal</attribute>
<attribute name="nolabel">0</attribute>
</field>
<xpath expr="//label[@for='planned_hours']/parent::div" position="replace" />
<field name="planned_hours" position="after">
<field name="max_hours" string="Max" widget="float_time" />
</field>
<xpath expr="//label[@for='subtask_planned_hours']/parent::div" position="replace" />
</xpath>
<xpath expr="//page[@id='timesheets_tab']/group/group/label[@for='planned_hours'][2]" position="attributes">
<attribute name="string">Ideal (days)</attribute>
<attribute name="nolabel">0</attribute>
</xpath>

<!-- Add Min and Max -->
<xpath expr="//page[@id='timesheets_tab']/group/group/label[@for='planned_hours'][1]" position="before">
<label for="min_hours" string="Min" />
<div class="o_row">
<field name="min_hours" class="o_field_float_time oe_inline ms-2" widget="timesheet_uom_no_toggle" />
</div>
</xpath>

<xpath expr="//page[@id='timesheets_tab']/group/group" position="inside">
<label for="max_hours" string="Max" />
<div class="o_row">
<field name="max_hours" class="o_field_float_time oe_inline ms-2" widget="timesheet_uom_no_toggle" />
</div>
</xpath>

<xpath expr="//field[@name='planned_hours']/parent::group" position="after">
<!-- Sub-tasks Hours -->
<xpath expr="//page[@id='timesheets_tab']/group/group" position="after">
<group string="Sub-tasks Hours" name="subtask_hours" attrs="{'invisible': [('subtask_count', '=', 0)]}">
<field name="subtask_min_hours" string="Min" widget="float_time" />
<field name="subtask_planned_hours" position="move" />
<field name="subtask_max_hours" string="Max" widget="float_time" />
<field name="subtask_min_hours" string="Min" class="o_field_float_time oe_inline ms-2" widget="timesheet_uom_no_toggle" />
<field name="subtask_planned_hours" string="Ideal" class="o_field_float_time oe_inline ms-2" widget="timesheet_uom_no_toggle" />
<field name="subtask_max_hours" string="Max" class="o_field_float_time oe_inline ms-2" widget="timesheet_uom_no_toggle" />
</group>
</xpath>
<field name="subtask_planned_hours" position="attributes">
<attribute name="string">Ideal</attribute>
<attribute name="widget">float_time</attribute>
<attribute name="nolabel">0</attribute>
</field>

</field>
</record>

Expand All @@ -50,6 +60,7 @@
<field name="planned_hours" position="attributes">
<attribute name="string">Ideal</attribute>
<attribute name="sum">Ideal</attribute>
<attribute name="optional">show</attribute>
</field>
<field name="planned_hours" position="after">
<field name="max_hours" string="Max" widget="float_time" sum="Max" />
Expand Down

0 comments on commit 47287f7

Please sign in to comment.