summaryrefslogtreecommitdiff
path: root/addons/web/static/src/less
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-01-02 16:25:28 +0100
committerAaron Bohy <aab@odoo.com>2018-01-26 19:26:03 +0100
commitd18d08f01a589053e40c7af1fd4dd59c13aaa625 (patch)
tree63a243bccee505c4263fe441357946401cf7985e /addons/web/static/src/less
parentaf2686fee55b20d74ce1799aea84bf1910b20051 (diff)
[IMP] web: Kanban: quick create record with more fields
This rev. improves the QuickCreate widget for grouped Kanban views. It allows specifying in the Kanban arch a form view xmlid, e.g.: <kanban quick_create_view="some_form_view_xmlid"> ... </kanban> When this attribute is set, the referenced form view is loaded and rendered inside the QuickCreate widget. A real FormView widget is instantiated, meaning that all form view mechanisms are available in the QuickCreate (modifiers, default_get, onchanges, widgets...). Task #27475.
Diffstat (limited to 'addons/web/static/src/less')
-rw-r--r--addons/web/static/src/less/form_view.less51
-rw-r--r--addons/web/static/src/less/form_view_extra.less7
-rw-r--r--addons/web/static/src/less/kanban_view.less11
3 files changed, 63 insertions, 6 deletions
diff --git a/addons/web/static/src/less/form_view.less b/addons/web/static/src/less/form_view.less
index 8a053a8cca3..505f62ac42f 100644
--- a/addons/web/static/src/less/form_view.less
+++ b/addons/web/static/src/less/form_view.less
@@ -649,6 +649,57 @@ label.o_light_label, .o_light_label label {
font-weight: normal;
}
+// XXS form view specific rules
+.form-break-table() {
+ display: block;
+ margin-bottom: @odoo-form-spacing-unit * 4;
+
+ > tbody {
+ display: block;
+
+ > tr {
+ .o-flex-display();
+ .o-flex-flow(row, wrap);
+
+ > td {
+ .o-flex(1, 0, auto);
+ display: block;
+ max-width: 100%;
+ padding: 0;
+
+ width: auto!important; // !important is required to override the width computed in JS
+ &.o_td_label {
+ width: 94%!important; // The label must be on its own line except if the form field is small enough (checkbox)
+ line-height: @odoo-label-font-size-factor;
+ }
+
+ .o_field_widget {
+ margin-bottom: @odoo-form-spacing-unit * 2;
+ &.o_field_boolean {
+ margin-right: 0;
+ }
+ }
+
+ .o_input_dropdown {
+ width: auto;
+ max-width: 100%;
+ }
+ }
+ }
+ }
+}
+.o_form_view.o_xxs_form_view {
+ .oe_title {
+ word-break: break-all;
+ }
+ .o_group {
+ &.o_inner_group {
+ .form-break-table();
+ }
+ }
+}
+
+// Settings form views
.o_settings_container {
.o-flex-display();
.o-flex(0, 1, auto);
diff --git a/addons/web/static/src/less/form_view_extra.less b/addons/web/static/src/less/form_view_extra.less
index 2349ee5c0b0..95da6a2b35b 100644
--- a/addons/web/static/src/less/form_view_extra.less
+++ b/addons/web/static/src/less/form_view_extra.less
@@ -181,3 +181,10 @@
}
}
}
+
+// XXS form view specific rules
+.o_form_view.o_xxs_form_view {
+ .o_group .o_td_label {
+ border: none;
+ }
+}
diff --git a/addons/web/static/src/less/kanban_view.less b/addons/web/static/src/less/kanban_view.less
index 9158aa22df6..2b5482e36ff 100644
--- a/addons/web/static/src/less/kanban_view.less
+++ b/addons/web/static/src/less/kanban_view.less
@@ -161,12 +161,11 @@
box-shadow: 0 0 20px -10px;
margin: 0 @o-kanban-record-margin -1px @o-kanban-record-margin;
- input {
- width: 100%;
- margin: 2px 0 8px;
- padding: 3px 6px;
- color: @headings-color;
- font-weight: 500;
+ .o_form_view {
+ padding: 0;
+ .o_group.o_inner_group {
+ margin: 0;
+ }
}
}