Skip to content

Commit

Permalink
RM-89671 code refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
mea-axelor committed Feb 18, 2025
1 parent 29eb8ca commit ee97eaa
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 19 deletions.
4 changes: 4 additions & 0 deletions axelor-project/src/main/resources/i18n/messages.csv
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"All tasks",,,
"All tasks (tree)",,,
"Allocated",,,
"Allocation period",,,
"Allow to allocate Time spent from the project-task-form. A readonly logtimes paneltab will also appear on the related project-form. Note: if you use the HR timesheets, these log times will allocate HR Timesheet for the concerned colleague.",,,
"Allow to open discussion topic, where project members can interact, accessible via the the Tools menu.",,,
"App",,,
Expand Down Expand Up @@ -219,6 +220,7 @@
"Notes",,,
"Number of days in a sprint",,,
"Number of hours in a day",,,
"Old sprint",,,
"On hold",,,
"Open",,,
"Open gantt",,,
Expand Down Expand Up @@ -451,7 +453,9 @@
"Topics",,,
"Topics (${name})",,,
"Total",,,
"Total allocated time",,,
"Total duration (Hours)",,,
"Total estimated time",,,
"Total planned hours",,,
"Type",,,
"Type of authorized activities",,,
Expand Down
4 changes: 4 additions & 0 deletions axelor-project/src/main/resources/i18n/messages_en.csv
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"All tasks",,,
"All tasks (tree)",,,
"Allocated",,,
"Allocation period",,,
"Allow to allocate Time spent from the project-task-form. A readonly logtimes paneltab will also appear on the related project-form. Note: if you use the HR timesheets, these log times will allocate HR Timesheet for the concerned colleague.",,,
"Allow to open discussion topic, where project members can interact, accessible via the the Tools menu.",,,
"App",,,
Expand Down Expand Up @@ -219,6 +220,7 @@
"Notes",,,
"Number of days in a sprint",,,
"Number of hours in a day",,,
"Old sprint",,,
"On hold",,,
"Open",,,
"Open gantt",,,
Expand Down Expand Up @@ -451,7 +453,9 @@
"Topics",,,
"Topics (${name})",,,
"Total",,,
"Total allocated time",,,
"Total duration (Hours)",,,
"Total estimated time",,,
"Total planned hours",,,
"Type",,,
"Type of authorized activities",,,
Expand Down
4 changes: 4 additions & 0 deletions axelor-project/src/main/resources/i18n/messages_fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"All tasks","Toutes les tâches",,
"All tasks (tree)","Toutes les tâches (vue arbre)",,
"Allocated","Alloué",,
"Allocation period","Période d'allocation",,
"Allow to allocate Time spent from the project-task-form. A readonly logtimes paneltab will also appear on the related project-form. Note: if you use the HR timesheets, these log times will allocate HR Timesheet for the concerned colleague.","Permet d'affecter des temps passés directement depuis une vue tâche. Un onglet récapitulatif (non-modifiable) apparait également dans les onglets de la fiche projet. A noter que si vous utilisez le module Feuille de temps (RH), les temps passés renseignés alimenteront directement les feuilles de temps du module RH pour les collaborateurs/employés concernés.",,
"Allow to open discussion topic, where project members can interact, accessible via the the Tools menu.","Permet d'ouvrir des sujets de discussion où les membres du projet peuvent intéragir, accessible depuis le menu 'Outils' du projet. A différencier d'Annonce qui ne permet pas d'intéraction avec les utilisateurs et de Wiki qui est à considérer comme une base de documentation collaborative sur le projet.",,
"App",,,
Expand Down Expand Up @@ -219,6 +220,7 @@
"Notes",,,
"Number of days in a sprint","Nombre de jours dans un sprint",,
"Number of hours in a day","Nombre d'heures par jour",,
"Old sprint",,,
"On hold","En attente",,
"Open","Ouvrir",,
"Open gantt","Ouvrir gantt",,
Expand Down Expand Up @@ -451,7 +453,9 @@
"Topics","Sujets",,
"Topics (${name})","Sujets (${name})",,
"Total",,,
"Total allocated time","Temps total alloué",,
"Total duration (Hours)","Durée total (Heures)",,
"Total estimated time","Durée totale estimée",,
"Total planned hours","Temps total planifié (Heures)",,
"Type",,,
"Type of authorized activities","Type d’activités autorisées",,
Expand Down
11 changes: 1 addition & 10 deletions axelor-project/src/main/resources/views/Menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,7 @@
title="Projects and resources management" action="project.wizard.form" order="1820"/>

