[MIG] project_task_line: to 15.0

Re-implement the subtasks smartbutton and action.
This commit is contained in:
Jared Kipe
2022-01-06 09:31:28 -08:00
parent 5faf71afac
commit dc247789e4
3 changed files with 26 additions and 10 deletions

View File

@@ -5,11 +5,11 @@
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2" />
<field name="arch" type="xml">
<xpath expr="//field[@name='subtask_count']" position="replace">
<div class="o_field_widget o_stat_info">
<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>
</div>
</button>
</xpath>
<xpath expr="//page[@name='description_page']" position="after">
<page name="task_lines" string="Todo List">