... when all the projects are already archived. closes odoo/odoo#48728 Taskid: 2228556 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
30 lines
1.6 KiB
XML
30 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="project_delete_wizard_form" model="ir.ui.view">
|
|
<field name="name">Delete Project</field>
|
|
<field name="model">project.delete.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Delete Project">
|
|
<field name="task_count" invisible="1" />
|
|
<field name="projects_archived" invisible="1" />
|
|
<group attrs="{'invisible': [('task_count', '=', 0)]}">
|
|
<span>You cannot delete a project containing tasks. You can either archive it or first delete all of its tasks.</span>
|
|
</group>
|
|
<group attrs="{'invisible': [('task_count', '>', 0)]}">
|
|
<span>Are you sure you want to delete this project ?</span>
|
|
</group>
|
|
<footer attrs="{'invisible': [('task_count', '=', 0)]}">
|
|
<button string="Archive project" type="object" name="action_archive" class="btn btn-primary" attrs="{'invisible': [('projects_archived', '=', True)]}" />
|
|
<button string="Discard" special="cancel" />
|
|
</footer>
|
|
<footer attrs="{'invisible': [('task_count', '>', 0)]}">
|
|
<button string="Ok" type="object" name="confirm_delete" class="btn btn-primary" />
|
|
<button string="Cancel" special="cancel" />
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|