<form string="Project Sharing: Task" class="o_form_project_tasks">
                <header>
                    <field name="stage_id" widget="statusbar_duration" options="{'clickable': '1', 'fold_field': 'fold'}" invisible="not project_id and not stage_id"/>
                </header>
                <div groups="base.group_user" role="status" class="alert alert-info alert-dismissible rounded-0 fade show d-print-none css_editable_mode_hidden">
                    <div class="text-center">This is a preview of how the project will look when it's shared with customers and they have editing access.
                        <a name="action_redirect_to_project_task_form" type="object"><i class="oi oi-arrow-right me-1"/>Back to edit mode</a>
                    </div>
                </div>
                <sheet string="Task">
                    <div class="oe_button_box" name="button_box">
                        <field name="display_parent_task_button" invisible="1"/>
                        <field name="recurrence_id" invisible="1"/>
                        <button name="action_project_sharing_view_parent_task" type="object" class="oe_stat_button" icon="fa-tasks" invisible="not display_parent_task_button">
                            <div class="o_stat_info">
                                <span class="o_stat_text">Parent Task</span>
                            </div>
                        </button>
                        <button name="action_project_sharing_recurring_tasks" type="object" invisible="not active or not recurrence_id" class="oe_stat_button" icon="fa-repeat" context="{'default_user_ids': [(6, 0, [uid])]}">
                            <field name="recurring_count" widget="statinfo" string="Recurring Tasks"/>
                        </button>
                        <button name="action_project_sharing_open_subtasks" type="object" class="oe_stat_button" icon="fa-check" invisible="not id or subtask_count == 0" context="{                                 'default_user_ids': [(6, 0, [uid])],                                 'default_project_id': project_id,                                 'default_display_in_project': False,                             }">
                            <field name="subtask_count" widget="statinfo" string="Sub-tasks"/>
                            <field name="display_in_project" invisible="True"/>
                        </button>
                        <button name="action_project_sharing_open_blocking" type="object" invisible="not dependent_tasks_count" class="oe_stat_button" icon="fa-tasks">
                            <div class="o_field_widget o_stat_info">
                                <span class="o_stat_text">Blocked Tasks</span>
                                <span class="o_stat_value ">
                                    <field name="dependent_tasks_count" widget="statinfo" nolabel="1"/>
                                </span>
                            </div>
                        </button>
                    </div>
                    <widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
                    <div class="oe_title pe-0">
                        <h1 class="d-flex flex-row justify-content-between">
                            <field name="priority" widget="priority" class="me-3"/>
                            <field name="name" class="o_task_name text-truncate" placeholder="Task Title..."/>
                            <div class="d-flex justify-content-end o_state_container" invisible="not active">
                                <field name="state" widget="project_task_state_selection" class="o_task_state_widget"/>
                            </div>
                            <div class="d-flex justify-content-start o_state_container w-100 w-md-50 w-lg-25" invisible="active">
                                <field name="state" widget="project_task_state_selection" class="o_task_state_widget"/>
                            </div>
                        </h1>
                    </div>
                    <group>
                        <group>
                            <field name="project_id" invisible="1"/>
                            <field name="allow_milestones" invisible="1"/>
                            <field name="milestone_id" placeholder="e.g. Product Launch" invisible="not allow_milestones" readonly="1" options="{'no_open': True}"/>
                            <field name="user_ids" invisible="1"/>
                            <field name="portal_user_names" string="Assignees" class="o_task_user_field"/>
                            <field name="tag_ids" context="{'project_id': project_id}" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True, 'no_edit': True, 'no_edit_color': True}"/>
                        </group>
                        <group>
                            <field name="active" invisible="1"/>
                            <field name="parent_id" invisible="1"/>
                            <field name="company_id" invisible="1"/>
                            <field name="state" invisible="1"/>
                            <field name="depend_on_count" invisible="1"/>
                            <field name="allow_task_dependencies" invisible="1"/>
                            <field name="current_user_same_company_partner" invisible="1"/>
                            <field name="partner_id" readonly="not current_user_same_company_partner" options="{'no_open': True, 'no_create': True, 'no_edit': True}" invisible="not project_id"/>
                            <field name="date_deadline" decoration-danger="date_deadline &lt; current_date and state not in ['1_done', '1_canceled']"/>
                            <field name="recurring_task" groups="project.group_project_recurring_tasks"/>
                            <label for="repeat_interval" invisible="not recurring_task" groups="project.group_project_recurring_tasks"/>
                            <div invisible="not recurring_task" class="d-flex" groups="project.group_project_recurring_tasks">
                                <field name="repeat_interval" required="recurring_task" class="me-2" style="max-width: 2rem !important;"/>
                                <field name="repeat_unit" required="recurring_task" class="me-2" style="max-width: 4rem !important;"/>
                                <field name="repeat_type" required="recurring_task" class="me-2" style="max-width: 15rem !important;"/>
                                <field name="repeat_until" invisible="not repeat_type == 'until'" required="repeat_type == 'until'" class="me-2"/>
                            </div>
                            <field name="partner_id" readonly="1" options="{'no_open': True, 'no_create': True, 'no_edit': True}" invisible="not project_id"/>
                            <field name="date_deadline" invisible="state in ['1_done', '1_canceled']" decoration-danger="date_deadline &lt; current_date"/>
                        </group>
                    </group>
                    <notebook>
                        <page name="description_page" string="Description">
                            <field name="description" type="html" placeholder="Add details about this task..." options="{'collaborative': true, 'disableImage': true, 'disableVideo': true, 'disableFile': true}"/>
                        </page>
                        <page name="sub_tasks_page" string="Sub-tasks">
                            <field name="child_ids" context="{                                 'default_project_id': project_id, 'default_display_in_project': False, 'default_parent_id': id,                                 'default_milestone_id': allow_milestones and milestone_id, 'default_partner_id': partner_id,                                 'form_view_ref' : 'project.project_sharing_project_task_view_form',                             }">
                                <list editable="bottom" decoration-muted="state in ['1_done','1_canceled']">
                                    <field name="project_id" column_invisible="True"/>
                                    <field name="display_in_project" column_invisible="True"/>
                                    <field name="state" column_invisible="True"/>
                                    <field name="sequence" widget="handle"/>
                                    <field name="priority" widget="priority" optional="show" nolabel="1" width="20px"/>
                                    <field name="state" widget="project_task_state_selection" nolabel="1" width="20px"/>
                                    <field name="subtask_count" column_invisible="1"/>
                                    <field name="closed_subtask_count" column_invisible="1"/>
                                    <field name="name" widget="name_with_subtask_count"/>
                                    <field name="allow_milestones" column_invisible="True"/>
                                    <field name="milestone_id" optional="hide" options="{'no_open': True}" readonly="1" column_invisible="not parent.allow_milestones" invisible="not allow_milestones"/>
                                    <field name="company_id" column_invisible="True"/>
                                    <field name="partner_id" options="{'no_open': True, 'no_create': True, 'no_edit': True}" optional="hide"/>
                                    <field name="user_ids" column_invisible="True"/>
                                    <field name="portal_user_names" string="Assignees" optional="show"/>
                                    <field name="date_deadline" decoration-danger="date_deadline &lt; current_date and state not in ['1_done', '1_canceled']" optional="show"/>
                                    <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide"/>
                                    <field name="stage_id" domain="[('user_id', '=', False), ('project_ids', 'in', [project_id])]"/>
                                    <button name="action_open_task" type="object" title="View Task" string="View Task" class="btn btn-link float-end" context="{'form_view_ref': 'project.project_sharing_project_task_view_form', 'search_view_ref': 'project.project_sharing_project_task_view_search'}" invisible="project_id != context.get('active_id')"/>
                                </list>
                            </field>
                        </page>
                        <page name="task_dependencies" string="Blocked By" invisible="not allow_task_dependencies">
                            <field name="depend_on_ids" widget="depend_on_ids_one2many" nolabel="1" options="{'link': false}" readonly="1" context="{                                     'depend_on_count': depend_on_count,                                     'list_view_ref': 'project.open_view_blocked_by_list_view',                                     'search_view_ref': 'project.project_sharing_project_task_view_search',                                     'search_default_project_id': project_id,                             }">
                                <list editable="bottom" decoration-muted="state in ['1_done','1_canceled']">
                                    <field name="project_id" column_invisible="True"/>
                                    <field name="sequence" widget="handle"/>
                                    <field name="priority" widget="priority" optional="show" nolabel="1" width="20px" readonly="1"/>
                                    <field name="state" widget="project_task_state_selection" nolabel="1" width="20px" readonly="1"/>
                                    <field name="subtask_count" column_invisible="1"/>
                                    <field name="closed_subtask_count" column_invisible="1"/>
                                    <field name="name" widget="name_with_subtask_count"/>
                                    <field name="allow_milestones" column_invisible="True"/>
                                    <field name="milestone_id" optional="hide" context="{'default_project_id': project_id}" invisible="not allow_milestones" column_invisible="not parent.allow_milestones"/>
                                    <field name="company_id" column_invisible="True"/>
                                    <field name="partner_id" options="{'no_open': True, 'no_create': True, 'no_edit': True}" optional="hide" invisible="not project_id"/>
                                    <field name="portal_user_names" string="Assignees" optional="show"/>
                                    <field name="date_deadline" decoration-danger="date_deadline &lt; current_date and state not in ['1_done', '1_canceled']" optional="show"/>
                                    <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide"/>
                                    <field name="stage_id" optional="show"/>
                                    <button name="action_open_task" type="object" title="View Task" string="View Task" class="btn btn-link float-end" context="{'form_view_ref': 'project.project_sharing_project_task_view_form'}" invisible="project_id != context.get('active_id')"/>
                                </list>
                            </field>
                        </page>
                    </notebook>
                </sheet>
                <!-- field used inside the chatter to know if the portal user is follower or not -->
                <field name="message_is_follower" invisible="1"/>
                <field name="display_follow_button" invisible="1"/>
                <chatter/>
            </form>