diff --git a/addons/hr_recruitment/static/src/scss/hr_job.scss b/addons/hr_recruitment/static/src/scss/hr_job.scss
index ea195c06157..4bd6278d6bf 100644
--- a/addons/hr_recruitment/static/src/scss/hr_job.scss
+++ b/addons/hr_recruitment/static/src/scss/hr_job.scss
@@ -64,12 +64,6 @@
.o_kanban_renderer {
&.o_kanban_applicant {
- .o_sample_data_disabled {
- .ribbon {
- display: none;
- }
- }
-
.ribbon {
&::before, &::after {
display: none;
@@ -93,11 +87,17 @@
}
}
-.o_kanban_view .oe_kanban_card {
- .o_kanban_state_with_padding {
- padding-left:7%;
- padding-bottom:5%;
- width: 12px;
+.o_kanban_view {
+ .oe_kanban_card {
+ .o_kanban_state_with_padding {
+ padding-left:7%;
+ padding-bottom:5%;
+ width: 12px;
+ }
+ }
+
+ .o_view_sample_data .ribbon {
+ display: none;
}
}
diff --git a/addons/web/static/src/legacy/scss/utils.scss b/addons/web/static/src/legacy/scss/utils.scss
index d980421e297..1a7d2c0bb72 100644
--- a/addons/web/static/src/legacy/scss/utils.scss
+++ b/addons/web/static/src/legacy/scss/utils.scss
@@ -416,6 +416,13 @@
background: transparent url(/web/static/img/empty_folder.svg) no-repeat center;
}
+// Sample data
+@mixin o-sample-data-disabled {
+ opacity: 0.33;
+ pointer-events: none;
+ user-select: none;
+}
+
// ----------------------------------------------------------------------------
// CSS Variables
// ----------------------------------------------------------------------------
diff --git a/addons/web/static/src/views/graph/graph_controller.xml b/addons/web/static/src/views/graph/graph_controller.xml
index 75049f4574b..ebd4e6ca7b8 100644
--- a/addons/web/static/src/views/graph/graph_controller.xml
+++ b/addons/web/static/src/views/graph/graph_controller.xml
@@ -65,11 +65,7 @@
-
+
Invalid data
diff --git a/addons/web/static/src/views/graph/graph_view.scss b/addons/web/static/src/views/graph/graph_view.scss
index 7fb03e8eef6..32711fb1675 100644
--- a/addons/web/static/src/views/graph/graph_view.scss
+++ b/addons/web/static/src/views/graph/graph_view.scss
@@ -1,3 +1,11 @@
-.o_graph_view canvas {
+// ------- Graph renderer -------
+.o_graph_renderer canvas {
background-color: $o-view-background-color;
}
+
+// ------- Sample mode -------
+.o_graph_view .o_view_sample_data {
+ .o_graph_renderer {
+ @include o-sample-data-disabled;
+ }
+}
diff --git a/addons/web/static/src/views/kanban/kanban_controller.scss b/addons/web/static/src/views/kanban/kanban_controller.scss
index 86528a541fa..a6c29dc6fe6 100644
--- a/addons/web/static/src/views/kanban/kanban_controller.scss
+++ b/addons/web/static/src/views/kanban/kanban_controller.scss
@@ -1,4 +1,4 @@
-// ------- Kanban View Layout -------
+// ------- Kanban renderer -------
.o_kanban_renderer {
// ----------------------------------------------------------------------------
// Default KanbanView values
@@ -603,7 +603,21 @@
}
}
-// ----------------- Set Cover Dialog -----------------
+// ------- Sample mode -------
+.o_kanban_view .o_view_sample_data {
+ // all records
+ .o_kanban_record,
+ // progress bars and counters
+ .o_kanban_counter,
+ // column actions
+ .o_kanban_toggle_fold,
+ .o_column_archive_records,
+ .o_column_unarchive_records {
+ @include o-sample-data-disabled;
+ }
+}
+
+// ------- Set cover dialog -------
.modal .o_kanban_cover_container .o_kanban_cover_image {
height: 120px;
width: 120px;
diff --git a/addons/web/static/src/views/kanban/kanban_record.js b/addons/web/static/src/views/kanban/kanban_record.js
index 8b8aa6f3d55..35e099adfc2 100644
--- a/addons/web/static/src/views/kanban/kanban_record.js
+++ b/addons/web/static/src/views/kanban/kanban_record.js
@@ -236,9 +236,6 @@ export class KanbanRecord extends Component {
const value = record.data[archInfo.cardColorField];
classes.push(getColorClass(value));
}
- if (record.model.useSampleModel) {
- classes.push("o_sample_data_disabled");
- }
if (!this.props.list.isGrouped) {
classes.push("flex-grow-1 flex-md-shrink-1 flex-shrink-0");
}
diff --git a/addons/web/static/src/views/kanban/kanban_renderer.xml b/addons/web/static/src/views/kanban/kanban_renderer.xml
index c8774db6b66..80bab5f5404 100644
--- a/addons/web/static/src/views/kanban/kanban_renderer.xml
+++ b/addons/web/static/src/views/kanban/kanban_renderer.xml
@@ -24,7 +24,7 @@
Fold
diff --git a/addons/web/static/src/views/list/list_renderer.js b/addons/web/static/src/views/list/list_renderer.js
index 113c995dfff..97161e192c7 100644
--- a/addons/web/static/src/views/list/list_renderer.js
+++ b/addons/web/static/src/views/list/list_renderer.js
@@ -621,9 +621,6 @@ export class ListRenderer extends Component {
if (record.selected) {
classNames.push("o_data_row_selected");
}
- if (this.props.list.model.useSampleModel) {
- classNames.push("o_sample_data_disabled");
- }
if (this.canResequenceRows) {
classNames.push("o_row_draggable");
}
diff --git a/addons/web/static/src/views/list/list_renderer.scss b/addons/web/static/src/views/list/list_renderer.scss
index d86ec693778..f86b78e1c2b 100644
--- a/addons/web/static/src/views/list/list_renderer.scss
+++ b/addons/web/static/src/views/list/list_renderer.scss
@@ -1,3 +1,4 @@
+// ------- List renderer -------
.o_list_renderer {
--ListRenderer-table-padding-h: #{$table-cell-padding-x-sm};
@@ -89,7 +90,8 @@
&.o_list_computing_widths {
> tbody > tr > td {
&.o_list_text, // text field, className on the td
- > .o_field_text { // text field with widget, className inside the td
+ > .o_field_text {
+ // text field with widget, className inside the td
white-space: pre !important;
}
}
@@ -162,7 +164,8 @@
// Grouped list views
tbody > tr.o_group_header {
- > th, > td {
+ > th,
+ > td {
vertical-align: middle;
padding-top: 5px;
padding-bottom: 5px;
@@ -191,7 +194,8 @@
margin-top: -2px;
margin-bottom: -2px;
- .o_pager_previous, .o_pager_next {
+ .o_pager_previous,
+ .o_pager_next {
max-height: 30px;
padding: 0 5px;
background-color: lighten($o-brand-lightsecondary, 10%);
@@ -202,16 +206,15 @@
}
}
tbody + tbody {
- border-top: none; // Override bootstrap for grouped list views
+ border-top: none; // Override bootstrap for grouped list views
}
-
.o_data_cell.o_text_overflow,
.o_data_cell.o_invisible_modifier {
// Override display: none to keep table cells aligned. Note: cannot use
// 'initial' as it will force them to 'inline', not 'table-cell'.
- display: table-cell!important;
+ display: table-cell !important;
}
&.o_resizing tr > :not(.o_column_resizing) {
@@ -239,7 +242,6 @@
}
.o_data_row:not(.o_selected_row) .o_data_cell {
-
// Boolean fields in non-selected rows completely disabled.
.form-check {
pointer-events: none;
@@ -310,16 +312,19 @@
&.o_field_badge {
width: auto; // override width: 100% to keep the optimal badge width
}
- .o_input_dropdown, .o_datepicker {
+ .o_input_dropdown,
+ .o_datepicker {
> .o_input {
padding-right: 15px; // to prevent caret overlapping
}
- > .o_dropdown_button, .o_datepicker_button {
+ > .o_dropdown_button,
+ .o_datepicker_button {
margin-right: 5px;
@include o-position-absolute(0, 0);
}
}
- > input.o_field_translate, textarea.o_field_translate {
+ > input.o_field_translate,
+ textarea.o_field_translate {
padding-right: 25px;
+ span.o_field_translate {
margin-left: -35px;
@@ -336,8 +341,12 @@
}
}
- .o_field_x2many_list_row_add, .o_group_field_row_add {
- a:focus, a:active, button:focus, button:active {
+ .o_field_x2many_list_row_add,
+ .o_group_field_row_add {
+ a:focus,
+ a:active,
+ button:focus,
+ button:active {
color: $link-hover-color;
outline: none;
}
@@ -414,3 +423,16 @@
}
}
}
+
+// ------- Sample mode -------
+.o_list_view .o_view_sample_data {
+ .o_list_table {
+ cursor: default !important;
+ }
+
+ .o_data_row,
+ .o_list_footer,
+ thead .o_list_record_selector {
+ @include o-sample-data-disabled;
+ }
+}
diff --git a/addons/web/static/src/views/list/list_renderer.xml b/addons/web/static/src/views/list/list_renderer.xml
index 4ce7c457f04..693aeae2bc3 100644
--- a/addons/web/static/src/views/list/list_renderer.xml
+++ b/addons/web/static/src/views/list/list_renderer.xml
@@ -15,7 +15,7 @@
- |
+ |
|
@@ -72,7 +72,7 @@
-
+