diff --git a/web_tree_many2one_clickable/README.rst b/web_tree_many2one_clickable/README.rst index e4288835eb7a..8953bc410996 100644 --- a/web_tree_many2one_clickable/README.rst +++ b/web_tree_many2one_clickable/README.rst @@ -79,6 +79,8 @@ Contributors * Artem Kostyuk * Anand Kansagra * Alexandre Díaz +* Ooops404 + * Sylwester Krasinski Maintainers ~~~~~~~~~~~ diff --git a/web_tree_many2one_clickable/readme/CONTRIBUTORS.rst b/web_tree_many2one_clickable/readme/CONTRIBUTORS.rst index 474d91079b7b..54214094f5f1 100644 --- a/web_tree_many2one_clickable/readme/CONTRIBUTORS.rst +++ b/web_tree_many2one_clickable/readme/CONTRIBUTORS.rst @@ -5,3 +5,5 @@ * Artem Kostyuk * Anand Kansagra * Alexandre Díaz +* Ooops404 + * Sylwester Krasinski diff --git a/web_tree_many2one_clickable/static/description/index.html b/web_tree_many2one_clickable/static/description/index.html index 60bd461f815f..f997dbcd8e16 100644 --- a/web_tree_many2one_clickable/static/description/index.html +++ b/web_tree_many2one_clickable/static/description/index.html @@ -9,10 +9,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +276,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +302,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -424,12 +425,16 @@

Contributors

  • Artem Kostyuk <a.kostyuk@mobilunity.com>
  • Anand Kansagra <kansagraanand@hotmail.com>
  • Alexandre Díaz <alexandre.diaz@tecnativa.com>
  • +
  • Ooops404 <https://ooops404.com> +* Sylwester Krasinski <skrasinski62@gmail.com>
  • Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    diff --git a/web_tree_many2one_clickable/static/src/css/web_tree_many2one_clickable.scss b/web_tree_many2one_clickable/static/src/css/web_tree_many2one_clickable.scss index 67d2e41a1e29..0190973446d1 100644 --- a/web_tree_many2one_clickable/static/src/css/web_tree_many2one_clickable.scss +++ b/web_tree_many2one_clickable/static/src/css/web_tree_many2one_clickable.scss @@ -1,10 +1,37 @@ td.o_many2one_cell { - a { - margin-left: 0.5em; - visibility: hidden; - } + display: flex; + align-items: center; + position: relative; &:hover a { visibility: visible; } } + +/*SECONDARY CONTAINER FOR THE BUTTON AND TEXT*/ +.o_many2one_container { + display: flex; + gap: 0.5em; /* Space between the containers */ +} + +/*TEXT CONTAINER AND TEXT CSS*/ +.o_text_container { + max-width: fit-content; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +div.o_custom_field_text { + position: relative; + max-width: fit-content; + vertical-align: bottom; +} +/*BUTTON CONTAINER AND BUTTON CSS*/ +.o_button_container { + left: 0; +} +td.o_many2one_cell a { + margin-left: 0.5; + visibility: hidden; + position: relative; +} diff --git a/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js b/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js index 47cb0cfe6232..8de740e56439 100644 --- a/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js +++ b/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js @@ -36,11 +36,26 @@ odoo.define("web_tree_many2one_clickable.many2one_clickable", function (require) if (!this.noOpen && this.value) { // Replace '' element this.$el.removeClass("o_form_uri"); - this.$el = $("", { + var $span = $("", { html: this.$el.html(), class: this.$el.attr("class") + " o_field_text", name: this.$el.attr("name"), }); + this.$el = $("