Before this commit, when the user changes the stage of a task linked to a milestone, he cannot know if after that task, there is another one before reaching the milestone related. This commit displays a wizard to allow the current user to directly mark as reached the milestone when the user changes the stage of a task linked to a milestone to a closed stage and all tasks linked to that milestone are done too. However, if the milestone is already reached, no wizard will be displayed. task-2829542
31 lines
1.6 KiB
XML
31 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="project_milestone_reach_wizard_view_form" model="ir.ui.view">
|
|
<field name="name">project.milestone.reach.wizard.view.form</field>
|
|
<field name="model">project.milestone.reach.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<field name="line_count" invisible="1" />
|
|
<span attrs="{'invisible': [('line_count', '!=', 1)]}">Congratulations, all of the tasks linked to the <field name="milestone_id" nolabel="1" /> milestone are now done. Would you like to mark this milestone as reached?</span>
|
|
<span attrs="{'invisible': [('line_count', '=', 1)]}">Congratulations, all of the tasks linked to those milestones are now done. Would you like to mark those milestones as reached?</span>
|
|
<group attrs="{'invisible': [('line_count', '=', 1)]}">
|
|
<field name="line_ids" nolabel="1">
|
|
<tree create="0" editable="1">
|
|
<field name="milestone_id" />
|
|
<field name="mark_as_reached" />
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</sheet>
|
|
<footer>
|
|
<button string="Mark As Reached" type="object" name="action_mark_milestone_as_reach" class="btn btn-primary" data-hotkey="q"/>
|
|
<button string="Discard" special="cancel" data-hotkey="z"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|