Search 1.9 billion lines of Odoo code on GitHub

project_template

Author: Numigi
License: LGPL-3
Branch: 14.0
Repository: Numigi/odoo-project-addons
Dependencies: project, and web
Languages: JavaScript (38, 4.9%), PO File (71, 9.1%), Python (425, 54.4%), XML (167, 21.4%), and reStructuredText (80, 10.2%)
Other branches: 12.0, 452, TA#42546, TA#43556, TA#44075---manage_project_budget_using_milestone, TA#44076---Update-dockerfile, TA#44215---project_task_kanban_view_partner, TA#445738---project_outsourcing_timesheet_manage_contacts, TA#45451---add_project_milestone_week_duration, TA#45451---fix_after_test, TA#45452, TA#45459---project_milestone_timeline_dynamic, TA#45464---project_manager_access_right, TA#45526, TA#45528, TA#45902---analytic_line_revenue_v14, TA#45902---project_cost_smart_button_migration, TA#45902-analytic_line_employee_migration, TA#46088---project_timesheet_time_control_employee_pin, TA#46412---project_default_task_stage, TA#46412---project_stage_no_quick_create, TA#46412---project_task_date_planned, TA#46412---project_type, TA#46412--project_task_full_text_search, TA#47760---correctif#6, TA#47906, TA#48575, TA#51167, TumbaoJu-patch-1, abenzbiria-patch-1, jbreard-patch-1, jbreard-patch-2, and update_analytic_account_on_timesheets
Other repositories: 1pot/project, Alfa-90/project, BA-Samadhan/project, BhanusmitaBorah/project-1, Callino/project, Chandresh-SerpentCS/project, Change2improve/project, Darknroses/project, Digital5-Odoo/project, Dobtor-OCA/project, ERPLibre/project, EngAmani/project, ForgeFlow/project, Freni-SerpentCS/project, Gabinete-Digital/project, Gio666/project, Hql999/project, Ingeos/project, KARIZMA-CONSEIL/project, LevelPrime/project, MathBenTech/project, MjAbuz/project, NAJEM-BRAHIM/project, NachoAlesLopez/project, NeatNerdPrime/project, NextERP-Romania/project, NickyKatze/project, Nikul-Chaudhary/project, Numigi/odoo-project, OCA-MUK/project, OCA/project, OpenAT/project, PESOL/project, QubiQ/project, Rad0van/project, SanteLibre/project, SequarSrl/project, SerkanKorkusuz/project, SeuMarco/project-service, ShravanMeena/project, Studio73/project, Syci-Consulting/project, T2BE/project, Tecnativa/project, Thomasshel/project, TimLai125/project, UnknownInfo/project, VCLS-org/project, Vauxoo/project, Ziad799/project, aaltinisik/project, acsone/project, akretion/project, alfadil/project, anandkansagra/project, anhvu-sg/project, area-scm/project, arisnew/project, audreyrah2018/project-1, aurestic/project, avoinsystems/project, basmah17/project, binovo/project, bmya/project, bodedra/project, bouktaibMohssin/project, bqz913/project, brain-tec/project, brainbeanapps/project, calistus-igwilo/project, camptocamp/project, cherukurisai451/project, click2prasanth/project, compa-inc/project, coopdevs/project, coopiteasy/project, cramosh/project, crnd-inc/project, cvinh/project, damiam34/project, daramousk/project, davejames/project, davydace/project, dhp-denero/project, digitalsatori/project, dkshahi/project, druidoo-dev/project, dungmv56/project, dvorakmilda/project, eLBati/project, ecosoft-odoo/project, efatto/project, emagdalenaC2i/project, enmasys/project, enzymz/project, exosoftware/oca-project, flotho/project, focusate/oca-project, fraxnet/project, gaberabdullah2002/project, gfcapalbo/project, glm-conseil/project, guilhom34/project, gurneyalex/project, hinfo506/project, hippe-67/project, hiweye/project, ideaspositivas-group/project, igallart/project, ilyasProgrammer/project, ip-candres/project, j-zaballa/project, jacky82669513/project, jop-odoo/project, kdessinger/project, kitworks-systems/project, kmee/project, kos94ok-3D/project, krishnagugulothu/project, leemannd/project, lefilament/project, lfreeke/project, lideritjnma/project, lieblinger/project, lilotter45/project, lincersolucoes/oca-project, loftwah/project, marcel1981/project, maxellini/project, mhaodoo/project, mlaitinen/project, mnajjari49/project, modoolar/oca-project, mohammad0omar/project, mohammed0115/project, multidadosti-erp/project, nguyenductamlhp/project, nikalicious21/project, ntsirintanis/project, onurugur/project, ortese/project, ovnicraft/project, patrickrwilson/project, pedroguirao/project, petypi/project, pnajman-modoolar/project-1, python-saber/project, rabchev/project, rafaelbaueb/project, randall-vx/project, rba-odoo/project, reachconcept/project, riya909/project, rsullivan2704/project, sa3m/project, sadeqamin/project, sanube/project, savoirfairelinux/project, sendalpegat/project, sergiocorato/project, shiram/project, shiva16/project, simple-software-lab/project, solvosci/project, sschmid-test-org/project, steingabelgaard/project, sunflowerit/project, sysadminmatmoz/project, sysmonee/project, takinobori/oca-project, takobi-online/project, tarteo/project, tbaden/project, tecix/project, tegin/project, tftmtgh/project, tonihr/project, tonygalmiche/project, trevi-software/project, tvtma/project, unitek-solusi/OCA-project, ursais/project, v-garcies/project, vdedyukhin/project, versada/project, veryberry/project, vialaurea/OCA-project, wahello/oca-project, xcgd/project, yucer/project, yweng8111/project, and zoomvr/project

