style: fix indentation and whitespace in XML views
Some checks are pending
Setup Native Action / native (3.12.7) (push) Waiting to run
Setup Native Action / docker (3.12.7) (push) Waiting to run

This commit is contained in:
KaySar12 2025-05-24 10:02:19 +07:00
parent 52d197e407
commit 7132c63561
2 changed files with 30 additions and 34 deletions

View File

@ -9,14 +9,10 @@
<field name="readonly_timesheet" column_invisible="True"/>
<field name="date" readonly="readonly_timesheet"/>
<field name="employee_id" column_invisible="True" readonly="readonly_timesheet"/>
<field name="project_id" options="{'no_create_edit': True}" required="1" readonly="readonly_timesheet"
context="{'search_default_my_projects': True}"/>
<field name="task_id" optional="show" options="{'no_create_edit': True, 'no_open': True}" widget="task_with_hours"
context="{'default_project_id': project_id, 'search_default_my_tasks': True, 'search_default_open_tasks': True}"
readonly="readonly_timesheet"/>
<field name="project_id" options="{'no_create_edit': True}" required="1" readonly="readonly_timesheet" context="{'search_default_my_projects': True}"/>
<field name="task_id" optional="show" options="{'no_create_edit': True, 'no_open': True}" widget="task_with_hours" context="{'default_project_id': project_id, 'search_default_my_tasks': True, 'search_default_open_tasks': True}" readonly="readonly_timesheet"/>
<field name="name" optional="show" required="0" readonly="readonly_timesheet"/>
<field name="unit_amount" string="Time Spent" optional="show" widget="timesheet_uom" sum="Total" readonly="readonly_timesheet"
decoration-danger="unit_amount &gt; 24 or unit_amount &lt; 0" decoration-muted="unit_amount == 0"/>
<field name="unit_amount" string="Time Spent" optional="show" widget="timesheet_uom" sum="Total" readonly="readonly_timesheet" decoration-danger="unit_amount &gt; 24 or unit_amount &lt; 0" decoration-muted="unit_amount == 0"/>
<field name="company_id" column_invisible="True"/>
<field name="user_id" column_invisible="True"/>
</list>
@ -162,20 +158,14 @@
<group>
<group>
<field name="readonly_timesheet" invisible="1"/>
<field name="project_id" options="{'no_create_edit': True}"
context="{'search_default_my_projects': True}"
required="1"
readonly="readonly_timesheet"/>
<field name="task_id" widget="task_with_hours" options="{'no_create_edit': True}"
context="{'default_project_id': project_id, 'search_default_my_tasks': True, 'search_default_open_tasks': True}"
readonly="readonly_timesheet"/>
<field name="project_id" options="{'no_create_edit': True}" context="{'search_default_my_projects': True}" required="1" readonly="readonly_timesheet"/>
<field name="task_id" widget="task_with_hours" options="{'no_create_edit': True}" context="{'default_project_id': project_id, 'search_default_my_tasks': True, 'search_default_open_tasks': True}" readonly="readonly_timesheet"/>
<field name="company_id" groups="base.group_multi_company" invisible="1"/>
</group>
<group>
<field name="date" readonly="readonly_timesheet"/>
<field name="amount" invisible="1"/>
<field name="unit_amount" string="Time Spent" widget="timesheet_uom" decoration-danger="unit_amount &gt; 24"
readonly="readonly_timesheet" decoration-muted="unit_amount == 0"/>
<field name="unit_amount" string="Time Spent" widget="timesheet_uom" decoration-danger="unit_amount &gt; 24" readonly="readonly_timesheet" decoration-muted="unit_amount == 0"/>
<field name="currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
</group>
@ -194,9 +184,7 @@
<field name="priority">10</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="before">
<field name="employee_id" groups="hr_timesheet.group_hr_timesheet_approver" widget="many2one_avatar_employee"
required="1"
readonly="readonly_timesheet" context="{'active_test': True}"/>
<field name="employee_id" groups="hr_timesheet.group_hr_timesheet_approver" widget="many2one_avatar_employee" required="1" readonly="readonly_timesheet" context="{'active_test': True}"/>
<field name="user_id" invisible="1" groups="hr_timesheet.group_hr_timesheet_approver"/>
</xpath>
</field>
@ -304,14 +292,20 @@
</span>
<span>
<i class="fa fa-calendar me-1" role="img" aria-label="Date" title="Date"></i>
<field name="date"/><span invisible="context.get('is_my_timesheets')"> - <field name="employee_id"/></span>
<field name="date"/>
<span invisible="context.get('is_my_timesheets')"> - <field name="employee_id"/>
</span>
</span>
<span class="text-truncate" t-att-title="record.name.value">
<field name="name" class="fst-italic"/>
</span>
<span class="text-truncate" t-att-title="record.name.value"><field name="name" class="fst-italic"/></span>
</div>
</div>
<footer class="mt-0 pt-0">
<div class="d-flex ms-auto">
<strong><field name="unit_amount" widget="timesheet_duration_uom" decoration-danger="unit_amount &gt; 24" decoration-muted="unit_amount == 0" class="ms-1"/></strong>
<strong>
<field name="unit_amount" widget="timesheet_duration_uom" decoration-danger="unit_amount &gt; 24" decoration-muted="unit_amount == 0" class="ms-1"/>
</strong>
</div>
</footer>
</t>
@ -346,12 +340,12 @@
}</field>
<field name="search_view_id" ref="hr_timesheet_line_my_timesheet_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
<p class="o_view_nocontent_smiling_face">
No activities found. Let's start a new one!
</p>
<p>
</p>
<p>
Track your working hours by projects every day and invoice this time to your customers.
</p>
</p>
</field>
</record>
@ -426,10 +420,10 @@
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No activities found. Let's start a new one!
</p>
<p>
</p>
<p>
Track your working hours by projects every day and invoice this time to your customers.
</p>
</p>
</field>
</record>
@ -480,7 +474,8 @@
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Record a new activity
</p><p>
</p>
<p>
You can register and track your workings hours by project every
day. Every time spent on a project will become a cost and can be re-invoiced to
customers if required.
@ -501,11 +496,12 @@
}</field>
<field name="search_view_id" ref="hr_timesheet_line_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
<p class="o_view_nocontent_smiling_face">
Record a new activity
</p><p>
</p>
<p>
Track your working hours by projects every day and invoice this time to your customers.
</p>
</p>
</field>
</record>

@ -1 +1 @@
Subproject commit e38c7ded804484d66f2c3a02859254ece158e0fd
Subproject commit bee235defa7555b55d2087ee5795f9d32fb46ab3