[IMP] hr_employee : make UX improvements

task - 3203838

closes odoo/odoo#114677

X-original-commit: dbb6ad44d2bf027f1fae34f616fa39e614ac8e8e
Related: odoo/enterprise#37908
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Jurgen (jugj)
2023-03-20 16:51:06 +01:00
parent 5ac340b1b2
commit a0b256e41f
5 changed files with 9 additions and 7 deletions
+5 -2
View File
@@ -116,7 +116,7 @@
options='{"always_reload": True, "highlight_first_line": True}'/>
<field name="work_location_id" context="{'default_address_id': address_id}" />
</group>
<group name="managers" string="Approvers" class="hide-group-if-empty">
<group name="managers" string="Approvers" class="hide-group-if-empty" invisible="1">
<!-- is overridden in other hr related modules -->
</group>
<group name="departure" string="Departure" attrs="{'invisible': [('active', '=', True)]}">
@@ -198,7 +198,10 @@
<button name="%(hr_employee_print_badge)d" string="Print Badge" class="btn btn-link" type="action" attrs="{'invisible': [('barcode', '=', False)]}"/>
</div>
</group>
<group name="application_group"/>
<group string='Payroll' name="payroll_group">
<field name="job_id"/>
</group>
<group name="application_group" string="Application Settings" invisible="1"/>
</group>
</page>
</notebook>
+1 -1
View File
@@ -15,7 +15,7 @@
</button>
</div>
<group name="application_group" position="attributes">
<attribute name="string">Application Settings</attribute>
<attribute name="invisible">0</attribute>
</group>
<group name="application_group" position="inside">
<field name="mobility_card" string="Fleet Mobility Card"/>
+1 -2
View File
@@ -86,8 +86,7 @@ class HrEmployeeBase(models.AbstractModel):
('holiday_status_id.active', '=', True),
('holiday_status_id.requires_allocation', '=', 'yes'),
('state', '=', 'validate'),
'|',
('date_to', '=', False),
('date_from', '<=', current_date),
('date_to', '>=', current_date),
], ['number_of_days:sum', 'employee_id'], ['employee_id'])
rg_results = dict((d['employee_id'][0], {"employee_id_count": d['employee_id_count'], "number_of_days": d['number_of_days']}) for d in data)
@@ -7,7 +7,7 @@
<field name="priority" eval="40"/>
<field name="arch" type="xml">
<group name="application_group" position="attributes">
<attribute name="string">Application Settings</attribute>
<attribute name="invisible">0</attribute>
</group>
<group name="application_group" position="inside">
<label for="hourly_cost"/>
@@ -35,7 +35,7 @@
t-att-style="'background-image:url(\'/web/image/hr.employee.public/' + employee.id + '/avatar_1024/\')'"/>
</div>
<div class="d-flex flex-grow-1 align-items-start justify-content-between position-relative px-3">
<div class="d-flex flex-grow-1 align-items-center justify-content-between position-relative px-3">
<a t-if="!is_self" t-att-href="employee.link" class="o_employee_redirect d-flex flex-column" t-att-data-employee-id="employee.id" t-on-click.prevent="() => this._onEmployeeRedirect(employee.id)">
<b class="o_media_heading m-0 fs-6" t-esc="employee.name"/>
<small class="text-muted fw-bold" t-esc="employee.job_title"/>