<h1 class="title">Project Template</h1> <p>This module allows to define project and task templates.</p> <div class="contents topic" id="table-of-contents"> <p class="topic-title">Table of Contents</p> <ul class="simple"> <li><a class="reference internal" href="#task-templates" id="id1">Task Templates</a></li> <li><a class="reference internal" href="#hidden-fields" id="id2">Hidden Fields</a><ul> <li><a class="reference internal" href="#making-a-field-invisible" id="id3">Making a Field Invisible</a></li> <li><a class="reference internal" href="#search-filters" id="id4">Search Filters</a></li> </ul> </li> <li><a class="reference internal" href="#adding-template-tasks-to-a-project" id="id5">Adding Template Tasks to a Project</a><ul> <li><a class="reference internal" href="#how-this-works" id="id6">How This Works</a></li> </ul> </li> <li><a class="reference internal" href="#converting-templates-to-tasks" id="id7">Converting Templates To Tasks</a><ul> <li><a class="reference internal" href="#idempotent" id="id8">Idempotent</a></li> <li><a class="reference internal" href="#subtasks" id="id9">Subtasks</a></li> </ul> </li> <li><a class="reference internal" href="#task-subtasks-integrity" id="id10">Task / Subtasks Integrity</a></li> <li><a class="reference internal" href="#pivot-tables" id="id11">Pivot Tables</a></li> <li><a class="reference internal" href="#known-issues" id="id12">Known Issues</a></li> <li><a class="reference internal" href="#contributors" id="id13">Contributors</a></li> </ul> </div> <a name="task-templates"></a> <h2><a class="toc-backref" href="#id1">Task Templates</a></h2> <p>As member of <code>Projects / User</code>, I go to the form view of a task.</p> <p>I notice a new checkbox <code>Is Template</code> under the <code>Extra Info</code> tab.</p> <img alt="static/description/task_template_form_checkbox.png" src="static/description/task_template_form_checkbox.png" /> <p>I check the box.</p> <p>A warning message is displayed on the form view to signal that the task is a template.</p> <img alt="static/description/task_template_form_warning.png" src="static/description/task_template_form_warning.png" /> <p>I save the template.</p> <a name="hidden-fields"></a> <h2><a class="toc-backref" href="#id2">Hidden Fields</a></h2> <p>Multiple fields are hidden in the form of view of task templates including:</p> <ul class="simple"> <li>Assigned To</li> <li>Customer</li> <li>Kanban State</li> <li>Date Fields</li> <li>Timesheets (see module <code>project_template_timesheet</code>)</li> </ul> <p>These fields are not relevant for a template.</p> <p>Some irrelevant smart buttons are also hidden.</p> <a name="making-a-field-invisible"></a> <h3><a class="toc-backref" href="#id3">Making a Field Invisible</a></h3> <p>To make a field (or any other xml node) hidden only for task templates, you may inherit the form view and add a special attribute:</p> <pre> <code lang="xml">&lt;field name=&quot;my_task_field&quot; position=&quot;attributes&quot;&gt; &lt;attribute name=&quot;invisible_on_template&quot;&gt;1&lt;/attribute&gt; &lt;/field&gt;</code> </pre> <p>This is equivalent to:</p> <pre> <code lang="xml">&lt;field name=&quot;my_task_field&quot; position=&quot;attributes&quot;&gt; &lt;attribute name=&quot;attrs&quot;&gt;{'invisible': [('is_template', '=', True)]}&lt;/attribute&gt; &lt;/field&gt;</code> </pre> <p>One advantage of the <code>invisible_on_template</code> is to prevent conflicts with other modifiers.</p> <p>Also, when a field uses <code>invisible_on_template=&quot;1&quot;</code>. The field will never be required for a template.</p> <a name="search-filters"></a> <h3><a class="toc-backref" href="#id4">Search Filters</a></h3> <p>By default, tasks flagged as template do not appear in search results.</p> <img alt="static/description/task_kanban_without_templates.png" src="static/description/task_kanban_without_templates.png" /> <p>Tasks templates can be shown by activating the <code>Task Templates</code> filter.</p> <img alt="static/description/task_template_filter.png" src="static/description/task_template_filter.png" /> <p>By selecting both <code>Task Templates</code> and <code>Tasks</code> filters, both templates and normal tasks are shown together.</p> <img alt="static/description/task_template_and_tasks_filter.png" src="static/description/task_template_and_tasks_filter.png" /> <a name="adding-template-tasks-to-a-project"></a> <h2><a class="toc-backref" href="#id5">Adding Template Tasks to a Project</a></h2> <p>As member of <code>Projects / Manager</code>, I go to the form view of a project.</p> <p>I notice a new button <code>Add Task Templates</code>.</p> <img alt="static/description/add_task_template_button.png" src="static/description/add_task_template_button.png" /> <p>I click on the button. A wizard is opened.</p> <img alt="static/description/add_task_template_wizard.png" src="static/description/add_task_template_wizard.png" /> <p>The wizard allows to select one or multiple task templates.</p> <p>I select my task template and validate.</p> <img alt="static/description/add_task_template_wizard_validate.png" src="static/description/add_task_template_wizard_validate.png" /> <p>Back on my project, I notice that I have one task template.</p> <img alt="static/description/project_task_template_smart_button.png" src="static/description/project_task_template_smart_button.png" /> <p>If I click on the button, I see the list view of templates under my project.</p> <img alt="static/description/project_task_template_list.png" src="static/description/project_task_template_list.png" /> <a name="how-this-works"></a> <h3><a class="toc-backref" href="#id6">How This Works</a></h3> <p>Behind the scene, each selected task template is copied to create a new task template under the project.</p> <p>Therefore, after adding the template to the project, you may customize the template for your project, without impacting the <code>master / main</code> template.</p> <a name="converting-templates-to-tasks"></a> <h2><a class="toc-backref" href="#id7">Converting Templates To Tasks</a></h2> <p>Back to my project, I notice a button <code>Convert Templates To Tasks</code>.</p> <img alt="static/description/convert_templates_to_tasks_button.png" src="static/description/convert_templates_to_tasks_button.png" /> <p>After clicking on the button, I notice that I have one task.</p> <img alt="static/description/project_task_smart_button.png" src="static/description/project_task_smart_button.png" /> <p>The <code>Convert Templates To Tasks</code> button has a clever mecanism.</p> <p>Behind the scene, each task template under the project is copied to create a real task.</p> <a name="idempotent"></a> <h3><a class="toc-backref" href="#id8">Idempotent</a></h3> <p>If a template was already converted into a task, it will not be converted again.</p> <a name="subtasks"></a> <h3><a class="toc-backref" href="#id9">Subtasks</a></h3> <p>A template task may have subtasks (which must be templates as well).</p> <p>In such case, each subtask inside the template task is also copied to create a real subtask.</p> <p>If after clicking on the button, a new <code>subtemplate</code> is added to a template task, clicking a second time on the button will generate a real subtask.</p> <a name="task-subtasks-integrity"></a> <h2><a class="toc-backref" href="#id10">Task / Subtasks Integrity</a></h2> <p>If a task is a template, then its subtasks must be templates as well. If a task is not a template, then its subtasks must not be templates.</p> <p>When creating a subtask, the <code>Is Template</code> box is automatically propagated.</p> <p>If a task is set as template, all its subtasks are automatically set as template.</p> <a name="pivot-tables"></a> <h2><a class="toc-backref" href="#id11">Pivot Tables</a></h2> <p>In the pivot table of a task, a new field <code>Template / Task</code> allows to partition the table between templates and real tasks.</p> <img alt="static/description/pivot_template_or_task.png" src="static/description/pivot_template_or_task.png" /> <img alt="static/description/pivot_table_partitioned.png" src="static/description/pivot_table_partitioned.png" /> <p>This can be usefull to compare:</p> <ul class="simple"> <li>Planned Hours on Templates (budgeted hours)</li> <li>Planned Hours on Tasks</li> <li>Spent Hours on Tasks</li> </ul> <a name="known-issues"></a> <h2><a class="toc-backref" href="#id12">Known Issues</a></h2> <p>For now project templates are not implemented. This will be implemented in this module.</p> <p>Integration with timesheets will also be implemented in a separate module (<cite>project_template_timesheet</cite>).</p> <a name="contributors"></a> <h2><a class="toc-backref" href="#id13">Contributors</a></h2> <ul class="simple"> <li>Numigi (tm) and all its contributors (<a class="reference external" href="https://bit.ly/numigiens">https://bit.ly/numigiens</a>)</li> </ul>