[FIX] hr_*: fix visuals after always-edit mode
hr_*: - hr - hr_contract - hr_work_entry - hr_work_entry_contract Fixes multiple visual issues in various models task-3002444 closes odoo/odoo#106540 X-original-commit: 6164cf814520560dc016a5eb04080c12c516a509 Related: odoo/enterprise#34395 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
'hr/static/src/views/**/*.js',
|
||||
'hr/static/src/components/**/*',
|
||||
'hr/static/src/user_menu/*.js',
|
||||
'hr/static/src/scss/hr.scss',
|
||||
'hr/static/src/scss/*.scss',
|
||||
'hr/static/src/js/m2x_avatar_employee.js',
|
||||
'hr/static/src/js/standalone_m2o_avatar_employee.js',
|
||||
'hr/static/src/js/work_permit_upload.js',
|
||||
|
||||
@@ -4,7 +4,38 @@
|
||||
}
|
||||
|
||||
.o_employee_form {
|
||||
.o_employee_avatar {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
right: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
.o_employee_availability {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
padding-bottom: 1px;
|
||||
border-radius: 50%;
|
||||
background-color: $o-view-background-color;
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
* {
|
||||
margin-bottom: -1px;
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.oe_title {
|
||||
max-width: 75%;
|
||||
}
|
||||
}
|
||||
|
||||
.o_hr_narrow_field {
|
||||
width: 8rem!important;
|
||||
max-width: 8rem!important;
|
||||
* {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
input#hr_presence_control_email_amount {
|
||||
max-width: 5rem;
|
||||
}
|
||||
@@ -62,23 +62,25 @@
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<field name="avatar_128" invisible="1"/>
|
||||
<field name="image_1920" widget='image' class="oe_avatar" options='{"zoom": true, "preview_image":"avatar_128"}'/>
|
||||
<div class="o_employee_avatar">
|
||||
<field name="image_1920" widget='image' class="oe_avatar m-0" options='{"zoom": true, "preview_image":"avatar_128"}'/>
|
||||
<div id="hr_presence_status" class="d-flex align-items-end fs-6 o_employee_availability">
|
||||
<!-- Employee is present/connected and it is normal according to his work schedule -->
|
||||
<small role="img" class="fa fa-fw fa-circle text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_present')]}" aria-label="Present" title="Present"/>
|
||||
<!-- Employee is not present and it is normal according to his work schedule -->
|
||||
<small role="img" class="fa fa-fw fa-circle-o text-muted o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent')]}" aria-label="Absent" title="Absent" name="presence_absent"/>
|
||||
<!-- Employee is connected but according to his work schedule, he should not work for now -->
|
||||
<small role="img" class="fa fa-fw fa-circle-o text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent_active')]}" aria-label="Present but not active" title="Present but not active" name="presence_absent_active"/>
|
||||
<!-- Employee is not here but according to his work schedule, he should be connected -->
|
||||
<small role="img" class="fa fa-fw fa-circle text-warning o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_to_define')]}" aria-label="To define" title="To define" name="presence_to_define"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<h1 class="d-flex">
|
||||
<field name="name" placeholder="Employee's Name" required="True" style="font-size: min(4vw, 2.6rem);" />
|
||||
<div class="d-flex align-items-end fs-6" style="height: min(4vw, 2.6rem); padding-bottom: 1px;">
|
||||
<div id="hr_presence_status" class="ms-1">
|
||||
<!-- Employee is present/connected and it is normal according to his work schedule -->
|
||||
<small role="img" class="fa fa-fw fa-circle text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_present')]}" aria-label="Present" title="Present"/>
|
||||
<!-- Employee is not present and it is normal according to his work schedule -->
|
||||
<small role="img" class="fa fa-fw fa-circle-o text-muted o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent')]}" aria-label="Absent" title="Absent" name="presence_absent"/>
|
||||
<!-- Employee is connected but according to his work schedule, he should not work for now -->
|
||||
<small role="img" class="fa fa-fw fa-circle-o text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent_active')]}" aria-label="Present but not active" title="Present but not active" name="presence_absent_active"/>
|
||||
<!-- Employee is not here but according to his work schedule, he should be connected -->
|
||||
<small role="img" class="fa fa-fw fa-circle text-warning o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_to_define')]}" aria-label="To define" title="To define" name="presence_to_define"/>
|
||||
</div>
|
||||
<widget name="hr_employee_chat" invisible="not context.get('chat_icon')"/>
|
||||
</div>
|
||||
<h1 class="d-flex flex-row">
|
||||
<widget name="hr_employee_chat" invisible="not context.get('chat_icon')"/>
|
||||
<field name="name" placeholder="Employee's Name"
|
||||
required="True" style="font-size: min(4vw, 2.6rem);"
|
||||
class="ms-3"/>
|
||||
</h1>
|
||||
<h2>
|
||||
<field name="job_title" placeholder="Job Position" />
|
||||
@@ -129,79 +131,51 @@
|
||||
<page name="personal_information" string="Private Information" groups="hr.group_hr_user">
|
||||
<group>
|
||||
<group string="Private Contact">
|
||||
<group colspan="2">
|
||||
<field name="address_home_id"
|
||||
context="{
|
||||
'show_address': 1,
|
||||
'default_type': 'private',
|
||||
'form_view_ref': 'base.res_partner_view_form_private'}"
|
||||
options='{"always_reload": True, "highlight_first_line": True}'/>
|
||||
<field name="private_email" string="Email"/>
|
||||
<field name="phone" class="o_force_ltr" groups="hr.group_hr_user" string="Phone" readonly="True"/>
|
||||
<field name="bank_account_id" context="{'default_partner_id': address_home_id}"/>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="address_home_id"
|
||||
context="{
|
||||
'show_address': 1,
|
||||
'default_type': 'private',
|
||||
'form_view_ref': 'base.res_partner_view_form_private'}"
|
||||
options='{"always_reload": True, "highlight_first_line": True}'/>
|
||||
<field name="private_email" string="Email"/>
|
||||
<field name="phone" class="o_force_ltr" string="Phone" readonly="True"/>
|
||||
<field name="bank_account_id" context="{'default_partner_id': address_home_id}"/>
|
||||
<field name="lang" string="Language"/>
|
||||
<label for="km_home_work" />
|
||||
<label for="km_home_work"/>
|
||||
<div class="o_row" name="div_km_home_work">
|
||||
<field name="km_home_work" groups="hr.group_hr_user"/>
|
||||
<field name="km_home_work" class="o_hr_narrow_field"/>
|
||||
<span>Km</span>
|
||||
</div>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<field name="private_car_plate" />
|
||||
</group>
|
||||
<field name="private_car_plate" />
|
||||
</group>
|
||||
<group>
|
||||
<group name="family_status" string="Family Status" colspan="2">
|
||||
<group colspan="2">
|
||||
<field name="marital"/>
|
||||
<field name="spouse_complete_name" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])]}" groups="hr.group_hr_user"/>
|
||||
<field name="spouse_birthdate" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])]}" groups="hr.group_hr_user"/>
|
||||
</group>
|
||||
<group name="children" col="4" colspan="2">
|
||||
<field name="children"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Emergency" colspan="2">
|
||||
<field name="emergency_contact"/>
|
||||
<field name="emergency_phone" class="o_force_ltr"/>
|
||||
</group>
|
||||
<group string="Family Status">
|
||||
<field name="marital"/>
|
||||
<field name="spouse_complete_name" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])]}"/>
|
||||
<field name="spouse_birthdate" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])]}"/>
|
||||
<field name="children"/>
|
||||
<separator name="emergency" string="Emergency"/>
|
||||
<field name="emergency_contact"/>
|
||||
<field name="emergency_phone" class="o_force_ltr"/>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Education" colspan="2">
|
||||
<field name="certificate"/>
|
||||
<field name="study_field"/>
|
||||
<field name="study_school"/>
|
||||
</group>
|
||||
<group string="Work Permit" name="has_work_permit" colspan="2">
|
||||
<group colspan="2">
|
||||
<field name="visa_no"/>
|
||||
<field name="permit_no"/>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="visa_expire"/>
|
||||
<field name="work_permit_expiration_date"/>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<field name="has_work_permit" widget="work_permit_upload"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Education">
|
||||
<field name="certificate"/>
|
||||
<field name="study_field"/>
|
||||
<field name="study_school"/>
|
||||
<separator name="has_work_permit" string="Work Permit"/>
|
||||
<field name="visa_no"/>
|
||||
<field name="permit_no"/>
|
||||
<field name="visa_expire"/>
|
||||
<field name="work_permit_expiration_date"/>
|
||||
<field name="has_work_permit" widget="work_permit_upload"/>
|
||||
</group>
|
||||
<group string="Citizenship">
|
||||
<group colspan="2">
|
||||
<field name="country_id" options='{"no_open": True, "no_create": True}'/>
|
||||
<field name="identification_id" groups="hr.group_hr_user"/>
|
||||
<field name="passport_id" groups="hr.group_hr_user"/>
|
||||
</group>
|
||||
<group col="4" colspan="2" name="gender_birthday">
|
||||
<field name="gender"/>
|
||||
<field name="birthday"/>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<field name="place_of_birth" groups="hr.group_hr_user"/>
|
||||
<field name="country_of_birth" groups="hr.group_hr_user"/>
|
||||
</group>
|
||||
<field name="country_id" options='{"no_open": True, "no_create": True}'/>
|
||||
<field name="identification_id"/>
|
||||
<field name="passport_id"/>
|
||||
<field name="gender"/>
|
||||
<field name="birthday"/>
|
||||
<field name="place_of_birth"/>
|
||||
<field name="country_of_birth"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -158,11 +158,17 @@
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<div class="oe_title pe-0" name="title">
|
||||
<div class="oe_title pe-0 w-100 mw-100" name="title">
|
||||
<h1 class="d-flex flex-row justify-content-between">
|
||||
<field name="name" class="text-truncate" placeholder="Contract Reference"/>
|
||||
<field name="kanban_state" groups="!hr_contract.group_hr_contract_manager" widget="state_selection" readonly="1"/>
|
||||
<field name="kanban_state" groups="hr_contract.group_hr_contract_manager" widget="state_selection" readonly="0"/>
|
||||
<field name="kanban_state"
|
||||
class="d-flex align-items-center"
|
||||
groups="!hr_contract.group_hr_contract_manager"
|
||||
widget="state_selection" readonly="1"/>
|
||||
<field name="kanban_state"
|
||||
class="d-flex align-items-center"
|
||||
groups="hr_contract.group_hr_contract_manager"
|
||||
widget="state_selection" readonly="0"/>
|
||||
</h1>
|
||||
<h2>
|
||||
<field name="company_id" groups="base.group_multi_company" invisible="1"/>
|
||||
@@ -215,9 +221,9 @@
|
||||
<group name="salary_info">
|
||||
<group name="salary">
|
||||
<label for="wage"/>
|
||||
<div class="o_row" name="wage">
|
||||
<field name="wage" class="oe_inline" nolabel="1"/>
|
||||
<div>/ month</div>
|
||||
<div class="o_row mw-50" name="wage">
|
||||
<field name="wage" class="oe_inline o_hr_narrow_field" nolabel="1"/>
|
||||
<div class="mb-3">/ month</div>
|
||||
</div>
|
||||
</group>
|
||||
<group name="yearly_advantages"/>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<header>
|
||||
<field name="state" widget="statusbar" options="{'clickable': '1'}" statusbar_visible="draft,validated,conflict"/>
|
||||
</header>
|
||||
<div class="alert alert-warning text-center" role="alert" attrs="{'invisible': [('state', '!=', 'validated')]}">
|
||||
<div class="alert alert-warning text-center" role="alert" attrs="{'invisible': [('state', '!=', 'validated')]}">
|
||||
Note: Validated work entries cannot be modified.
|
||||
</div>
|
||||
<sheet>
|
||||
@@ -60,8 +60,13 @@
|
||||
<field name="date_start" attrs="{'readonly': [('state', '!=', 'draft')]}" />
|
||||
<field name="date_stop" attrs="{'readonly': [('state', '!=', 'draft')]}" />
|
||||
<label for="duration" string="Period"/>
|
||||
<div class="o_row">
|
||||
<field name="duration" nolabel="1" widget="float_time" attrs="{'readonly': [('state', '!=', 'draft')]}" /><span class="ml8">Hours</span>
|
||||
<div class="o_row mw-50 mw-sm-25">
|
||||
<field name="duration"
|
||||
nolabel="1"
|
||||
widget="float_time"
|
||||
class="o_hr_narrow_field"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}" />
|
||||
<span class="ml8">Hours</span>
|
||||
</div>
|
||||
<field name="company_id" invisible="1"/>
|
||||
</group>
|
||||
@@ -168,15 +173,15 @@
|
||||
</h1>
|
||||
</div>
|
||||
<group name="main_group">
|
||||
<group name="identification">
|
||||
<field name="code"/>
|
||||
<group name="identification" class="o_form_fw_labels">
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="sequence" groups="base.group_no_one"/>
|
||||
<field name="code"/>
|
||||
<field name="sequence"/>
|
||||
<field name="color" widget="color_picker"/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="other">
|
||||
<group name="time_off" string="Time Off Options"/>
|
||||
<group name="time_off" string="Time Off Options" class="o_form_fw_labels"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -51,10 +51,12 @@
|
||||
<footer>
|
||||
<button name="regenerate_work_entries"
|
||||
string="Regenerate Work Entries" data-hotkey="q"
|
||||
type="object" class="oe_highlight"
|
||||
class="btn btn-primary oe_highlight"
|
||||
type="object"
|
||||
attrs="{'invisible': ['|', ('search_criteria_completed', '=', False), ('valid', '=', False)]}"/>
|
||||
<button name="regenerate_work_entries_disabled"
|
||||
string="Regenerate Work Entries"
|
||||
class="btn btn-primary"
|
||||
disabled="1"
|
||||
attrs="{'invisible': [('search_criteria_completed', '=', True), ('valid', '=', True)]}"/>
|
||||
</footer>
|
||||
|
||||
@@ -462,6 +462,9 @@
|
||||
@include media-breakpoint-up(sm) {
|
||||
.o_inner_group {
|
||||
grid-template-columns: fit-content(150px) 1fr;
|
||||
&.o_form_fw_labels {
|
||||
grid-template-columns: 150px 1fr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user