From ed486f2c6224e55ee9a5e22e5679ba1170ddf9f3 Mon Sep 17 00:00:00 2001 From: Dossogne Bertrand Date: Fri, 7 Oct 2022 14:36:18 +0000 Subject: [PATCH] [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 --- addons/hr/__manifest__.py | 2 +- addons/hr/static/src/scss/hr.scss | 31 ++++ .../static/src/scss/res_config_settings.scss | 3 + addons/hr/views/hr_employee_views.xml | 136 +++++++----------- .../hr_contract/views/hr_contract_views.xml | 18 ++- .../views/hr_work_entry_views.xml | 19 ++- ...r_work_entry_regeneration_wizard_views.xml | 4 +- .../src/views/form/form_controller.scss | 3 + 8 files changed, 120 insertions(+), 96 deletions(-) create mode 100644 addons/hr/static/src/scss/res_config_settings.scss diff --git a/addons/hr/__manifest__.py b/addons/hr/__manifest__.py index 599c49b168a..2f99f5a8b0d 100644 --- a/addons/hr/__manifest__.py +++ b/addons/hr/__manifest__.py @@ -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', diff --git a/addons/hr/static/src/scss/hr.scss b/addons/hr/static/src/scss/hr.scss index 1bccdccfc8b..1670c1913b4 100644 --- a/addons/hr/static/src/scss/hr.scss +++ b/addons/hr/static/src/scss/hr.scss @@ -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%; + } +} diff --git a/addons/hr/static/src/scss/res_config_settings.scss b/addons/hr/static/src/scss/res_config_settings.scss new file mode 100644 index 00000000000..f6ca8c1271a --- /dev/null +++ b/addons/hr/static/src/scss/res_config_settings.scss @@ -0,0 +1,3 @@ +input#hr_presence_control_email_amount { + max-width: 5rem; +} diff --git a/addons/hr/views/hr_employee_views.xml b/addons/hr/views/hr_employee_views.xml index ee2435bd97b..17690ce1831 100644 --- a/addons/hr/views/hr_employee_views.xml +++ b/addons/hr/views/hr_employee_views.xml @@ -62,23 +62,25 @@ - +
+ +
+ + + + + + + + +
+
-

- -
-
- - - - - - - - -
- -
+

+ +

@@ -129,79 +131,51 @@ - - - - - - - + + + + - - - - + - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + diff --git a/addons/hr_contract/views/hr_contract_views.xml b/addons/hr_contract/views/hr_contract_views.xml index a1482aab2a0..f630c48da0c 100644 --- a/addons/hr_contract/views/hr_contract_views.xml +++ b/addons/hr_contract/views/hr_contract_views.xml @@ -158,11 +158,17 @@
-
+

- - + +

@@ -215,9 +221,9 @@

- - + - + + - + diff --git a/addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard_views.xml b/addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard_views.xml index 9dc510d1c80..b235a994b61 100644 --- a/addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard_views.xml +++ b/addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard_views.xml @@ -51,10 +51,12 @@ diff --git a/addons/web/static/src/views/form/form_controller.scss b/addons/web/static/src/views/form/form_controller.scss index 731537873c7..570d600c279 100644 --- a/addons/web/static/src/views/form/form_controller.scss +++ b/addons/web/static/src/views/form/form_controller.scss @@ -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; + } } }