<action-view name="project.wizard.form"
title="Projects and resources management wizard" model="com.axelor.utils.db.Wizard">
title="Projects and resources management" model="com.axelor.utils.db.Wizard">
<view type="form" name="project-wizard-form"/>
</action-view>

<menuitem name="project.dashboard.sample" parent="project-reporting"
title="Projects and resources management" action="project.dashboard" order="1800"/>

<action-view name="project.dashboard" title="Projects and resources management">
<view type="dashboard" name="project.dashboard.sample"/>

</action-view>

</object-views>
47 changes: 38 additions & 9 deletions axelor-project/src/main/resources/views/ProjectWizard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
width="large" onNew="action-method-project-set-date" canNew="false" canDelete="false">
<panel name="filtersPanel">
<field name="$project" title="Project" colSpan="12" type="many-to-one"
onChange="action-project-record-empty-sprint,action-attrs-refresh-dashlets"
onChange="action-project-group-onchange-project"
target="com.axelor.apps.project.db.Project"/>
<field name="$fromDate" title="From Date" colSpan="3" type="date"
onChange="action-attrs-refresh-dashlets,action-project-record-empty-sprint-period,action-attrs-refresh-dashlets"
onChange="action-project-group-onchange-from-date"
required="true"/>
<field name="$toDate" title="To Date" colSpan="3" type="date"
onChange="action-attrs-refresh-dashlets,action-project-record-empty-sprint-period,action-attrs-refresh-dashlets"
onChange="action-project-group-onchange-to-date"
required="true"/>
<field name="$period" title="Allocation period" colSpan="3" type="many-to-one"
onChange="action-project-record-set-period-date,action-attrs-refresh-dashlets"
onChange="action-project-group-onchange-period"
target="com.axelor.apps.base.db.Period"
domain="self.year.typeSelect = 4 AND self.toDate > :__date__ "/>
<field name="$sprint" title="Sprint" readonlyIf="!$project" colSpan="3"
type="many-to-one"
onChange="action-attrs-refresh-dashlets,action-project-record-set-sprint-date,action-attrs-refresh-dashlets"
onChange="action-project-group-onchange-sprint"
onSelect="action-project-method-compute-sprint-domain"
target="com.axelor.apps.project.db.Sprint"/>
</panel>
Expand All @@ -36,7 +36,7 @@
<panel-dashlet name="project-allocation-line-action-dashlet" colSpan="12"
height="350" action="action-project-view-allocation-line" canSearch="true"/>
<panel-dashlet name="project-sprint-panel" colSpan="12" height="350"
action="action-project-sprint"/>
action="action-project-view-project-sprint"/>
</form>
<action-method model="com.axelor.utils.db.Wizard"
name="action-method-project-set-date">
Expand Down Expand Up @@ -81,7 +81,7 @@
</action-view>


<action-view name="action-project-sprint" model="com.axelor.apps.project.db.Sprint"
<action-view name="action-project-view-project-sprint" model="com.axelor.apps.project.db.Sprint"
title="Sprints">
<view name="project-sprint-grid" type="grid"/>
<view name="sprint-form" type="form"/>
Expand Down Expand Up @@ -128,15 +128,44 @@
<attribute for="project-sprint-panel" name="refresh" expr="eval: true"/>
</action-attrs>


<action-method name="action-project-method-compute-sprint-dashlet">
<call class="com.axelor.apps.project.web.ProjectManagementDashboardController"
method="setSprintDashlet"/>
</action-method>


<action-method name="action-project-management-dashboard-method-on-new">
<call class="com.axelor.apps.project.web.ProjectManagementDashboardController"
method="getData"/>
</action-method>

<action-group name="action-project-group-onchange-project">
<action name="action-project-record-empty-sprint"/>
<action name="action-attrs-refresh-dashlets"/>
</action-group>

<action-group name="action-project-group-onchange-from-date">
<action name="action-project-record-empty-sprint-period"/>
<action name="action-attrs-refresh-dashlets"/>
</action-group>

<action-group name="action-project-group-onchange-to-date">
<action name="action-project-record-empty-sprint-period"/>
<action name="action-attrs-refresh-dashlets"/>
</action-group>

<action-group name="action-project-group-onchange-to-date">
<action name="action-project-record-empty-sprint-period"/>
<action name="action-attrs-refresh-dashlets"/>
</action-group>

<action-group name="action-project-group-onchange-period">
<action name="action-project-record-set-period-date"/>
<action name="action-attrs-refresh-dashlets"/>
</action-group>

<action-group name="action-project-group-onchange-sprint">
<action name="action-project-record-set-sprint-date"/>
<action name="action-attrs-refresh-dashlets"/>
</action-group>

</object-views>

0 comments on commit ee97eaa

Please sign in to comment.