diff options
| author | rpa (Open ERP) <rpa@tinyerp.com> | 2011-01-12 10:50:56 +0530 |
|---|---|---|
| committer | rpa (Open ERP) <rpa@tinyerp.com> | 2011-01-12 10:50:56 +0530 |
| commit | bb27940acc03224a964e2c73fe45ffef00dd5fd3 (patch) | |
| tree | 0fe45a08a8ad2c836510b1c04d45838842e16702 /addons/project_long_term | |
| parent | fdc5f0224ce97550f3f32ec01b06d076ecd3a10e (diff) | |
| parent | 18ba46034c998caf36a661143909eb10c990f271 (diff) | |
[MERGE]: Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: rpa@tinyerp.com-20110112052056-19qrc933vhek1g4h
Diffstat (limited to 'addons/project_long_term')
22 files changed, 2738 insertions, 309 deletions
diff --git a/addons/project_long_term/__openerp__.py b/addons/project_long_term/__openerp__.py index 0d03b5f7315..25d06e3efe1 100644 --- a/addons/project_long_term/__openerp__.py +++ b/addons/project_long_term/__openerp__.py @@ -40,9 +40,15 @@ Features. "init_xml": [], "demo_xml": ["project_long_term_demo.xml"], "test": [ + 'test/project_schedule_consecutive_day.yml', + 'test/project_schedule_without_wroking_hour.yml', 'test/schedule_project_phases.yml', + 'test/phase_constraint.yml', + 'test/test_schedule_phases_case2.yml', + 'test/test_schedule_phases_case1.yml', 'test/schedule_project_tasks.yml', - 'test/schedule_phase_tasks.yml' + 'test/schedule_phase_tasks.yml', + 'test/test_schedule_tasks_case1.yml' ], "update_xml": [ "security/ir.model.access.csv", diff --git a/addons/project_long_term/i18n/de.po b/addons/project_long_term/i18n/de.po index 4c2b9281003..2863f5d6d00 100644 --- a/addons/project_long_term/i18n/de.po +++ b/addons/project_long_term/i18n/de.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-03 16:58+0000\n" -"PO-Revision-Date: 2010-12-31 14:22+0000\n" +"PO-Revision-Date: 2011-01-10 16:42+0000\n" "Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-" "consulting.net>\n" "Language-Team: German <de@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-06 05:36+0000\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: project_long_term @@ -62,7 +62,7 @@ msgstr "Ressourcenaufteilung" #. module: project_long_term #: view:project.phase:0 msgid "Displaying settings" -msgstr "" +msgstr "Anzeigekonfiguration" #. module: project_long_term #: field:project.compute.phases,target_project:0 @@ -163,12 +163,16 @@ msgid "" "Resources should be allocated to your phases and Members should be assigned " "to your Project!" msgstr "" +"Ressourcen sollten auf Ihre Projektphasen verteilt werden, " +"Projektmitarbeiter sollten auf Ihre Projekte verteilt werden." #. module: project_long_term #: help:project.phase,date_end:0 msgid "" " It's computed by the scheduler according to the start date and the duration." msgstr "" +" Wird berechnet durch einen Planungsassistenten in Abhängigkeit von Beginn " +"und Dauer." #. module: project_long_term #: model:ir.model,name:project_long_term.model_project_project @@ -348,7 +352,7 @@ msgstr "OK" #. module: project_long_term #: view:project.phase:0 msgid "Schedule and Display info" -msgstr "" +msgstr "Info Planungsassistent und Anzeige" #. module: project_long_term #: view:project.phase:0 @@ -363,7 +367,7 @@ msgstr "Start Datum der Phase muss vor dem Ende Datum sein." #. module: project_long_term #: model:ir.model,name:project_long_term.model_project_schedule_tasks msgid "project.schedule.tasks" -msgstr "" +msgstr "project.schedule.tasks" #. module: project_long_term #: model:ir.actions.act_window,help:project_long_term.act_project_phase @@ -375,6 +379,14 @@ msgid "" "human resources, convert your phases into a series of tasks when you start " "working on the project." msgstr "" +"Ein Projekt kann in verschiedene Phasen aufgeteilt werden. Für jede Phase " +"können Sie zur automatischen Terminierung die Ressourcenaufteilung " +"definieren, Aufgaben beschreiben und die Phase sowohl mit vorhergehenden als " +"auch nachfolgenden Phasen verknüpfen oder Bedingungen für feste Termine " +"hinterlegen. Benutzen Sie das Modul Planung für Langzeitprojekte zur " +"langfristigen Planung und Aufteilung verfügbarer Personalressourcen. " +"Konvertieren Sie die Phasen in konkrete Aufgabenlisten, wenn Sie die " +"Bearbeitung der Phasen eröffnen." #. module: project_long_term #: field:project.phase,date_start:0 @@ -417,10 +429,11 @@ msgstr "Benutzer" #. module: project_long_term #: help:project.phase,date_start:0 msgid "" -"It's computed according to the phases order : the start date of the 1st " -"phase is set by you while the other start dates depend on the end date of " -"their previous phases" -msgstr "Beginn der Phase" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." +msgstr "" +"Wird berechnet durch einen Planungsassistenten in Abhängigkeit vom " +"Projektdatum oder dem Ende Datum der vorherigen Projektphase." #. module: project_long_term #: view:project.phase:0 @@ -581,7 +594,7 @@ msgstr "Bezeichnung" #. module: project_long_term #: view:project.phase:0 msgid "Tasks Details" -msgstr "" +msgstr "Aufgabendetails" #. module: project_long_term #: model:ir.ui.menu,name:project_long_term.menu_view_resource_calendar @@ -748,3 +761,9 @@ msgstr "Dauer" #~ msgid "" #~ "It's computed by the scheduler according to the start date and the duration." #~ msgstr "Ende Datum d. Phase" + +#~ msgid "" +#~ "It's computed according to the phases order : the start date of the 1st " +#~ "phase is set by you while the other start dates depend on the end date of " +#~ "their previous phases" +#~ msgstr "Beginn der Phase" diff --git a/addons/project_long_term/i18n/en_US.po b/addons/project_long_term/i18n/en_US.po index 15a3bd4034b..3e64d59a5c1 100644 --- a/addons/project_long_term/i18n/en_US.po +++ b/addons/project_long_term/i18n/en_US.po @@ -451,8 +451,8 @@ msgstr "Phase" #. module: project_long_term #: help:project.phase,date_start:0 #: field:project.resource.allocation,phase_id_date_start:0 -msgid "It's computed according to the phases order : the start date of the 1st phase is set by you while the other start dates depend on the end date of their previous phases" -msgstr "It's computed according to the phases order : the start date of the 1st phase is set by you while the other start dates depend on the end date of their previous phases" +msgid "It's computed by the scheduler according the project date or the end date of the previous phase." +msgstr "It's computed by the scheduler according the project date or the end date of the previous phase." #. module: project_long_term #: help:project.phase,state:0 diff --git a/addons/project_long_term/i18n/es.po b/addons/project_long_term/i18n/es.po index 829d67c1531..02864f319b0 100644 --- a/addons/project_long_term/i18n/es.po +++ b/addons/project_long_term/i18n/es.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-06 05:36+0000\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: project_long_term @@ -394,9 +394,8 @@ msgstr "Usuario" #. module: project_long_term #: help:project.phase,date_start:0 msgid "" -"It's computed according to the phases order : the start date of the 1st " -"phase is set by you while the other start dates depend on the end date of " -"their previous phases" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." msgstr "" #. module: project_long_term diff --git a/addons/project_long_term/i18n/fr.po b/addons/project_long_term/i18n/fr.po index b1b6b9b00d1..1df309a8c2a 100644 --- a/addons/project_long_term/i18n/fr.po +++ b/addons/project_long_term/i18n/fr.po @@ -7,14 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-03 16:58+0000\n" -"PO-Revision-Date: 2011-01-07 23:29+0000\n" -"Last-Translator: Maxime Chambreuil (http://www.savoirfairelinux.com) " -"<maxime.chambreuil@savoirfairelinux.com>\n" +"PO-Revision-Date: 2011-01-10 11:00+0000\n" +"Last-Translator: Quentin THEURET <quentin@theuret.net>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-09 04:54+0000\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: project_long_term @@ -165,12 +164,15 @@ msgid "" "Resources should be allocated to your phases and Members should be assigned " "to your Project!" msgstr "" +"Des ressources devraient être allouées à vos phases et des membres devraient " +"être affectés à votre projet !" #. module: project_long_term #: help:project.phase,date_end:0 msgid "" " It's computed by the scheduler according to the start date and the duration." msgstr "" +" C'est calculé par l'ordonnanceur selon la date de début et la durée." #. module: project_long_term #: model:ir.model,name:project_long_term.model_project_project @@ -352,7 +354,7 @@ msgstr "_Ok" #. module: project_long_term #: view:project.phase:0 msgid "Schedule and Display info" -msgstr "" +msgstr "Ordonnancer et afficher les informations" #. module: project_long_term #: view:project.phase:0 @@ -381,6 +383,12 @@ msgid "" "human resources, convert your phases into a series of tasks when you start " "working on the project." msgstr "" +"Un projet peut être divisé en différentes phases. Pour chaque phase, on peut " +"allouer de ressources, décrire différentes tâches et chaîner la phase aux " +"précédentes et suivantes, ajouter des contraintes de date pour " +"l'ordonnancement automatique. Utiliser la planification à long terme pour " +"planifier la disponibilité des ressources humaines, convertir les phases en " +"une série de tâches quand on commence à travailler sur le projet." #. module: project_long_term #: field:project.phase,date_start:0 @@ -423,10 +431,9 @@ msgstr "Utilisateur" #. module: project_long_term #: help:project.phase,date_start:0 msgid "" -"It's computed according to the phases order : the start date of the 1st " -"phase is set by you while the other start dates depend on the end date of " -"their previous phases" -msgstr "Date de début de la phase" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." +msgstr "" #. module: project_long_term #: view:project.phase:0 @@ -687,3 +694,9 @@ msgstr "Durée" #~ msgid "" #~ "It's computed by the scheduler according to the start date and the duration." #~ msgstr "Date de fin de la phase" + +#~ msgid "" +#~ "It's computed according to the phases order : the start date of the 1st " +#~ "phase is set by you while the other start dates depend on the end date of " +#~ "their previous phases" +#~ msgstr "Date de début de la phase" diff --git a/addons/project_long_term/i18n/hu.po b/addons/project_long_term/i18n/hu.po new file mode 100644 index 00000000000..1c95b32c219 --- /dev/null +++ b/addons/project_long_term/i18n/hu.po @@ -0,0 +1,628 @@ +# Hungarian translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-01-03 16:58+0000\n" +"PO-Revision-Date: 2011-01-10 11:05+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Hungarian <hu@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#. module: project_long_term +#: model:ir.module.module,shortdesc:project_long_term.module_meta_information +msgid "Long Term Project Management" +msgstr "" + +#. module: project_long_term +#: view:project.compute.phases:0 +msgid "Compute Scheduling of Phases" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,next_phase_ids:0 +msgid "Next Phases" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Project's Tasks" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_project_phases +msgid "Phases" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: view:project.resource.allocation:0 +msgid "Group By..." +msgstr "" + +#. module: project_long_term +#: constraint:project.project:0 +msgid "Error! project start-date must be lower then project end-date." +msgstr "" + +#. module: project_long_term +#: view:project.resource.allocation:0 +msgid "Resources Allocation" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Displaying settings" +msgstr "" + +#. module: project_long_term +#: field:project.compute.phases,target_project:0 +msgid "Schedule" +msgstr "" + +#. module: project_long_term +#: model:ir.module.module,description:project_long_term.module_meta_information +msgid "" +"\n" +"\n" +" Long Term Project management module that tracks planning, " +"scheduling, resources allocation.\n" +" Mainly used with Big project management.\n" +" - Project Phases will be maintained by Manager of the project\n" +" - Compute Phase Scheduling: Compute start date and end date of " +"the phases which are in draft,open and pending state of the project given.\n" +" If no project given then all the " +"draft,open and pending state phases will be taken\n" +" - Compute Task Scheduling: This works same as the scheduler " +"button on project.phase. It takes the project as argument and computes all " +"the open,draft and pending tasks\n" +" - Schedule Tasks: All the tasks which are in draft,pending and " +"open state are scheduled with taking the phase's start date\n" +"\n" +" " +msgstr "" + +#. module: project_long_term +#: constraint:project.task:0 +msgid "Error ! You cannot create recursive tasks." +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_resouce_allocation +#: model:ir.ui.menu,name:project_long_term.menu_resouce_allocation +msgid "Resource Allocations" +msgstr "" + +#. module: project_long_term +#: constraint:project.project:0 +msgid "Error! You cannot assign escalation to the same project!" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:130 +#, python-format +msgid "Day" +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_task +msgid "Task" +msgstr "" + +#. module: project_long_term +#: selection:project.compute.phases,target_project:0 +msgid "Compute a Single Project" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,previous_phase_ids:0 +msgid "Previous Phases" +msgstr "" + +#. module: project_long_term +#: help:project.phase,product_uom:0 +msgid "UoM (Unit of Measure) is the unit of measurement for Duration" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:489 +#, python-format +msgid "" +"Resources should be allocated to your phases and Members should be assigned " +"to your Project!" +msgstr "" + +#. module: project_long_term +#: help:project.phase,date_end:0 +msgid "" +" It's computed by the scheduler according to the start date and the duration." +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_project +#: field:project.compute.phases,project_id:0 +#: field:project.compute.tasks,project_id:0 +#: view:project.phase:0 +#: field:project.phase,project_id:0 +#: view:project.resource.allocation:0 +#: field:project.resource.allocation,project_id:0 +#: view:project.task:0 +msgid "Project" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/wizard/project_compute_phases.py:50 +#, python-format +msgid "Error!" +msgstr "" + +#. module: project_long_term +#: selection:project.phase,state:0 +msgid "Cancelled" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:426 +#, python-format +msgid "No tasks to compute for Project '%s'." +msgstr "" + +#. module: project_long_term +#: help:project.resource.allocation,date_end:0 +msgid "Ending Date" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Planning" +msgstr "" + +#. module: project_long_term +#: field:project.phase,constraint_date_end:0 +msgid "Deadline" +msgstr "" + +#. module: project_long_term +#: view:project.compute.phases:0 +#: view:project.compute.tasks:0 +msgid "_Cancel" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.action_project_compute_phases +#: model:ir.ui.menu,name:project_long_term.menu_compute_phase +msgid "Compute Phase Scheduling" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:192 +#, python-format +msgid " (copy)" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: view:project.resource.allocation:0 +#: field:project.resource.allocation,useability:0 +msgid "Availability" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,state:0 +msgid "State" +msgstr "" + +#. module: project_long_term +#: view:project.compute.phases:0 +#: view:project.compute.tasks:0 +msgid "C_ompute" +msgstr "" + +#. module: project_long_term +#: view:project.compute.phases:0 +msgid "Compute Scheduling of phases for all or specified project" +msgstr "" + +#. module: project_long_term +#: field:project.phase,product_uom:0 +msgid "Duration UoM" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.action_project_compute_tasks +#: model:ir.ui.menu,name:project_long_term.menu_compute_tasks +msgid "Compute Task Scheduling" +msgstr "" + +#. module: project_long_term +#: field:project.phase,constraint_date_start:0 +msgid "Minimum Start Date" +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_resource_allocation +#: view:project.phase:0 +#: view:project.resource.allocation:0 +msgid "Project Resource Allocation" +msgstr "" + +#. module: project_long_term +#: view:project.compute.tasks:0 +msgid "Compute Scheduling of Task" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_project_resource +#: model:ir.ui.menu,name:project_long_term.menu_pm_resources_project1 +#: model:ir.ui.menu,name:project_long_term.menu_view_resource +#: view:project.resource.allocation:0 +msgid "Resources" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,help:project_long_term.action_project_compute_phases +msgid "" +"To schedule phases of all or a specified project. It then open a gantt " +"view.\n" +"\t " +msgstr "" + +#. module: project_long_term +#: help:project.resource.allocation,date_start:0 +msgid "Starting Date" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.project_phase_task_list +msgid "Related Tasks" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Dates" +msgstr "" + +#. module: project_long_term +#: help:project.resource.allocation,useability:0 +msgid "" +"Availability of this resource for this project phase in percentage (=50%)" +msgstr "" + +#. module: project_long_term +#: help:project.phase,constraint_date_start:0 +msgid "force the phase to start after this date" +msgstr "" + +#. module: project_long_term +#: field:project.phase,task_ids:0 +msgid "Project Tasks" +msgstr "" + +#. module: project_long_term +#: field:project.phase,resource_ids:0 +msgid "Project Resources" +msgstr "" + +#. module: project_long_term +#: view:project.schedule.tasks:0 +msgid "_Ok" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Schedule and Display info" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Month" +msgstr "" + +#. module: project_long_term +#: constraint:project.phase:0 +msgid "Phase start-date must be lower than phase end-date." +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_schedule_tasks +msgid "project.schedule.tasks" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,help:project_long_term.act_project_phase +msgid "" +"A project can be split into the different phases. For each phase, you can " +"define your resources allocation, describe different tasks and link your " +"phase to previous and next phases, add date constraints for the automated " +"scheduling. Use the long term planning in order to planify your available " +"human resources, convert your phases into a series of tasks when you start " +"working on the project." +msgstr "" + +#. module: project_long_term +#: field:project.phase,date_start:0 +#: field:project.resource.allocation,date_start:0 +msgid "Start Date" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Resource Allocation" +msgstr "" + +#. module: project_long_term +#: help:project.phase,constraint_date_end:0 +msgid "force the phase to finish before this date" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "Draft" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "Pending" +msgstr "" + +#. module: project_long_term +#: field:project.resource.allocation,name:0 +msgid "unknown" +msgstr "" + +#. module: project_long_term +#: field:project.resource.allocation,user_id:0 +msgid "User" +msgstr "" + +#. module: project_long_term +#: help:project.phase,date_start:0 +msgid "" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Task Detail" +msgstr "" + +#. module: project_long_term +#: help:project.project,resource_calendar_id:0 +msgid "Timetable working hours to adjust the gantt diagram report" +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_compute_tasks +msgid "Project Compute Tasks" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:244 +#, python-format +msgid "No responsible person assigned !" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:489 +#, python-format +msgid "Error" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:244 +#, python-format +msgid "You must assign a responsible person for phase '%s' !" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Constraints" +msgstr "" + +#. module: project_long_term +#: help:project.phase,sequence:0 +msgid "Gives the sequence order when displaying a list of phases." +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_project_phase +#: model:ir.actions.act_window,name:project_long_term.act_project_phase_list +#: model:ir.ui.menu,name:project_long_term.menu_project_phase +#: model:ir.ui.menu,name:project_long_term.menu_project_phase_list +#: view:project.phase:0 +#: field:project.project,phase_ids:0 +msgid "Project Phases" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "Done" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Cancel" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "In Progress" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Remaining Hours" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,responsible_id:0 +msgid "Responsible" +msgstr "" + +#. module: project_long_term +#: field:project.project,resource_calendar_id:0 +msgid "Working Time" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Current" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Start Phase" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/wizard/project_compute_phases.py:50 +#, python-format +msgid "Please Specify Project to be schedule" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,total_hours:0 +msgid "Total Hours" +msgstr "" + +#. module: project_long_term +#: view:project.schedule.tasks:0 +msgid "Task Scheduling completed successfully." +msgstr "" + +#. module: project_long_term +#: view:project.compute.tasks:0 +msgid "Compute Scheduling of Task for specified project." +msgstr "" + +#. module: project_long_term +#: view:project.resource.allocation:0 +msgid "Phase" +msgstr "" + +#. module: project_long_term +#: help:project.phase,state:0 +msgid "" +"If the phase is created the state 'Draft'.\n" +" If the phase is started, the state becomes 'In Progress'.\n" +" If review is needed the phase is in 'Pending' state. " +" \n" +" If the phase is over, the states is set to 'Done'." +msgstr "" + +#. module: project_long_term +#: field:project.phase,date_end:0 +#: field:project.resource.allocation,date_end:0 +msgid "End Date" +msgstr "" + +#. module: project_long_term +#: view:project.resource.allocation:0 +#: field:project.resource.allocation,resource_id:0 +msgid "Resource" +msgstr "" + +#. module: project_long_term +#: field:project.phase,name:0 +msgid "Name" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Tasks Details" +msgstr "" + +#. module: project_long_term +#: model:ir.ui.menu,name:project_long_term.menu_view_resource_calendar +msgid "Working Period" +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_resource_resource +msgid "Resource Detail" +msgstr "" + +#. module: project_long_term +#: model:ir.ui.menu,name:project_long_term.menu_phase_schedule +msgid "Scheduling" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:329 +#, python-format +msgid "No tasks to compute for Phase '%s'." +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_phase +#: view:project.phase:0 +#: field:project.resource.allocation,phase_id:0 +#: view:project.task:0 +#: field:project.task,phase_id:0 +msgid "Project Phase" +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_compute_phases +msgid "Project Compute Phases" +msgstr "" + +#. module: project_long_term +#: field:project.schedule.tasks,msg:0 +msgid "Message" +msgstr "" + +#. module: project_long_term +#: constraint:project.phase:0 +msgid "Loops in phases not allowed" +msgstr "" + +#. module: project_long_term +#: field:project.phase,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: project_long_term +#: selection:project.compute.phases,target_project:0 +msgid "Compute All Projects" +msgstr "" + +#. module: project_long_term +#: model:ir.ui.menu,name:project_long_term.menu_view_resource_calendar_leaves +msgid "Resource Leaves" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.action_project_schedule_tasks +#: view:project.phase:0 +#: view:project.schedule.tasks:0 +msgid "Schedule Tasks" +msgstr "" + +#. module: project_long_term +#: help:project.phase,duration:0 +msgid "By default in days" +msgstr "" + +#. module: project_long_term +#: field:project.phase,duration:0 +msgid "Duration" +msgstr "" diff --git a/addons/project_long_term/i18n/it.po b/addons/project_long_term/i18n/it.po new file mode 100644 index 00000000000..95ac59d3674 --- /dev/null +++ b/addons/project_long_term/i18n/it.po @@ -0,0 +1,632 @@ +# Italian translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-01-03 16:58+0000\n" +"PO-Revision-Date: 2011-01-09 18:54+0000\n" +"Last-Translator: Nicola Riolini - Micronaet <Unknown>\n" +"Language-Team: Italian <it@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" +"X-Generator: Launchpad (build Unknown)\n" + +#. module: project_long_term +#: model:ir.module.module,shortdesc:project_long_term.module_meta_information +msgid "Long Term Project Management" +msgstr "Gestione progetti a lungo termine" + +#. module: project_long_term +#: view:project.compute.phases:0 +msgid "Compute Scheduling of Phases" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,next_phase_ids:0 +msgid "Next Phases" +msgstr "Prossima fase" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Project's Tasks" +msgstr "Attività del progetto" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_project_phases +msgid "Phases" +msgstr "Fasi" + +#. module: project_long_term +#: view:project.phase:0 +#: view:project.resource.allocation:0 +msgid "Group By..." +msgstr "Raggruppa per..." + +#. module: project_long_term +#: constraint:project.project:0 +msgid "Error! project start-date must be lower then project end-date." +msgstr "" +"Errore! La data inizio del progetto deve essere antecedente alla data fine." + +#. module: project_long_term +#: view:project.resource.allocation:0 +msgid "Resources Allocation" +msgstr "Allocazione risorse" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Displaying settings" +msgstr "Visualizza impostazioni" + +#. module: project_long_term +#: field:project.compute.phases,target_project:0 +msgid "Schedule" +msgstr "Pianificazione" + +#. module: project_long_term +#: model:ir.module.module,description:project_long_term.module_meta_information +msgid "" +"\n" +"\n" +" Long Term Project management module that tracks planning, " +"scheduling, resources allocation.\n" +" Mainly used with Big project management.\n" +" - Project Phases will be maintained by Manager of the project\n" +" - Compute Phase Scheduling: Compute start date and end date of " +"the phases which are in draft,open and pending state of the project given.\n" +" If no project given then all the " +"draft,open and pending state phases will be taken\n" +" - Compute Task Scheduling: This works same as the scheduler " +"button on project.phase. It takes the project as argument and computes all " +"the open,draft and pending tasks\n" +" - Schedule Tasks: All the tasks which are in draft,pending and " +"open state are scheduled with taking the phase's start date\n" +"\n" +" " +msgstr "" + +#. module: project_long_term +#: constraint:project.task:0 +msgid "Error ! You cannot create recursive tasks." +msgstr "Errore ! Non è possibile creare attività ricorsive." + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_resouce_allocation +#: model:ir.ui.menu,name:project_long_term.menu_resouce_allocation +msgid "Resource Allocations" +msgstr "Allocazione risorse" + +#. module: project_long_term +#: constraint:project.project:0 +msgid "Error! You cannot assign escalation to the same project!" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:130 +#, python-format +msgid "Day" +msgstr "Giorno" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_task +msgid "Task" +msgstr "Attività" + +#. module: project_long_term +#: selection:project.compute.phases,target_project:0 +msgid "Compute a Single Project" +msgstr "Calcola un singolo progetto" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,previous_phase_ids:0 +msgid "Previous Phases" +msgstr "Fase precedente" + +#. module: project_long_term +#: help:project.phase,product_uom:0 +msgid "UoM (Unit of Measure) is the unit of measurement for Duration" +msgstr "U.M. (unità di misura) è l'unità per la misurazione della durata" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:489 +#, python-format +msgid "" +"Resources should be allocated to your phases and Members should be assigned " +"to your Project!" +msgstr "" + +#. module: project_long_term +#: help:project.phase,date_end:0 +msgid "" +" It's computed by the scheduler according to the start date and the duration." +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_project +#: field:project.compute.phases,project_id:0 +#: field:project.compute.tasks,project_id:0 +#: view:project.phase:0 +#: field:project.phase,project_id:0 +#: view:project.resource.allocation:0 +#: field:project.resource.allocation,project_id:0 +#: view:project.task:0 +msgid "Project" +msgstr "Progetto" + +#. module: project_long_term +#: code:addons/project_long_term/wizard/project_compute_phases.py:50 +#, python-format +msgid "Error!" +msgstr "Errore!" + +#. module: project_long_term +#: selection:project.phase,state:0 +msgid "Cancelled" +msgstr "Annullato" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:426 +#, python-format +msgid "No tasks to compute for Project '%s'." +msgstr "Nessuna attività da calcolare per il progetto: \"%s\"." + +#. module: project_long_term +#: help:project.resource.allocation,date_end:0 +msgid "Ending Date" +msgstr "Data fine" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Planning" +msgstr "Pianificazione" + +#. module: project_long_term +#: field:project.phase,constraint_date_end:0 +msgid "Deadline" +msgstr "Scadenza" + +#. module: project_long_term +#: view:project.compute.phases:0 +#: view:project.compute.tasks:0 +msgid "_Cancel" +msgstr "_Annulla" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.action_project_compute_phases +#: model:ir.ui.menu,name:project_long_term.menu_compute_phase +msgid "Compute Phase Scheduling" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:192 +#, python-format +msgid " (copy)" +msgstr " (copia)" + +#. module: project_long_term +#: view:project.phase:0 +#: view:project.resource.allocation:0 +#: field:project.resource.allocation,useability:0 +msgid "Availability" +msgstr "Disponibilità" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,state:0 +msgid "State" +msgstr "Stato" + +#. module: project_long_term +#: view:project.compute.phases:0 +#: view:project.compute.tasks:0 +msgid "C_ompute" +msgstr "C_alcola" + +#. module: project_long_term +#: view:project.compute.phases:0 +msgid "Compute Scheduling of phases for all or specified project" +msgstr "" + +#. module: project_long_term +#: field:project.phase,product_uom:0 +msgid "Duration UoM" +msgstr "U.M. durata" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.action_project_compute_tasks +#: model:ir.ui.menu,name:project_long_term.menu_compute_tasks +msgid "Compute Task Scheduling" +msgstr "" + +#. module: project_long_term +#: field:project.phase,constraint_date_start:0 +msgid "Minimum Start Date" +msgstr "Data inizio minima" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_resource_allocation +#: view:project.phase:0 +#: view:project.resource.allocation:0 +msgid "Project Resource Allocation" +msgstr "Allocazione risorse progetto" + +#. module: project_long_term +#: view:project.compute.tasks:0 +msgid "Compute Scheduling of Task" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_project_resource +#: model:ir.ui.menu,name:project_long_term.menu_pm_resources_project1 +#: model:ir.ui.menu,name:project_long_term.menu_view_resource +#: view:project.resource.allocation:0 +msgid "Resources" +msgstr "Risorse" + +#. module: project_long_term +#: model:ir.actions.act_window,help:project_long_term.action_project_compute_phases +msgid "" +"To schedule phases of all or a specified project. It then open a gantt " +"view.\n" +"\t " +msgstr "" + +#. module: project_long_term +#: help:project.resource.allocation,date_start:0 +msgid "Starting Date" +msgstr "Data di inizio" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.project_phase_task_list +msgid "Related Tasks" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Dates" +msgstr "Date" + +#. module: project_long_term +#: help:project.resource.allocation,useability:0 +msgid "" +"Availability of this resource for this project phase in percentage (=50%)" +msgstr "" +"Disponibilità di questa risorsa per questa fase di progetto in percentuale " +"(=50%)" + +#. module: project_long_term +#: help:project.phase,constraint_date_start:0 +msgid "force the phase to start after this date" +msgstr "forza l'inizio della fase dopo questa data" + +#. module: project_long_term +#: field:project.phase,task_ids:0 +msgid "Project Tasks" +msgstr "Attività del Progetto" + +#. module: project_long_term +#: field:project.phase,resource_ids:0 +msgid "Project Resources" +msgstr "Risorse progetto" + +#. module: project_long_term +#: view:project.schedule.tasks:0 +msgid "_Ok" +msgstr "_Ok" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Schedule and Display info" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Month" +msgstr "Mese" + +#. module: project_long_term +#: constraint:project.phase:0 +msgid "Phase start-date must be lower than phase end-date." +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_schedule_tasks +msgid "project.schedule.tasks" +msgstr "project.schedule.tasks" + +#. module: project_long_term +#: model:ir.actions.act_window,help:project_long_term.act_project_phase +msgid "" +"A project can be split into the different phases. For each phase, you can " +"define your resources allocation, describe different tasks and link your " +"phase to previous and next phases, add date constraints for the automated " +"scheduling. Use the long term planning in order to planify your available " +"human resources, convert your phases into a series of tasks when you start " +"working on the project." +msgstr "" + +#. module: project_long_term +#: field:project.phase,date_start:0 +#: field:project.resource.allocation,date_start:0 +msgid "Start Date" +msgstr "Data inizio" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Resource Allocation" +msgstr "Allocazione risorsa" + +#. module: project_long_term +#: help:project.phase,constraint_date_end:0 +msgid "force the phase to finish before this date" +msgstr "forza la fine della fase dopo questa data" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "Draft" +msgstr "Bozza" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "Pending" +msgstr "In sospeso" + +#. module: project_long_term +#: field:project.resource.allocation,name:0 +msgid "unknown" +msgstr "sconosciuto" + +#. module: project_long_term +#: field:project.resource.allocation,user_id:0 +msgid "User" +msgstr "Utente" + +#. module: project_long_term +#: help:project.phase,date_start:0 +msgid "" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Task Detail" +msgstr "Dettaglio dell'attività" + +#. module: project_long_term +#: help:project.project,resource_calendar_id:0 +msgid "Timetable working hours to adjust the gantt diagram report" +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_compute_tasks +msgid "Project Compute Tasks" +msgstr "" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:244 +#, python-format +msgid "No responsible person assigned !" +msgstr "Nessuna persona responsabile assegnata!" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:489 +#, python-format +msgid "Error" +msgstr "Errore" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:244 +#, python-format +msgid "You must assign a responsible person for phase '%s' !" +msgstr "" +"E' necessario assegnare una persona responsabile per la fase: \"%s\"!" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Constraints" +msgstr "Vincoli" + +#. module: project_long_term +#: help:project.phase,sequence:0 +msgid "Gives the sequence order when displaying a list of phases." +msgstr "Fornisce l'ordinamento quando viene visualizzata la lista di fasi." + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.act_project_phase +#: model:ir.actions.act_window,name:project_long_term.act_project_phase_list +#: model:ir.ui.menu,name:project_long_term.menu_project_phase +#: model:ir.ui.menu,name:project_long_term.menu_project_phase_list +#: view:project.phase:0 +#: field:project.project,phase_ids:0 +msgid "Project Phases" +msgstr "Fasi progetto" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "Done" +msgstr "Completato" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Cancel" +msgstr "Annulla" + +#. module: project_long_term +#: view:project.phase:0 +#: selection:project.phase,state:0 +msgid "In Progress" +msgstr "In corso" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Remaining Hours" +msgstr "Ore Rimanenti" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,responsible_id:0 +msgid "Responsible" +msgstr "Responsabile" + +#. module: project_long_term +#: field:project.project,resource_calendar_id:0 +msgid "Working Time" +msgstr "" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Current" +msgstr "Attuale" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Start Phase" +msgstr "Inizia fase" + +#. module: project_long_term +#: code:addons/project_long_term/wizard/project_compute_phases.py:50 +#, python-format +msgid "Please Specify Project to be schedule" +msgstr "Prego specificare il progetto da pianificare" + +#. module: project_long_term +#: view:project.phase:0 +#: field:project.phase,total_hours:0 +msgid "Total Hours" +msgstr "Ore Totali" + +#. module: project_long_term +#: view:project.schedule.tasks:0 +msgid "Task Scheduling completed successfully." +msgstr "Attività pianificata completata con successo." + +#. module: project_long_term +#: view:project.compute.tasks:0 +msgid "Compute Scheduling of Task for specified project." +msgstr "" + +#. module: project_long_term +#: view:project.resource.allocation:0 +msgid "Phase" +msgstr "Fase" + +#. module: project_long_term +#: help:project.phase,state:0 +msgid "" +"If the phase is created the state 'Draft'.\n" +" If the phase is started, the state becomes 'In Progress'.\n" +" If review is needed the phase is in 'Pending' state. " +" \n" +" If the phase is over, the states is set to 'Done'." +msgstr "" + +#. module: project_long_term +#: field:project.phase,date_end:0 +#: field:project.resource.allocation,date_end:0 +msgid "End Date" +msgstr "Data fine" + +#. module: project_long_term +#: view:project.resource.allocation:0 +#: field:project.resource.allocation,resource_id:0 +msgid "Resource" +msgstr "Risorsa" + +#. module: project_long_term +#: field:project.phase,name:0 +msgid "Name" +msgstr "Nome" + +#. module: project_long_term +#: view:project.phase:0 +msgid "Tasks Details" +msgstr "Dettagli Attività" + +#. module: project_long_term +#: model:ir.ui.menu,name:project_long_term.menu_view_resource_calendar +msgid "Working Period" +msgstr "" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_resource_resource +msgid "Resource Detail" +msgstr "Dettaglio risorsa" + +#. module: project_long_term +#: model:ir.ui.menu,name:project_long_term.menu_phase_schedule +msgid "Scheduling" +msgstr "Pianificazione" + +#. module: project_long_term +#: code:addons/project_long_term/project_long_term.py:329 +#, python-format +msgid "No tasks to compute for Phase '%s'." +msgstr "Nessuna attività da calcolare per la fase: \"%s\"." + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_phase +#: view:project.phase:0 +#: field:project.resource.allocation,phase_id:0 +#: view:project.task:0 +#: field:project.task,phase_id:0 +msgid "Project Phase" +msgstr "Fase progetto" + +#. module: project_long_term +#: model:ir.model,name:project_long_term.model_project_compute_phases +msgid "Project Compute Phases" +msgstr "" + +#. module: project_long_term +#: field:project.schedule.tasks,msg:0 +msgid "Message" +msgstr "Messaggio" + +#. module: project_long_term +#: constraint:project.phase:0 +msgid "Loops in phases not allowed" +msgstr "Le fasi circolari non sono permesse" + +#. module: project_long_term +#: field:project.phase,sequence:0 +msgid "Sequence" +msgstr "SequenzaC" + +#. module: project_long_term +#: selection:project.compute.phases,target_project:0 +msgid "Compute All Projects" +msgstr "Calcola tutti i progetti" + +#. module: project_long_term +#: model:ir.ui.menu,name:project_long_term.menu_view_resource_calendar_leaves +msgid "Resource Leaves" +msgstr "" + +#. module: project_long_term +#: model:ir.actions.act_window,name:project_long_term.action_project_schedule_tasks +#: view:project.phase:0 +#: view:project.schedule.tasks:0 +msgid "Schedule Tasks" +msgstr "Attività programmate" + +#. module: project_long_term +#: help:project.phase,duration:0 +msgid "By default in days" +msgstr "Per default in giorni" + +#. module: project_long_term +#: field:project.phase,duration:0 +msgid "Duration" +msgstr "Durata" diff --git a/addons/project_long_term/i18n/lv.po b/addons/project_long_term/i18n/lv.po index f7fc57d7f61..a1610ef975f 100644 --- a/addons/project_long_term/i18n/lv.po +++ b/addons/project_long_term/i18n/lv.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-06 05:36+0000\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: project_long_term @@ -391,9 +391,8 @@ msgstr "Lietotājs" #. module: project_long_term #: help:project.phase,date_start:0 msgid "" -"It's computed according to the phases order : the start date of the 1st " -"phase is set by you while the other start dates depend on the end date of " -"their previous phases" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." msgstr "" #. module: project_long_term diff --git a/addons/project_long_term/i18n/pl.po b/addons/project_long_term/i18n/pl.po index 7866d39f037..54668cb3efa 100644 --- a/addons/project_long_term/i18n/pl.po +++ b/addons/project_long_term/i18n/pl.po @@ -9,12 +9,12 @@ msgstr "" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2011-01-03 16:58+0000\n" "PO-Revision-Date: 2010-12-31 11:08+0000\n" -"Last-Translator: Sbh (Open ERP) <sbh@tinyerp.com>\n" +"Last-Translator: Sbh (OpenERP) <sbh@tinyerp.com>\n" "Language-Team: Polish <pl@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-06 05:36+0000\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: project_long_term @@ -391,9 +391,8 @@ msgstr "Użytkownik" #. module: project_long_term #: help:project.phase,date_start:0 msgid "" -"It's computed according to the phases order : the start date of the 1st " -"phase is set by you while the other start dates depend on the end date of " -"their previous phases" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." msgstr "" #. module: project_long_term diff --git a/addons/project_long_term/i18n/project_long_term.pot b/addons/project_long_term/i18n/project_long_term.pot index cfacf155fc5..82442f17b6c 100644 --- a/addons/project_long_term/i18n/project_long_term.pot +++ b/addons/project_long_term/i18n/project_long_term.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0.0-rc2\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-01-03 16:58:18+0000\n" -"PO-Revision-Date: 2011-01-03 16:58:18+0000\n" +"POT-Creation-Date: 2011-01-11 11:15:54+0000\n" +"PO-Revision-Date: 2011-01-11 11:15:54+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -99,7 +99,7 @@ msgid "Error! You cannot assign escalation to the same project!" msgstr "" #. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:130 +#: code:addons/project_long_term/project_long_term.py:133 #, python-format msgid "Day" msgstr "" @@ -126,12 +126,6 @@ msgid "UoM (Unit of Measure) is the unit of measurement for Duration" msgstr "" #. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:489 -#, python-format -msgid "Resources should be allocated to your phases and Members should be assigned to your Project!" -msgstr "" - -#. module: project_long_term #: help:project.phase,date_end:0 msgid " It's computed by the scheduler according to the start date and the duration." msgstr "" @@ -160,12 +154,6 @@ msgid "Cancelled" msgstr "" #. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:426 -#, python-format -msgid "No tasks to compute for Project '%s'." -msgstr "" - -#. module: project_long_term #: help:project.resource.allocation,date_end:0 msgid "Ending Date" msgstr "" @@ -193,7 +181,7 @@ msgid "Compute Phase Scheduling" msgstr "" #. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:192 +#: code:addons/project_long_term/project_long_term.py:195 #, python-format msgid " (copy)" msgstr "" @@ -310,6 +298,11 @@ msgid "Schedule and Display info" msgstr "" #. module: project_long_term +#: help:project.phase,date_start:0 +msgid "It's computed by the scheduler according the project date or the end date of the previous phase." +msgstr "" + +#. module: project_long_term #: view:project.phase:0 msgid "Month" msgstr "" @@ -368,11 +361,6 @@ msgid "User" msgstr "" #. module: project_long_term -#: help:project.phase,date_start:0 -msgid "It's computed according to the phases order : the start date of the 1st phase is set by you while the other start dates depend on the end date of their previous phases" -msgstr "" - -#. module: project_long_term #: view:project.phase:0 msgid "Task Detail" msgstr "" @@ -388,24 +376,6 @@ msgid "Project Compute Tasks" msgstr "" #. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:244 -#, python-format -msgid "No responsible person assigned !" -msgstr "" - -#. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:489 -#, python-format -msgid "Error" -msgstr "" - -#. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:244 -#, python-format -msgid "You must assign a responsible person for phase '%s' !" -msgstr "" - -#. module: project_long_term #: view:project.phase:0 msgid "Constraints" msgstr "" @@ -541,12 +511,6 @@ msgid "Scheduling" msgstr "" #. module: project_long_term -#: code:addons/project_long_term/project_long_term.py:329 -#, python-format -msgid "No tasks to compute for Phase '%s'." -msgstr "" - -#. module: project_long_term #: model:ir.model,name:project_long_term.model_project_phase #: view:project.phase:0 #: field:project.resource.allocation,phase_id:0 diff --git a/addons/project_long_term/i18n/pt.po b/addons/project_long_term/i18n/pt.po index fd6a5e08282..def25a6b05c 100644 --- a/addons/project_long_term/i18n/pt.po +++ b/addons/project_long_term/i18n/pt.po @@ -9,12 +9,12 @@ msgstr "" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2011-01-03 16:58+0000\n" "PO-Revision-Date: 2010-12-31 11:07+0000\n" -"Last-Translator: Sbh (Open ERP) <sbh@tinyerp.com>\n" +"Last-Translator: Sbh (OpenERP) <sbh@tinyerp.com>\n" "Language-Team: Portuguese <pt@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-06 05:36+0000\n" +"X-Launchpad-Export-Date: 2011-01-11 05:02+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: project_long_term @@ -391,10 +391,9 @@ msgstr "Utilizador" #. module: project_long_term #: help:project.phase,date_start:0 msgid "" -"It's computed according to the phases order : the start date of the 1st " -"phase is set by you while the other start dates depend on the end date of " -"their previous phases" -msgstr "Data de início da fase" +"It's computed by the scheduler according the project date or the end date of " +"the previous phase." +msgstr "" #. module: project_long_term #: view:project.phase:0 @@ -634,3 +633,9 @@ msgstr "Duração" #~ msgid "" #~ "It's computed by the scheduler according to the start date and the duration." #~ msgstr "Data de fim da fase" + +#~ msgid "" +#~ "It's computed according to the phases order : the start date of the 1st " +#~ "phase is set by you while the other start dates depend on the end date of " +#~ "their previous phases" +#~ msgstr "Data de início da fase" diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 45d75b16b05..fc4151d855f 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -23,8 +23,11 @@ from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta from tools.translate import _ from osv import fields, osv -from resource.faces import task as Task +from resource.faces import task as Task import operator +from new import classobj +import types +import new class project_phase(osv.osv): _name = "project.phase" @@ -105,7 +108,7 @@ class project_phase(osv.osv): _columns = { 'name': fields.char("Name", size=64, required=True), - 'date_start': fields.date('Start Date', help="It's computed according to the phases order : the start date of the 1st phase is set by you while the other start dates depend on the end date of their previous phases", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), + 'date_start': fields.date('Start Date', help="It's computed by the scheduler according the project date or the end date of the previous phase.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'date_end': fields.date('End Date', help=" It's computed by the scheduler according to the start date and the duration.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'constraint_date_start': fields.date('Minimum Start Date', help='force the phase to start after this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'constraint_date_end': fields.date('Deadline', help='force the phase to finish before this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), @@ -212,126 +215,177 @@ class project_phase(osv.osv): self.write(cr, uid, ids, {'state': 'done'}) return True - def generate_resources(self, cr, uid, ids, context=None): - """ - Return a list of Resource Class objects for the resources allocated to the phase. - """ - res = {} - resource_pool = self.pool.get('resource.resource') - for phase in self.browse(cr, uid, ids, context=context): - user_ids = map(lambda x:x.resource_id.user_id.id, phase.resource_ids) - project = phase.project_id - calendar_id = project.resource_calendar_id and project.resource_calendar_id.id or False - resource_objs = resource_pool.generate_resources(cr, uid, user_ids, calendar_id, context=context) - res[phase.id] = resource_objs - return res - - def generate_schedule(self, cr, uid, ids, start_date=False, calendar_id=False, context=None): - """ - Schedule phase with the start date till all the next phases are completed. - @param: start_date (datetime.datetime) : start date for the phase. It would be either Start date of phase or start date of project or system current date - @param: calendar_id : working calendar of the project - """ + def generate_phase(self, cr, uid, ids, f, parent=False, context=None): if context is None: context = {} + phase_ids = [] resource_pool = self.pool.get('resource.resource') data_pool = self.pool.get('ir.model.data') resource_allocation_pool = self.pool.get('project.resource.allocation') uom_pool = self.pool.get('product.uom') + task_pool = self.pool.get('project.task') data_model, day_uom_id = data_pool.get_object_reference(cr, uid, 'product', 'uom_day') for phase in self.browse(cr, uid, ids, context=context): - if not phase.responsible_id: - raise osv.except_osv(_('No responsible person assigned !'),_("You must assign a responsible person for phase '%s' !") % (phase.name,)) - - if not start_date: - start_date = phase.project_id.date_start or phase.date_start or datetime.now().strftime("%Y-%m-%d") - start_date = datetime.strftime((datetime.strptime(start_date, "%Y-%m-%d")), "%Y-%m-%d") - phase_resource_obj = self.generate_resources(cr, uid, [phase.id], context=context)[phase.id] avg_days = uom_pool._compute_qty(cr, uid, phase.product_uom.id, phase.duration, day_uom_id) - if not phase_resource_obj: #TOCHECK: why need this ? - avg_days = avg_days - 1 duration = str(avg_days) + 'd' # Create a new project for each phase - def Project(): - # If project has working calendar then that - # else the default one would be considered - start = start_date - minimum_time_unit = 1 - resource = phase_resource_obj - working_hours_per_day = 24 - vacation = [] - if calendar_id: - working_hours_per_day = 8 #TODO: it should be come from calendars - vacation = tuple(resource_pool.compute_vacation(cr, uid, calendar_id)) - working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context) - def phase(): - effort = duration + str_resource = ('%s & '*len(phase.resource_ids))[:-2] + str_vals = str_resource % tuple(map(lambda x: 'Resource_%s'%x.resource_id.id, phase.resource_ids)) - project = Task.BalancedProject(Project) + # Phases Defination for the Project + s = ''' + def Phase_%s(): + title = \"%s\" + effort = \'%s\' + resource = %s +'''%(phase.id, phase.name, duration, str_vals or False) - s_date = project.phase.start.to_datetime() - e_date = project.phase.end.to_datetime() # Recalculate date_start and date_end # according to constraints on date start and date end on phase - if phase.constraint_date_start and str(s_date) < phase.constraint_date_start: + start_date = '' + end_date = '' + if phase.constraint_date_start: start_date = datetime.strptime(phase.constraint_date_start, '%Y-%m-%d') + s += ''' + start = \"%s\" +'''%(datetime.strftime(start_date, "%Y-%m-%d")) else: - start_date = s_date - if phase.constraint_date_end and str(e_date) > phase.constraint_date_end: + if parent: + start = 'up.Phase_%s.end' % (parent.id) + s += ''' + start = %s +'''%(start) + else: + start = phase.project_id.date_start or phase.date_start + s += ''' + start = \"%s\" +'''%(start) + + if phase.constraint_date_end : end_date= datetime.strptime(phase.constraint_date_end, '%Y-%m-%d') - date_start = phase.constraint_date_end - else: - end_date = e_date - date_start = end_date - # Write the calculated dates back - ctx = context.copy() - ctx.update({'scheduler': True}) - self.write(cr, uid, [phase.id], { - 'date_start': start_date.strftime('%Y-%m-%d'), - 'date_end': end_date.strftime('%Y-%m-%d') - }, context=ctx) - # write dates into Resources Allocation - for resource in phase.resource_ids: - resource_allocation_pool.write(cr, uid, [resource.id], { - 'date_start': start_date.strftime('%Y-%m-%d'), - 'date_end': end_date.strftime('%Y-%m-%d') - }, context=ctx) + s += ''' + end = \"%s\" +'''%(datetime.strftime(end_date, "%Y-%m-%d")) + + + #start = datetime.strftime((datetime.strptime(start, "%Y-%m-%d")), "%Y-%m-%d") + + phase_ids.append(phase.id) + parent = False + task_ids = [] + todo_task_ids = task_pool.search(cr, uid, [('id', 'in', map(lambda x : x.id, phase.task_ids)), + ('state', 'in', ['draft', 'open', 'pending']) + ], order='sequence') + if todo_task_ids : + for task in task_pool.browse(cr, uid, todo_task_ids, context=context): + s += task_pool.generate_task(cr, uid, task.id, parent=parent, flag=False, context=context) + if not parent: + parent = task + task_ids.append(task.id) + + f += s + '\n' # Recursive call till all the next phases scheduled for next_phase in phase.next_phase_ids: - if next_phase.state in ['draft', 'open', 'pending']: - id_cal = next_phase.project_id.resource_calendar_id and next_phase.project_id.resource_calendar_id.id or False - self.generate_schedule(cr, uid, [next_phase.id], date_start+timedelta(days=1), id_cal, context=context) - else: - continue - return True + if next_phase.state in ['draft', 'open', 'pending']: + rf, rphase_ids = self.generate_phase(cr, uid, [next_phase.id], f = '', parent=phase, context=context) + f += rf +'\n' + phase_ids += rphase_ids + else: + continue + return f, phase_ids def schedule_tasks(self, cr, uid, ids, context=None): """ - Schedule the tasks according to resource available and priority. + Schedule tasks base on faces lib """ + if context is None: + context = {} + if type(ids) in (long, int,): + ids = [ids] task_pool = self.pool.get('project.task') resource_pool = self.pool.get('resource.resource') - resources_list = self.generate_resources(cr, uid, ids, context=context) - return_msg = {} + data_pool = self.pool.get('ir.model.data') + resource_allocation_pool = self.pool.get('project.resource.allocation') + for phase in self.browse(cr, uid, ids, context=context): - start_date = phase.date_start - if not start_date and phase.project_id.date_start: - start_date = phase.project_id.date_start - if not start_date: - start_date = datetime.now().strftime("%Y-%m-%d") - resources = resources_list.get(phase.id, []) - calendar_id = phase.project_id.resource_calendar_id.id - task_ids = map(lambda x : x.id, (filter(lambda x : x.state in ['draft'] , phase.task_ids))) #reassign only task not yet started - if task_ids: - task_pool.generate_schedule(cr, uid, task_ids, resources, calendar_id, start_date, context=context) - - if not task_ids: - warning_msg = _("No tasks to compute for Phase '%s'.") % (phase.name) - if "warning" not in return_msg: - return_msg["warning"] = warning_msg - else: - return_msg["warning"] = return_msg["warning"] + "\n" + warning_msg - return return_msg + project = phase.project_id + calendar_id = project.resource_calendar_id and project.resource_calendar_id.id or False + start_date = project.date_start + #Creating resources using the member of the Project + u_ids = [i.id for i in project.members] + resource_objs = resource_pool.generate_resources(cr, uid, u_ids, calendar_id, context=context) + start_date = datetime.strftime((datetime.strptime(start_date, "%Y-%m-%d")), "%Y-%m-%d") + func_str = '' + start = start_date + minimum_time_unit = 1 + # default values + working_hours_per_day = 24 + working_days_per_week = 7 + working_days_per_month = 30 + working_days_per_year = 365 + + vacation = [] + if calendar_id: + working_hours_per_day = 8 #TODO: it should be come from calendars + working_days_per_week = 5 + working_days_per_month = 20 + working_days_per_year = 200 + vacation = tuple(resource_pool.compute_vacation(cr, uid, calendar_id, context=context)) + + working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context) + + cls_str = '' + # Creating Resources for the Project + for key, vals in resource_objs.items(): + cls_str +=''' + class Resource_%s(Resource): + title = \"%s\" + vacation = %s + efficiency = %s +'''%(key, vals.get('name',False), vals.get('vacation', False), vals.get('efficiency', False)) + + # Create a new project for each phase + func_str += ''' +def Phase_%d(): + from resource.faces import Resource + title = \"%s\" + start = \'%s\' + minimum_time_unit = %s + working_hours_per_day = %s + working_days_per_week = %s + working_days_per_month = %s + working_days_per_year = %s + vacation = %s + working_days = %s +'''%(phase.id, phase.name, start, minimum_time_unit, working_hours_per_day, working_days_per_week, working_days_per_month, working_days_per_year, vacation, working_days ) + + parent = False + task_ids = [] + todo_task_ids = task_pool.search(cr, uid, [('id', 'in', map(lambda x : x.id, phase.task_ids)), + ('state', 'in', ['draft', 'open', 'pending']) + ], order='sequence') + for task in task_pool.browse(cr, uid, todo_task_ids, context=context): + func_str += task_pool.generate_task(cr, uid, task.id, parent=parent, flag=True, context=context) + if not parent: + parent = task + task_ids.append(task.id) + func_str += cls_str + + # Allocating Memory for the required Project and Pahses and Resources + exec(func_str) + Phase = eval('Phase_%d' % phase.id) + phase = Task.BalancedProject(Phase) + + for task_id in task_ids: + task = eval("phase.Task_%d" % task_id) + start_date = task.start.to_datetime() + end_date = task.end.to_datetime() + + task_pool.write(cr, uid, [task_id], { + 'date_start': start_date.strftime('%Y-%m-%d'), + 'date_end': end_date.strftime('%Y-%m-%d') + }, context=context) + return True project_phase() class project_resource_allocation(osv.osv): @@ -383,53 +437,224 @@ class project(osv.osv): def schedule_phases(self, cr, uid, ids, context=None): """ - Schedule the phases. + Schedule phase base on faces lib """ + if context is None: + context = {} if type(ids) in (long, int,): ids = [ids] phase_pool = self.pool.get('project.phase') + task_pool = self.pool.get('project.task') + resource_pool = self.pool.get('resource.resource') + data_pool = self.pool.get('ir.model.data') + resource_allocation_pool = self.pool.get('project.resource.allocation') + uom_pool = self.pool.get('product.uom') + data_model, day_uom_id = data_pool.get_object_reference(cr, uid, 'product', 'uom_day') + for project in self.browse(cr, uid, ids, context=context): - phase_ids = phase_pool.search(cr, uid, [('project_id', '=', project.id), + root_phase_ids = phase_pool.search(cr, uid, [('project_id', '=', project.id), ('state', 'in', ['draft', 'open', 'pending']), ('previous_phase_ids', '=', False) ]) calendar_id = project.resource_calendar_id and project.resource_calendar_id.id or False - start_date = False - phase_pool.generate_schedule(cr, uid, phase_ids, start_date, calendar_id, context=context) - return True + start_date = project.date_start + #if start_date: + # start_date = datetime.strftime((datetime.strptime(start_date, "%Y-%m-%d")), "%Y-%m-%d") + #Creating resources using the member of the Project + u_ids = [i.id for i in project.members] + resource_objs = resource_pool.generate_resources(cr, uid, u_ids, calendar_id, context=context) + func_str = '' + start = start_date + minimum_time_unit = 1 + # default values + working_hours_per_day = 24 + working_days_per_week = 7 + working_days_per_month = 30 + working_days_per_year = 365 + + vacation = [] + if calendar_id: + working_hours_per_day = 8 #TODO: it should be come from calendars + working_days_per_week = 5 + working_days_per_month = 20 + working_days_per_year = 200 + vacation = tuple(resource_pool.compute_vacation(cr, uid, calendar_id, context=context)) + + working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context) + + cls_str = '' + # Creating Resources for the Project + for key, vals in resource_objs.items(): + cls_str +=''' + class Resource_%s(Resource): + title = \"%s\" + vacation = %s + efficiency = %s +'''%(key, vals.get('name',False), vals.get('vacation', False), vals.get('efficiency', False)) + + # Create a new project for each phase + func_str += ''' +def Project_%d(): + from resource.faces import Resource + title = \"%s\" + start = \'%s\' + minimum_time_unit = %s + working_hours_per_day = %s + working_days_per_week = %s + working_days_per_month = %s + working_days_per_year = %s + vacation = %s + working_days = %s +'''%(project.id, project.name, start, minimum_time_unit, working_hours_per_day, working_days_per_week, working_days_per_month, working_days_per_year, vacation, working_days ) + + func_str += cls_str + phase_ids = [] + for root_phase in phase_pool.browse(cr, uid, root_phase_ids, context=context): + phases, child_phase_ids = phase_pool.generate_phase(cr, uid, [root_phase.id], '', context=context) + func_str += phases + phase_ids += child_phase_ids + + # Allocating Memory for the required Project and Pahses and Resources + exec(func_str) + Project = eval('Project_%d' % project.id) + project = Task.BalancedProject(Project) + + for phase_id in phase_ids: + act_phase = phase_pool.browse(cr, uid, phase_id, context=context) + resources = act_phase.resource_ids + phase = eval("project.Phase_%d" % phase_id) + start_date = phase.start.to_datetime() + end_date = phase.end.to_datetime() + + if resources: + for res in resources: + vals = {} + vals.update({'date_start' : start_date }) + vals.update({'date_end' : end_date}) + resource_allocation_pool.write(cr, uid, res.id, vals, context=context) + if act_phase.task_ids: + for task in act_phase.task_ids: + vals = {} + #Getting values of the Tasks + temp = eval("phase.Task_%s"%task.id) + if temp.booked_resource: + res_name = temp.booked_resource[0].title + res_id = resource_pool.search(cr, uid,[('name','=',res_name)], context = context) + if res_id: + res = resource_pool.browse(cr, uid, res_id[0], context = context) + vals.update({'user_id' : res.user_id.id}) + + vals.update({'date_start' : temp.start.strftime('%Y-%m-%d %H:%M:%S')}) + vals.update({'date_end' : temp.end.strftime('%Y-%m-%d %H:%M:%S')}) + task_pool.write(cr, uid, task.id, vals, context=context) + + + phase_pool.write(cr, uid, [phase_id], { + 'date_start': start_date.strftime('%Y-%m-%d'), + 'date_end': end_date.strftime('%Y-%m-%d') + }, context=context) + return True + + #TODO: DO Resource allocation and compute availability + def compute_allocation(self, rc, uid, ids, start_date, end_date, context=None): + if context == None: + contex = {} + allocation = {} + return allocation def schedule_tasks(self, cr, uid, ids, context=None): """ - Schedule the tasks according to resource available and priority. + Schedule task base on faces lib """ + if context is None: + context = {} if type(ids) in (long, int,): ids = [ids] - user_pool = self.pool.get('res.users') task_pool = self.pool.get('project.task') resource_pool = self.pool.get('resource.resource') - resources_list = self.generate_members(cr, uid, ids, context=context) - return_msg = {} + data_pool = self.pool.get('ir.model.data') + resource_allocation_pool = self.pool.get('project.resource.allocation') + uom_pool = self.pool.get('product.uom') + data_model, day_uom_id = data_pool.get_object_reference(cr, uid, 'product', 'uom_day') + for project in self.browse(cr, uid, ids, context=context): + calendar_id = project.resource_calendar_id and project.resource_calendar_id.id or False start_date = project.date_start - if not start_date: - start_date = datetime.now().strftime("%Y-%m-%d") - resources = resources_list.get(project.id, []) - calendar_id = project.resource_calendar_id.id - task_ids = task_pool.search(cr, uid, [('project_id', '=', project.id), - ('state', 'in', ['draft', 'open', 'pending']) - ]) - - - if task_ids: - task_pool.generate_schedule(cr, uid, task_ids, resources, calendar_id, start_date, context=context) - else: - warning_msg = _("No tasks to compute for Project '%s'.") % (project.name) - if "warning" not in return_msg: - return_msg["warning"] = warning_msg - else: - return_msg["warning"] = return_msg["warning"] + "\n" + warning_msg + #Creating resources using the member of the Project + u_ids = [i.id for i in project.members] + resource_objs = resource_pool.generate_resources(cr, uid, u_ids, calendar_id, context=context) + start_date = datetime.strftime((datetime.strptime(start_date, "%Y-%m-%d")), "%Y-%m-%d") + func_str = '' + start = start_date + minimum_time_unit = 1 + # default values + working_hours_per_day = 24 + working_days_per_week = 7 + working_days_per_month = 30 + working_days_per_year = 365 + + vacation = [] + if calendar_id: + working_hours_per_day = 8 #TODO: it should be come from calendars + working_days_per_week = 5 + working_days_per_month = 20 + working_days_per_year = 200 + vacation = tuple(resource_pool.compute_vacation(cr, uid, calendar_id, context=context)) - return return_msg + working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context) + + cls_str = '' + # Creating Resources for the Project + for key, vals in resource_objs.items(): + cls_str +=''' + class Resource_%s(Resource): + title = \"%s\" + vacation = %s + efficiency = %s +'''%(key, vals.get('name',False), vals.get('vacation', False), vals.get('efficiency', False)) + + # Create a new project for each phase + func_str += ''' +def Project_%d(): + from resource.faces import Resource + title = \"%s\" + start = \'%s\' + minimum_time_unit = %s + working_hours_per_day = %s + working_days_per_week = %s + working_days_per_month = %s + working_days_per_year = %s + vacation = %s + working_days = %s +'''%(project.id, project.name, start, minimum_time_unit, working_hours_per_day, working_days_per_week, working_days_per_month, working_days_per_year, vacation, working_days ) + + parent = False + task_ids = [] + todo_task_ids = task_pool.search(cr, uid, [('project_id', '=', project.id), + ('state', 'in', ['draft', 'open', 'pending']) + ], order='sequence') + if todo_task_ids: + for task in task_pool.browse(cr, uid, todo_task_ids, context=context): + func_str += task_pool.generate_task(cr, uid, task.id, parent=parent, flag=True,context=context) + if not parent: + parent = task + task_ids.append(task.id) + func_str += cls_str + + # Allocating Memory for the required Project and Pahses and Resources + exec(func_str) + Project = eval('Project_%d' % project.id) + project = Task.BalancedProject(Project) + for task_id in task_ids: + task = eval("project.Task_%d" % task_id) + start_date = task.start.to_datetime() + end_date = task.end.to_datetime() + + task_pool.write(cr, uid, [task_id], { + 'date_start': start_date.strftime('%Y-%m-%d'), + 'date_end': end_date.strftime('%Y-%m-%d') + }, context=context) + return True project() @@ -452,82 +677,39 @@ class project_task(osv.osv): _columns = { 'phase_id': fields.many2one('project.phase', 'Project Phase'), } + _defaults = { + 'user_id' : False + } - def generate_schedule(self, cr, uid, ids, resources, calendar_id, start_date, context=None): - """ - Schedule the tasks according to resource available and priority. - """ - resource_pool = self.pool.get('resource.resource') - if not ids: - return False + def generate_task(self, cr, uid, task_id, parent=False, flag=False, context=None): if context is None: context = {} - user_pool = self.pool.get('res.users') - project_pool = self.pool.get('project.project') - priority_dict = {'0': 1000, '1': 800, '2': 500, '3': 300, '4': 100} - # Create dynamic no of tasks with the resource specified - def create_tasks(task_number, eff, priorty=500, obj=False): - def task(): - """ - task is a dynamic method! - """ - effort = eff - if obj: - resource = obj - priority = priorty - task.__doc__ = "TaskNO%d" %task_number - task.__name__ = "task%d" %task_number - return task - - # Create a 'Faces' project with all the tasks and resources - def Project(): - title = "Project" - start = datetime.strftime(datetime.strptime(start_date, "%Y-%m-%d"), "%Y-%m-%d %H:%M") - try: - resource = reduce(operator.or_, resources) - except: - raise osv.except_osv(_('Error'), _('Resources should be allocated to your phases and Members should be assigned to your Project!')) - minimum_time_unit = 1 - working_hours_per_day = 24 - vacation = [] - if calendar_id: - working_hours_per_day = 8 #TODO: it should be come from calendars - vacation = tuple(resource_pool.compute_vacation(cr, uid, calendar_id, context=context)) - working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context) - # Dynamic creation of tasks - task_number = 0 - for openobect_task in self.browse(cr, uid, ids, context=context): - hours = str(openobect_task.planned_hours )+ 'H' - if openobect_task.priority in priority_dict.keys(): - priorty = priority_dict[openobect_task.priority] - real_resource = False - if openobect_task.user_id: - for task_resource in resources: - if task_resource.__name__ == task_resource: - real_resource = task_resource - break - - task = create_tasks(task_number, hours, priorty, real_resource) - task_number += 1 - - - face_projects = Task.BalancedProject(Project) - loop_no = 0 - # Write back the computed dates - for face_project in face_projects: - s_date = face_project.start.to_datetime() - e_date = face_project.end.to_datetime() - if loop_no > 0: - ctx = context.copy() - ctx.update({'scheduler': True}) - user_id = user_pool.search(cr, uid, [('name', '=', face_project.booked_resource[0].__name__)]) - self.write(cr, uid, [ids[loop_no-1]], { - 'date_start': s_date.strftime('%Y-%m-%d %H:%M:%S'), - 'date_end': e_date.strftime('%Y-%m-%d %H:%M:%S'), - 'user_id': user_id[0] - }, context=ctx) - - loop_no += 1 - return True + phase_pool = self.pool.get('project.phase') + resource_pool = self.pool.get('resource.resource') + resource_allocation_pool = self.pool.get('project.resource.allocation') + task = self.browse(cr, uid, task_id, context=context) + duration = str(task.planned_hours )+ 'H' + str_resource = False + if task.phase_id.resource_ids: + str_resource = ('%s | '*len(task.phase_id.resource_ids))[:-2] + str_resource = str_resource % tuple(map(lambda x: 'Resource_%s'%x.resource_id.id, task.phase_id.resource_ids)) + # Task Defination for the Phase of the Project + if not flag: + s = ''' + def Task_%s(): + title = \"%s\" + effort = \'%s\' + resource = %s +'''%(task.id, task.name, duration, str_resource) + #start = datetime.strftime((datetime.strptime(start, "%Y-%m-%d")), "%Y-%m-%d") + else: + s = ''' + def Task_%s(): + title = \"%s\" + effort = \'%s\' + resource = %s +'''%(task.id, task.name, duration, str_resource) + s += '\n' + return s project_task() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_long_term/project_long_term_demo.xml b/addons/project_long_term/project_long_term_demo.xml index 8a37f4cc444..961b0c62c9b 100644 --- a/addons/project_long_term/project_long_term_demo.xml +++ b/addons/project_long_term/project_long_term_demo.xml @@ -233,9 +233,9 @@ This Demo data file Human Resources, Phases and Resources,Tasks allocation and </record> <!-- run scheduling of phase --> - <function model="project.project" name="schedule_phases" eval="(ref('project.project_integrate_openerp'),)"/> + <!--<function model="project.project" name="schedule_phases" eval="(ref('project.project_integrate_openerp'),)"/>--> <!-- run scheduling of tasks --> - <function model="project.project" name="schedule_tasks" eval="(ref('project.project_integrate_openerp'),)"/> + <!--<function model="project.project" name="schedule_tasks" eval="(ref('project.project_integrate_openerp'),)"/>--> </data> </openerp> diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index ff4cfd8575b..b720da13654 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -116,10 +116,10 @@ <field name="responsible_id"/> </group> <group colspan="6" col="6"> - <field name="date_start"/> + <field name="date_start" readonly="1"/> <field name="duration"/> <field name="product_uom" nolabel="1" domain="[('category_id.name', '=', 'Working Time')]"/> - <field name="date_end"/> + <field name="date_end" readonly="1"/> </group> </group> <notebook colspan="4"> @@ -127,14 +127,14 @@ <field colspan="4" name="resource_ids" nolabel="1"> <tree editable="bottom" string="Project Resource Allocation"> <field name="resource_id" context="{'project_id':parent.project_id}"/> - <field name="date_start" readonly="1"/> - <field name="date_end" readonly="1"/> + <field name="date_start"/> + <field name="date_end"/> <field name="useability" string="Availability"/> </tree> <form string="Project Resource Allocation"> <field name="resource_id" context="{'project_id':parent.project_id}"/> - <field name="date_start" readonly="1"/> - <field name="date_end" readonly="1"/> + <field name="date_start" /> + <field name="date_end"/> <field name="useability" string="Availability"/> </form> </field> @@ -228,6 +228,7 @@ <field name="date_end"/> <field name="duration"/> <field name="state"/> + <button name="%(action_project_schedule_tasks)d" string="Schedule Tasks" type="action" icon="gtk-jump-to"/> </tree> </field> </record> @@ -266,7 +267,7 @@ <field name="arch" type="xml"> <search string="Project Phases"> <group colspan="4" col="20"> - <filter string="Current" domain="[('state','in',('open','draft'))]" name="current" help="Draft and In Progress Phases" icon="terp-check"/> + <filter string="Current" domain="[('state','in',('open','draft'))]" name="current" help="Draft and In Progress Phases" icon="terp-check"/> <filter string="In Progress" name="Progress" domain="[('state','=','open')]" help="In Progress Phases" icon="terp-camera_test"/> <filter string="Pending" domain="[('state','=','pending')]" help="Pending Phases" icon="terp-gtk-media-pause"/> <separator orientation="vertical"/> @@ -322,7 +323,7 @@ <field name="type">form</field> <field name="inherit_id" ref="project.edit_project"/> <field name="arch" type="xml"> - <field name="priority" position="before"> + <field name="effective_hours" position="after"> <field name="resource_calendar_id"/> </field> @@ -396,21 +397,21 @@ name="Phases" res_model="project.phase" src_model="project.project" - domain="[('project_id', '=', active_id)]" + domain="[('project_id', '=', active_id)]" view_mode="tree,form" view_type="form" - /> + /> - <act_window - context="{'search_default_user_id': [user_id]}" + <act_window + context="{'search_default_user_id': [user_id]}" id="act_project_resource" name="Resources" res_model="resource.resource" src_model="project.project" - domain="[('user_id', '=',user_id)]" + domain="[('user_id', '=',user_id)]" view_mode="tree,form" view_type="form" - /> + /> # ------------------------------------------------------ # Menu Items diff --git a/addons/project_long_term/test/phase_constraint.yml b/addons/project_long_term/test/phase_constraint.yml new file mode 100644 index 00000000000..cf6bfa844a6 --- /dev/null +++ b/addons/project_long_term/test/phase_constraint.yml @@ -0,0 +1,179 @@ +- + I have a project 'Develop yaml Project Module'. +- + !record {model: project.project, id: project_project_developyamlproject0}: + name: "Develop Yaml Project Module" + date_start: !eval time.strftime('%Y-%m-%d') +- + I have set Working Time from Monday to Friday from 9am to 17pm. +- + !record {model: resource.calendar, id: resource_calendar_hoursweeks0}: + name: "from Monday to Friday, from 9am to 17pm" + +- + I have set Day1 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday1}: + name: "Day1" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "0" + calendar_id : resource_calendar_hoursweeks0 + +- + I have set Day2 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday1}: + name: "Day2" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "1" + calendar_id : resource_calendar_hoursweeks0 + +- + I have set Day3 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday1}: + name: "Day3" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "2" + calendar_id : resource_calendar_hoursweeks0 + +- + I have set Day4 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday1}: + name: "Day4" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "3" + calendar_id : resource_calendar_hoursweeks0 + +- + I have set Day5 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday1}: + name: "Day5" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "4" + calendar_id : resource_calendar_hoursweeks0 + + +- + Now Set working period to Project 'Develop yaml Project Module' +- + !python {model: project.project}: | + self.write(cr, uid, [ref("project_project_developyamlproject0")], {'resource_calendar_id': ref("resource_calendar_hoursweeks0")}) + + +- + Creating 3 consecutive 5-days phases. + For that Creating a Analyst Human resource to analyst Project Yaml. +- + !record {model: resource.resource, id: resource_resource_analyst1}: + calendar_id: project_long_term.resource_calendar_hoursweeks0 + name: Analyst + resource_type: user + time_efficiency: 1.0 + user_id: base.user_admin + +- + Creating Developer Human resource who develop Yaml +- + !record {model: resource.resource, id: resource_resource_develop0}: + calendar_id: project_long_term.resource_calendar_hoursweeks0 + name: Developer + resource_type: user + time_efficiency: 1.0 + user_id: base.user_admin +- + Creating a Tester Human resource for testing Yaml +- + !record {model: resource.resource, id: resource_resource_tester1}: + calendar_id: project_long_term.resource_calendar_hoursweeks0 + name: tester + resource_type: user + time_efficiency: 1.0 + user_id: base.user_admin + +- + Create 3 a project phase and NO one depends on other one. + so,they should start on the same day. + Creating First 'Analysis Flow for Yaml' Project Phase. +- + !record {model: project.phase, id: project_phase_analysisflowforyaml0}: + date_start: !eval time.strftime('%Y-%m-%d') + duration: 6.0 + name: "Analysis Flow for Yaml" + product_uom: product.uom_day + project_id: project_project_developyamlproject0 + responsible_id: project.res_users_analyst + state: draft + +- + I update the Constrain Date Start adn Date End for phase Analysis Flow for Yaml +- + !python {model : project.phase }: | + import datetime + from dateutil.relativedelta import * + start = datetime.date.today() - relativedelta(days=2) + end = datetime.date.today() + relativedelta(days=6) + self.write(cr,uid, [(ref("project_phase_analysisflowforyaml0"))], {'constraint_date_start': start, 'constraint_date_end':end}) + +- + Create project phase 'Develop yaml' with constraint date. +- + !record {model: project.phase, id: project_phase_developyaml0}: + duration: 6.0 + name: Develop Yaml + product_uom: product.uom_day + project_id: project_project_developyamlproject0 + previous_phase_ids: + - project_phase_analysisflowforyaml0 + +- + I update the Constrain Date Start adn Date End for phase Develop yaml +- + !python {model : project.phase }: | + import datetime + from dateutil.relativedelta import * + start = datetime.date.today() - relativedelta(days=5) + end = datetime.date.today() + relativedelta(days=10) + self.write(cr,uid, [(ref("project_phase_developyaml0"))], {'constraint_date_start': start, 'constraint_date_end':end}) +- + Create project phase 'Test Yaml' +- + !record {model: project.phase, id: project_phase_testyaml0}: + duration: 6.0 + name: Testing Yaml + product_uom: product.uom_day + project_id: project_project_developyamlproject0 + previous_phase_ids: + - project_phase_developyaml0 + constraint_date_start : + constraint_date_end : +- + Compute Schedule of phases For One project +- + !record {model: project.compute.phases, id: project_compute_phases_0}: + project_id: project_project_developyamlproject0 + target_project: one + +- + Schedule project phases using "Compute Phase Scheduling" +- + !python {model: project.project}: | + self.schedule_phases(cr, uid, [ref("project_project_developyamlproject0")]) + +- + After scheduling,check that + Phase "Analysis Flow for Yaml" and "Test Yaml" Phase should start on the project start date while "Develop yaml" Phase should respect the constraint. +- + !python {model: project.project}: | + proj=self.browse(cr, uid, [ref("project_project_developyamlproject0")])[0] + for phase in proj.phase_ids: + for phase1 in proj.phase_ids: + if phase1.id != phase.id and phase.constraint_date_start == phase1.date_start: + raise AssertionError("Phases not scheduled") diff --git a/addons/project_long_term/test/project_schedule_consecutive_day.yml b/addons/project_long_term/test/project_schedule_consecutive_day.yml new file mode 100644 index 00000000000..9f4e1231d11 --- /dev/null +++ b/addons/project_long_term/test/project_schedule_consecutive_day.yml @@ -0,0 +1,126 @@ +- + Create a project 'Develop yaml Project Module'. +- + !record {model: project.project, id: project_project_developyamlproject123}: + name: "Develop Yaml Project Module" + date_start: !eval time.strftime('%Y-%m-%d') + +- + I have set Working Time from Monday to Friday from 9am to 17pm. +- + !record {model: resource.calendar, id: resource_calendar_hoursweekstest2}: + name: "from Monday to Friday, from 9am to 17pm" + +- + I have set Day1 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday1}: + name: "Day1" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "0" + calendar_id : resource_calendar_hoursweekstest2 + +- + I have set Day2 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday2}: + name: "Day2" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "1" + calendar_id : resource_calendar_hoursweekstest2 + +- + I have set Day3 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday3}: + name: "Day3" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "2" + calendar_id : resource_calendar_hoursweekstest2 + +- + I have set Day4 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday4}: + name: "Day4" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "3" + calendar_id : resource_calendar_hoursweekstest2 + +- + I have set Day5 Working Time for Monday to Friday from 9am to 17pm working hour +- + !record {model: resource.calendar.attendance, id: resource_calendar_atendanceday5}: + name: "Day5" + hour_from : 09.00 + hour_to : 17.00 + dayofweek : "4" + calendar_id : resource_calendar_hoursweekstest2 + +- + Now Set working period to Project 'Develop yaml Project Module' +- + !python {model: project.project}: | + self.write(cr, uid, [ref("project_project_developyamlproject123")], {'resource_calendar_id': ref("resource_calendar_hoursweekstest2")}) + +- + Create 3 a project phase. + First 'Analysis Flow for Yaml'Project Phase +- + !record {model: project.phase, id: project_phase_analysisflowforyaml0}: + date_start: !eval time.strftime('%Y-%m-%d') + duration: 5.0 + name: "Analysis Flow for Yaml" + product_uom: product.uom_day + project_id: project_project_developyamlproject123 + state: draft + +- + Create project phase 'Develop yaml' +- + !record {model: project.phase, id: project_phase_establishingprojectfeasibility0}: + duration: 5.0 + name: Develop Yaml + product_uom: product.uom_day + project_id: project_project_developyamlproject123 + previous_phase_ids: + - project_phase_analysisflowforyaml0 + +- + Create project phase 'Test Yaml' +- + !record {model: project.phase, id: project_phase_preparationofengineeringdesigns0}: + duration: 5.0 + name: Testing Yaml + product_uom: product.uom_day + project_id: project_project_developyamlproject123 + previous_phase_ids: + - project_phase_establishingprojectfeasibility0 + +- + Compute Schedule of phases For One project +- + !record {model: project.compute.phases, id: project_compute_phases_0}: + project_id: project_project_developyamlproject123 + target_project: one + +- + Schedule project phases using Compute Phase Scheduling +- + !python {model: project.project}: | + self.schedule_phases(cr, uid, [ref("project_project_developyamlproject123")]) + +- + After scheduling, Check that phases scheduled, check that either of phase's start_date, end_date not null. +- + !python {model: project.project}: | + proj=self.browse(cr, uid, [ref("project_project_developyamlproject123")])[0] + for phase in proj.phase_ids: + if (not phase.responsible_id) or (not phase.date_start) or (not phase.date_end): + raise AssertionError("Phases not scheduled") + + diff --git a/addons/project_long_term/test/project_schedule_without_wroking_hour.yml b/addons/project_long_term/test/project_schedule_without_wroking_hour.yml new file mode 100644 index 00000000000..0c810227717 --- /dev/null +++ b/addons/project_long_term/test/project_schedule_without_wroking_hour.yml @@ -0,0 +1,77 @@ +- + Create a project 'Develop yaml Implementation Module'. +- + !record {model: project.project, id: project_project_developyamlproject0}: + name: "Develop Yaml Project Module" + date_start: !eval time.strftime('%Y-%m-%d') + +- + Create 4 Project phase. + First Project Phase 'Analysis Flow for Yaml' +- + !record {model: project.phase, id: project_phase_analysisflowforyaml0}: + date_start: !eval time.strftime('%Y-%m-%d') + duration: 6.0 + product_uom: product.uom_day + name: "Analysis Flow for Yaml" + project_id: project_project_developyamlproject0 + responsible_id: project.res_users_analyst + state: draft + +- + Create project phase 'Develop yaml' +- + !record {model: project.phase, id: project_phase_establishingprojectfeasibility0}: + duration: 6.0 + name: "Develop yaml" + product_uom: product.uom_day + project_id: project_project_developyamlproject0 + previous_phase_ids: + - project_phase_analysisflowforyaml0 + state: draft +- + Create project phase 'Test Yaml' +- + !record {model: project.phase, id: project_phase_preparationofengineeringdesigns0}: + duration: 6.0 + name: Testing Yaml + product_uom: product.uom_day + project_id: project_project_developyamlproject0 + previous_phase_ids: + - project_phase_establishingprojectfeasibility0 + state: draft + +- + Create project phase 'Implement Yaml' +- + !record {model: project.phase, id: project_phase_implementingreadycase0}: + duration: 6.0 + name: Testing Yaml + product_uom: product.uom_day + project_id: project_project_developyamlproject0 + previous_phase_ids: + - project_phase_preparationofengineeringdesigns0 + state: draft +- + Compute Schedule of phases For One project +- + !record {model: project.compute.phases, id: project_compute_phases_0}: + project_id: project_project_developyamlproject0 + target_project: one + +- + Schedule project phases using Compute Phase Scheduling +- + !python {model: project.project}: | + self.schedule_phases(cr, uid, [ref("project_project_developyamlproject0")]) + +- + After scheduling, Check that phases scheduled, check that either of phase's start_date, end_date not null. +- + !python {model: project.project}: | + proj=self.browse(cr, uid, [ref("project_project_developyamlproject0")])[0] + for phase in proj.phase_ids: + if (not phase.responsible_id) or (not phase.date_start) or (not phase.date_end): + raise AssertionError("Phases not scheduled") + + diff --git a/addons/project_long_term/test/schedule_phase_tasks.yml b/addons/project_long_term/test/schedule_phase_tasks.yml index aa54fa1ac57..1526d04f933 100644 --- a/addons/project_long_term/test/schedule_phase_tasks.yml +++ b/addons/project_long_term/test/schedule_phase_tasks.yml @@ -23,12 +23,8 @@ state: draft resource_ids: - resource_id: project_long_term.resource_analyst - useability: 80.0 - resource_id: project_long_term.resource_developer - useability: 30.0 - resource_id: project_long_term.resource_designer - useability: 30.0 - - Create the phase task 'Develop GUI for Server Configuration' diff --git a/addons/project_long_term/test/schedule_project_phases.yml b/addons/project_long_term/test/schedule_project_phases.yml index e06feaaa4ca..829258eefc8 100644 --- a/addons/project_long_term/test/schedule_project_phases.yml +++ b/addons/project_long_term/test/schedule_project_phases.yml @@ -4,7 +4,14 @@ !record {model: project.project, id: project_project_worldbanksproject0}: name: "World Bank's Project" priority: 4 - + members: + - project.res_users_analyst + - project.res_users_project_manager + - project.res_users_technical_leader + - project.res_users_developer + - project.res_users_designer + - project.res_users_tester + - Create a project phase 'Defining Client's Basic Idea of Project' - @@ -14,8 +21,7 @@ name: "Defining Client's Basic Idea of Project" product_uom: product.uom_day project_id: project_project_worldbanksproject0 - - + - Create project phase 'Establishing Project Feasibility' - @@ -25,8 +31,50 @@ name: Establishing Project Feasibility product_uom: product.uom_day project_id: project_project_worldbanksproject0 + +- + Resource1 +- + !record {model: project.resource.allocation, id: res_phase1}: + resource_id: project_long_term.resource_project_manager + phase_id: project_phase_definingclientsbasicideaofproject0 + +- + Resource2 +- + !record {model: project.resource.allocation, id: res_phase2}: + resource_id: project_long_term.resource_analyst + phase_id: project_phase_definingclientsbasicideaofproject0 + +- + Resource3 +- + !record {model: project.resource.allocation, id: res_phase3}: + resource_id: project_long_term.resource_technical_leader + phase_id: project_phase_definingclientsbasicideaofproject0 + +- + Create the phase task 'Develop GUI for Server Configuration' +- + !record {model: project.task, id: project_task_t0}: + name: Develop GUI for Server Configuration + planned_hours: 20.0 + state: draft + phase_id: project_phase_definingclientsbasicideaofproject0 + project_id: project_project_worldbanksproject0 - + Create the phase task 'Develop GUI for Modules Configuration' +- + !record {model: project.task, id: project_task_t1}: + name: Develop GUI for Modules Configuration + planned_hours: 25.0 + remaining_hours: 25.0 + state: draft + phase_id: project_phase_definingclientsbasicideaofproject0 + project_id: project_project_worldbanksproject0 + +- Create project phase 'Preparation of Engineering Designs' - !record {model: project.phase, id: project_phase_preparationofengineeringdesigns0}: @@ -36,7 +84,43 @@ product_uom: product.uom_hour project_id: project_project_worldbanksproject0 - +- + Resource4 +- + !record {model: project.resource.allocation, id: res_phase4}: + resource_id: project_long_term.resource_developer + phase_id: project_phase_preparationofengineeringdesigns0 + +- + Resource5 +- + !record {model: project.resource.allocation, id: res_phase5}: + resource_id: project_long_term.resource_designer + phase_id: project_phase_preparationofengineeringdesigns0 + +- + Create the phase task 'Develop GUI for Client Configuration' +- + !record {model: project.task, id: project_task_t2}: + name: Develop GUI for Server Configuration + planned_hours: 20.0 + remaining_hours: 20.0 + state: draft + phase_id: project_phase_preparationofengineeringdesigns0 + project_id: project_project_worldbanksproject0 + +- + Create the phase task 'Develop GUI for Client Module Configuration' +- + !record {model: project.task, id: project_task_t3}: + name: Develop GUI for Modules Configuration + planned_hours: 25.0 + remaining_hours: 25.0 + state: draft + phase_id: project_phase_preparationofengineeringdesigns0 + project_id: project_project_worldbanksproject0 + + - Create project phase 'Procurement of Works and Goods' - @@ -46,14 +130,13 @@ name: Procurement of Works and Goods product_uom: product.uom_hour project_id: project_project_worldbanksproject0 - - + - Create project phase 'Project Construction' - !record {model: project.phase, id: project_phase_projectconstruction0}: date_start: '2010-06-02' - duration: 4320.0 + duration: 20.0 name: Project Construction product_uom: product.uom_hour project_id: project_project_worldbanksproject0 diff --git a/addons/project_long_term/test/test_schedule_phases_case1.yml b/addons/project_long_term/test/test_schedule_phases_case1.yml new file mode 100644 index 00000000000..214512b923f --- /dev/null +++ b/addons/project_long_term/test/test_schedule_phases_case1.yml @@ -0,0 +1,65 @@ +- + In order to test scheduling of project phases, I create two different phases and + test it with two different dates for scheduling. +- + I create a project 'Development and Testing'. +- + !record {model: project.project, id: project_project_project0}: + date_start: '2010-12-30' + balance: 0.0 + credit: 0.0 + currency_id: base.EUR + debit: 0.0 + effective_hours: 0.0 + members: + - base.user_admin + name: Development and Testing + planned_hours: 0.0 + progress_rate: 0.0 + quantity: 0.0 + quantity_max: 0.0 + state: open + type_ids: + - project.project_tt_specification + - project.project_tt_development + - project.project_tt_testing + - project.project_tt_merge +- + I create first phase of the project. +- + !record {model: project.phase, id: project_phase_firstphase0}: + duration: 2.0 + name: First Phase + product_uom: product.uom_day + project_id: project_project_project0 + state: draft +- + I create second phase of the project. +- + !record {model: project.phase, id: project_phase_secondphase0}: + duration: 3.0 + name: Second Phase + previous_phase_ids: + - project_phase_firstphase0 + product_uom: product.uom_day + project_id: project_project_project0 + state: draft +- + Now I create a record to compute the phase of project. +- + !record {model: project.compute.phases, id: project_compute_phases0}: + target_project: 'one' + project_id: project_project_project0 +- + I schedule the phases. +- + !python {model: project.compute.phases}: | + self.check_selection(cr, uid, [ref("project_compute_phases0")]) +- + I check the starting and ending dates of both phases. +- + !python {model: project.phase}: | + first_phase = self.browse(cr, uid, ref('project_phase_firstphase0')) + assert (first_phase.date_start == '2010-12-30' and first_phase.date_end == '2010-12-31'),'Dates are wrong!' + second_phase = self.browse(cr, uid, ref('project_phase_secondphase0')) + assert (second_phase.date_start == '2011-01-01' and second_phase.date_end == '2011-01-03'),'Dates are wrong!' diff --git a/addons/project_long_term/test/test_schedule_phases_case2.yml b/addons/project_long_term/test/test_schedule_phases_case2.yml new file mode 100644 index 00000000000..67a7332cf5b --- /dev/null +++ b/addons/project_long_term/test/test_schedule_phases_case2.yml @@ -0,0 +1,193 @@ +- + In order to test scheduling of project phases, I create two different + working periods and resources. And schedule the phases. +- + I create first working period 'Working Time A'. +- + !record {model: resource.calendar, id: resource_calendar_workingtimea0}: + attendance_ids: + - dayofweek: '0' + hour_from: 10.0 + hour_to: 16.0 + name: Monday + - dayofweek: '1' + hour_from: 10.0 + hour_to: 16.0 + name: Tuesday + - dayofweek: '2' + hour_from: 10.0 + hour_to: 16.0 + name: Wednesday + - dayofweek: '3' + hour_from: 10.0 + hour_to: 16.0 + name: Thursday + name: Working Time A + +- + Creating a resource.calendar.attendance record +- + !record {model: resource.calendar.attendance, id: resource_calendar_attendance_monday0}: + calendar_id: resource_calendar_workingtimea0 + dayofweek: '0' + hour_from: 10.0 + hour_to: 16.0 + name: Monday +- + Creating a resource.calendar.attendance record +- + !record {model: resource.calendar.attendance, id: resource_calendar_attendance_tuesday0}: + calendar_id: resource_calendar_workingtimea0 + dayofweek: '1' + hour_from: 10.0 + hour_to: 16.0 + name: Tuesday +- + Creating a resource.calendar.attendance record +- + !record {model: resource.calendar.attendance, id: resource_calendar_attendance_wednesday0}: + calendar_id: resource_calendar_workingtimea0 + dayofweek: '2' + hour_from: 10.0 + hour_to: 16.0 + name: Wednesday +- + Creating a resource.calendar.attendance record +- + !record {model: resource.calendar.attendance, id: resource_calendar_attendance_thursday0}: + calendar_id: resource_calendar_workingtimea0 + dayofweek: '3' + hour_from: 10.0 + hour_to: 16.0 + name: Thursday +- + I create second working period 'Working Time B'. +- + !record {model: resource.calendar, id: resource_calendar_workingtimeb0}: + attendance_ids: + - dayofweek: '4' + hour_from: 9.0 + hour_to: 18.0 + name: Friday + name: Working Time B +- + Creating a resource.calendar.attendance record +- + !record {model: resource.calendar.attendance, id: resource_calendar_attendance_friday0}: + calendar_id: resource_calendar_workingtimeb0 + dayofweek: '4' + hour_from: 9.0 + hour_to: 18.0 + name: Friday +- + I create first resource say 'Resource X' without assigning working period. +- + !record {model: resource.resource, id: resource_resource_resourcex0}: + name: Resource X + resource_type: user + time_efficiency: 1.0 + user_id: base.user_admin +- + I create first resource say 'Resource Y' with working period 'Working Time B'. +- + !record {model: resource.resource, id: resource_resource_resourcey0}: + calendar_id: resource_calendar_workingtimeb0 + name: Resource Y + resource_type: user + time_efficiency: 1.0 + user_id: base.user_admin +- + I create a project 'Development and Testing' and assign working period 'Working Time A'. +- + !record {model: project.project, id: project_project_project0}: + balance: 0.0 + credit: 0.0 + currency_id: base.EUR + debit: 0.0 + effective_hours: 0.0 + members: + - base.user_admin + name: Development and Testing + planned_hours: 20.0 + progress_rate: 0.0 + quantity: 0.0 + quantity_max: 0.0 + resource_calendar_id: resource_calendar_workingtimea0 + state: open + tasks: + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task 1 + planned_hours: 10.0 + remaining_hours: 10.0 + state: draft + total_hours: 10.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task 2 + planned_hours: 10.0 + remaining_hours: 10.0 + state: draft + total_hours: 10.0 + total_hours: 10.0 + members: + - project.res_users_analyst + - project.res_users_project_manager + - project.res_users_technical_leader + - project.res_users_developer + - project.res_users_designer + - project.res_users_tester + type_ids: + - project.project_tt_specification + - project.project_tt_development + - project.project_tt_testing + - project.project_tt_merge + +- + I create a phase 'Initial Phase' for project 'Development and Testing'. +- + !record {model: project.phase, id: project_phase_phase0}: + date_start: '2011-01-03' + duration: 0.0 + name: Initial Phase + product_uom: product.uom_day + project_id: project_project_project0 + state: draft +- + I create first task 'Developing module' and assign 10h. +- + !record {model: project.task, id: project_task_task0}: + delay_hours: 0.0 + effective_hours: 0.0 + name: Developing module + planned_hours: 10.0 + project_id: project_project_project0 + remaining_hours: 10.0 + state: draft + total_hours: 10.0 + phase_id: project_phase_phase0 +- + I create first task 'Testing module' and assign 10h. +- + !record {model: project.task, id: project_task_task1}: + delay_hours: 0.0 + effective_hours: 0.0 + name: Testing module + planned_hours: 10.0 + project_id: project_project_project0 + remaining_hours: 10.0 + state: draft + total_hours: 10.0 + phase_id: project_phase_phase0 +- + Now I create a record to compute the phase of project. +- + !record {model: project.compute.phases, id: project_compute_phases0}: + target_project: 'one' + project_id: project_project_project0 +- + I schedule the phases. +- + !python {model: project.compute.phases}: | + self.check_selection(cr, uid, [ref("project_compute_phases0")]) + diff --git a/addons/project_long_term/test/test_schedule_tasks_case1.yml b/addons/project_long_term/test/test_schedule_tasks_case1.yml new file mode 100644 index 00000000000..78bf5e318a4 --- /dev/null +++ b/addons/project_long_term/test/test_schedule_tasks_case1.yml @@ -0,0 +1,263 @@ +- + In order to test scheduling of tasks, I create four tasks with different sequences and schedule them. +- + I create address for first user. +- + !record {model: res.partner.address, id: res_partner_address_user0}: + name: User 1 +- + I create address for second user. +- + !record {model: res.partner.address, id: res_partner_address_user1}: + name: User 2 +- + I create first user. +- + !record {model: res.users, id: res_users_user0}: + address_id: res_partner_address_user0 + company_id: base.main_company + context_lang: en_US + groups_id: + - base.group_partner_manager + - base.group_user + login: user1 + name: User 1 + password: user1 +- + I create second user. +- + !record {model: res.users, id: res_users_user1}: + address_id: res_partner_address_user1 + company_id: base.main_company + context_lang: en_US + groups_id: + - base.group_partner_manager + - base.group_user + login: user2 + name: User 2 + password: user2 +- + I create a Project. +- + !record {model: project.project, id: project_project_projecta0}: + balance: 0.0 + credit: 0.0 + currency_id: base.EUR + debit: 0.0 + effective_hours: 0.0 + name: Project A + members: + - res_users_user0 + - res_users_user1 + phase_ids: + - date_start: '2011-01-06' + duration: 2.0 + name: Phase A + product_uom: product.uom_day + state: draft + task_ids: + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task D + planned_hours: 5.0 + remaining_hours: 5.0 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task C + planned_hours: 5.0 + remaining_hours: 5.0 + sequence: 11 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task B + planned_hours: 5.0 + remaining_hours: 5.0 + sequence: 13 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task A + planned_hours: 5.0 + remaining_hours: 5.0 + sequence: 14 + state: draft + total_hours: 5.0 + planned_hours: 20.0 + progress_rate: 0.0 + quantity: 0.0 + quantity_max: 0.0 + state: open + tasks: + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task D + planned_hours: 5.0 + remaining_hours: 5.0 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task C + planned_hours: 5.0 + remaining_hours: 5.0 + sequence: 11 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task B + planned_hours: 5.0 + remaining_hours: 5.0 + sequence: 13 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task A + planned_hours: 5.0 + remaining_hours: 5.0 + sequence: 14 + state: draft + total_hours: 5.0 + total_hours: 15.0 +- + I create first task with highest sequence. +- + !record {model: project.task, id: project_task_taska0}: + delay_hours: 0.0 + effective_hours: 0.0 + name: Task A + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + sequence: 14 + state: draft + total_hours: 5.0 +- + I create second task. +- + !record {model: project.task, id: project_task_taskb0}: + delay_hours: 0.0 + effective_hours: 0.0 + name: Task B + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + sequence: 13 + state: draft + total_hours: 5.0 +- + I create third task. +- + !record {model: project.task, id: project_task_taskc0}: + delay_hours: 0.0 + effective_hours: 0.0 + name: Task C + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + sequence: 11 + state: draft + total_hours: 5.0 +- + I create fourth task with lowest sequence. +- + !record {model: project.task, id: project_task_taskd0}: + delay_hours: 0.0 + effective_hours: 0.0 + name: Task D + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + state: draft + total_hours: 5.0 +- + Now I create a resource for first user. +- + !record {model: resource.resource, id: resource_resource_user0}: + name: User 1 + resource_type: user + time_efficiency: 1.0 + user_id: res_users_user0 +- + I create a resource for second user. +- + !record {model: resource.resource, id: resource_resource_user1}: + name: User 2 + resource_type: user + time_efficiency: 1.0 + user_id: res_users_user1 +- + Now I create one phase for the project. +- + !record {model: project.phase, id: project_phase_phasea0}: + date_start: '2011-01-06' + duration: 2.0 + name: Phase A + product_uom: product.uom_day + project_id: project_project_projecta0 + resource_ids: + - project_id: project_project_projecta0 + resource_id: resource_resource_user0 + - project_id: project_project_projecta0 + resource_id: resource_resource_user1 + state: draft + task_ids: + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task D + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task C + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + sequence: 11 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task B + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + sequence: 13 + state: draft + total_hours: 5.0 + - delay_hours: 0.0 + effective_hours: 0.0 + name: Task A + planned_hours: 5.0 + project_id: project_project_projecta0 + remaining_hours: 5.0 + sequence: 14 + state: draft + total_hours: 5.0 +- + Now I create a record to schedule the tasks of project. +- + !record {model: project.compute.tasks, id: project_compute_tasks0}: + project_id: project_project_projecta0 +- + I schedule the tasks. +- + !python {model: project.compute.tasks}: | + self.compute_date(cr, uid, [ref("project_compute_tasks0")]) +- + I check that whether the tasks now allocated to respected resources or not. +- + !python {model: project.task}: | + task_ids = self.search(cr, uid, [('project_id','=',ref('project_project_projecta0'))]) + for task in self.browse(cr, uid, task_ids): + if (not task.user_id) or (not task.date_start) or (not task.date_end): + raise AssertionError("Tasks are not scheduled.") |
