Files
suite/project_task_line/views/project_views.xml
Jared Kipe 6bf36b2219 [MIG] project_task_line: to 15.0
Re-implement the subtasks smartbutton and action.
2022-10-27 19:30:00 +00:00

28 lines
1.7 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_task_form2_inherit" model="ir.ui.view">
<field name="name">project.task.form.inherit</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_subtask" type="object" class="oe_stat_button" icon="fa-tasks" attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('id', '=', False)]}" context="{'default_user_ids': user_ids, 'default_parent_id': id, 'default_project_id': project_id}">
<span class="o_stat_value"><field name="subtask_count_done" widget="statinfo" nolabel="1"/> / <field name="subtask_count" widget="statinfo" nolabel="1"/></span>
<span class="o_stat_text">Sub-Tasks</span>
</button>
</xpath>
<xpath expr="//page[@name='description_page']" position="after">
<page name="task_lines" string="Todo List">
<field name="line_ids" widget="one2many_list" context="{'default_task_id': id}">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="kanban_state" widget="selection" string="Status"/>
<field name="user_id" string="Completed by" options="{'no_create': True, 'no_create_edit': True, 'no_open': True}"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
</odoo>