<?xml version="1.0"?>
<data><xpath expr="//button[@name='action_view_sos'][1]" position="attributes">
                <attribute name="context">{'create_for_project_id': id, 'default_project_id': id, 'default_partner_id': partner_id}</attribute>
            </xpath>
            <xpath expr="//button[@name='action_view_sos'][2]" position="attributes">
                <attribute name="context">{'create_for_project_id': id, 'default_project_id': id, 'default_partner_id': partner_id}</attribute>
            </xpath>
            <xpath expr="//page[@name='settings']" position="after">
                <page name="billing_employee_rate" string="Invoicing" invisible="not allow_billable or not partner_id">
                    <field name="sale_line_employee_ids" mode="list,kanban" context="{'default_sale_line_id': sale_line_id}">
                        <list editable="bottom">
                            <field name="company_id" column_invisible="True"/>
                            <field name="partner_id" column_invisible="True"/>
                            <field name="sale_order_id" column_invisible="True"/>
                            <field name="employee_id" widget="many2one_avatar_user" context="{'create_project_employee_mapping': company_id}"/>
                            <field name="existing_employee_ids" column_invisible="True"/>
                            <field name="sale_line_id" column_invisible="parent.id" required="True" options="{'no_create': True}" context="{'search_default_order_id': sale_order_id}"/>
                            <field name="sale_line_id" column_invisible="not parent.id" required="True" groups="!sales_team.group_sale_salesman" options="{'no_create': True}" context="{'search_default_order_id': sale_order_id}"/>
                            <field name="sale_line_id" column_invisible="not parent.id" required="True" groups="sales_team.group_sale_salesman" context="{                                     'search_default_order_id': sale_order_id,                                     'form_view_ref': 'sale_project.sale_order_line_view_form_editable',                                     'default_partner_id': parent.partner_id,                                     'default_company_id': parent.company_id,                                     'default_order_id': sale_order_id,                                 }"/>
                            <field name="price_unit" widget="monetary" force_save="1" options="{'currency_field': 'currency_id'}"/>
                            <field name="display_cost" widget="monetary" options="{'currency_field': 'cost_currency_id'}"/>
                            <field name="is_cost_changed" column_invisible="True"/>
                            <field name="currency_id" column_invisible="True"/>
                            <field name="cost_currency_id" column_invisible="True"/>
                        </list>
                        <kanban class="o_kanban_mobile">
                            <field name="currency_id"/>
                            <templates>
                                <t t-name="card">
                                    <div class="row">
                                        <div class="col-8 d-flex">
                                            <field name="employee_id" widget="many2one_avatar_employee"/>
                                            <field name="employee_id" class="fw-bold ps-1"/>
                                        </div>
                                        <div class="col-4 float-end text-end">
                                            <b>Unit Price: </b>
                                            <field name="price_unit" widget="monetary" force_save="1" options="{'currency_field': 'currency_id'}"/>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <field name="sale_line_id" class="col-8 text-muted"/>
                                        <div class="col-4 float-end text-end">
                                            <b>Daily Cost: </b>
                                            <field name="display_cost" widget="monetary" options="{'currency_field': 'currency_id'}"/>
                                        </div>
                                    </div>
                                </t>
                            </templates>
                        </kanban>
                        <form string="Timesheet Activities">
                            <sheet>
                                <group>
                                    <field name="existing_employee_ids" invisible="1"/>
                                    <field name="partner_id" invisible="1"/>
                                    <field name="sale_order_id" invisible="1"/>
                                    <field name="currency_id" invisible="1"/>
                                    <field name="employee_id" widget="many2one_avatar_employee" required="1"/>
                                    <field name="sale_line_id" invisible="parent.id" options="{'no_create': True}" context="{'search_default_order_id': sale_order_id}"/>
                                    <field name="sale_line_id" invisible="not parent.id" required="True" groups="!sales_team.group_sale_salesman" options="{'no_create': True}" context="{'search_default_order_id': sale_order_id}"/>
                                    <field name="sale_line_id" invisible="not parent.id" required="True" groups="sales_team.group_sale_salesman" options="{'no_quick_create': True}" context="{                                             'search_default_order_id': sale_order_id,                                             'form_view_ref': 'sale_project.sale_order_line_view_form_editable',                                             'default_partner_id': parent.partner_id,                                             'default_company_id': parent.company_id,                                             'default_order_id': sale_order_id,                                         }"/>
                                    <field name="price_unit" widget="monetary" readonly="True" force_save="1" options="{'currency_field': 'currency_id'}"/> 
                                    <field name="display_cost" widget="monetary" options="{'currency_field': 'currency_id'}"/>
                                </group>
                            </sheet>
                        </form>
                    </field>
                    <p class="text-muted">
                        <i class="fa fa-lightbulb-o"/>
                        <span>
                            Define the rate at which an employee's time is billed based on their expertise, skills, or experience.
                            To bill the same service at a different rate, create separate sales order items.
                        </span>
                    </p>
                </page>
            </xpath>
            <xpath expr="//page[@name='settings']//field[@name='allow_billable']" position="after">
                <div invisible="not allow_billable or not allow_timesheets" class="text-muted">
                    Timesheets without a sales order item are reported as
                    <field name="billing_type" nolabel="1" class="w-auto"/>
                </div>
            </xpath>
        </data>