diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst
index 13d0293dd..4019504ed 100644
--- a/web_m2x_options/README.rst
+++ b/web_m2x_options/README.rst
@@ -7,7 +7,7 @@ web_m2x_options
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:3a852d89e5cd927339a18898b21556fc15d261782fca8783b728cdc6a8ffa574
+ !! source digest: sha256:0afece0246fa101b62c0522c1df2070cea624097713b5c6991fce8a2903dc1ef
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -32,9 +32,8 @@ This modules modifies "many2one" and "many2manytags" form widgets so as
to add some new display control options.
Options provided includes possibility to remove "Create..." and/or
-"Create and Edit..." entries from many2one drop down. You can also
-change default number of proposition appearing in the drop-down. Or
-prevent the dialog box poping in case of validation error.
+"Create and Edit..." entries drop down. You can also change default
+number of proposition appearing in the drop-down.
If not specified, the module will avoid proposing any of the create
options if the current user has no permission rights to create the
@@ -53,16 +52,13 @@ in the field's options dict
``create`` *boolean* (Default: depends if user have create rights)
- Whether to display the "Create..." entry in dropdown panel.
+ Whether to display the "Create..." entry in dropdown panel. Only for
+ m2o fields.
``create_edit`` *boolean* (Default: depends if user have create rights)
Whether to display "Create and Edit..." entry in dropdown panel
-``m2o_dialog`` *boolean* (Default: depends if user have create rights)
-
- Whether to display the many2one dialog in case of validation error.
-
``limit`` *int* (Default: odoo default value is ``8``)
Number of displayed record in drop-down panel
@@ -81,21 +77,9 @@ in the field's options dict
A dictionary to link field value with a HTML color. This option has
to be used with field_color.
-``no_open_edit`` *boolean* (Default: value of ``no_open`` which is
-``False`` if not set)
-
- Causes a many2one not to offer to click through in edit mode, but
- well in read mode
-
``open`` *boolean* (Default: ``False``)
- Makes many2many_tags and one2many rows buttons that open the linked
- resource
-
-``no_color_picker`` *boolean* (Default: ``False``)
-
- Deactivates the color picker on many2many_tags buttons to do nothing
- (ignored if open is set)
+ Makes many2one buttons that open the linked resource.
ir.config_parameter options
---------------------------
@@ -117,12 +101,6 @@ create rights)
Whether to display "Create and Edit..." entry in dropdown panel for
all fields in the odoo instance.
-``web_m2x_options.m2o_dialog`` *boolean* (Default: depends if user have
-create rights)
-
- Whether to display the many2one dialog in case of validation error
- for all fields in the odoo instance.
-
``web_m2x_options.limit`` *int* (Default: odoo default value is ``8``)
Number of displayed record in drop-down panel for all fields in the
@@ -142,7 +120,6 @@ To add these parameters go to Configuration -> Technical -> Parameters
- web_m2x_options.create: False
- web_m2x_options.create_edit: False
-- web_m2x_options.m2o_dialog: False
- web_m2x_options.limit: 10
- web_m2x_options.search_more: True
- web_m2x_options.field_limit_entries: 5
@@ -155,7 +132,7 @@ Your XML form view definition could contain:
.. code:: xml
...
-
+
...
Known issues / Roadmap
@@ -170,10 +147,6 @@ verify your installation.
- Instead of making the tags rectangle clickable, I think it's better
to put the text as a clickable link, so we will get a consistent
behaviour/aspect with other clickable elements (many2one...).
-- In edit mode, it would be great to add an icon like the one on
- many2one fields to allow to open the many2many in a popup window.
-- Include this feature as a configurable option via parameter to have
- this behaviour by default in all many2many tags.
Bug Tracker
===========
@@ -195,6 +168,7 @@ Authors
* ACSONE SA/NV
* 0k.io
* Tecnativa
+* Sygel
Contributors
------------
@@ -226,6 +200,12 @@ Contributors
- Hoang Diep
+- `Sygel `__:
+
+ - Manuel Regidor
+ - Valentín Vinagre
+ - Harald Panten
+
Other credits
-------------
diff --git a/web_m2x_options/__manifest__.py b/web_m2x_options/__manifest__.py
index 28161df9b..88887baf1 100644
--- a/web_m2x_options/__manifest__.py
+++ b/web_m2x_options/__manifest__.py
@@ -6,16 +6,26 @@
{
"name": "web_m2x_options",
- "version": "16.0.1.1.3",
+ "version": "17.0.1.0.0",
"category": "Web",
"author": "initOS GmbH,"
"ACSONE SA/NV, "
"0k.io, "
"Tecnativa, "
+ "Sygel, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"license": "AGPL-3",
"depends": ["web"],
- "assets": {"web.assets_backend": ["web_m2x_options/static/src/components/*"]},
+ "assets": {
+ "web.assets_backend": [
+ (
+ "before",
+ "web/static/src/views/fields/*",
+ "web_m2x_options/static/src/components/form.esm.js",
+ ),
+ "web_m2x_options/static/src/components/base.xml",
+ ]
+ },
"installable": True,
}
diff --git a/web_m2x_options/i18n/de.po b/web_m2x_options/i18n/de.po
index 2ac3cf217..763e4afd5 100644
--- a/web_m2x_options/i18n/de.po
+++ b/web_m2x_options/i18n/de.po
@@ -154,6 +154,3 @@ msgstr "als neu"
#~ msgstr ""
#~ "Sie legen eine neue %s an, sind Sie sicher, dass diese nicht bereits "
#~ "vorhanden ist?"
-
-#~ msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
-#~ msgstr "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
diff --git a/web_m2x_options/i18n/fr.po b/web_m2x_options/i18n/fr.po
index 52eb29c83..be621c1cd 100644
--- a/web_m2x_options/i18n/fr.po
+++ b/web_m2x_options/i18n/fr.po
@@ -153,6 +153,3 @@ msgstr ""
#~ msgstr ""
#~ "Vous créez un nouveau %s, est-ce que vous êtes sur qu'il n'existe pas "
#~ "déjà ?"
-
-#~ msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
-#~ msgstr "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
diff --git a/web_m2x_options/i18n/hr.po b/web_m2x_options/i18n/hr.po
index d828c7182..f5f3c3a7d 100644
--- a/web_m2x_options/i18n/hr.po
+++ b/web_m2x_options/i18n/hr.po
@@ -144,7 +144,3 @@ msgstr ""
#, python-format
#~ msgid "You are creating a new %s, are you sure it does not exist yet?"
#~ msgstr "Želite kreirati novi %s, jeste li sigurni da već ne postoji?"
-
-#, fuzzy
-#~ msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
-#~ msgstr "!(opcije isključuju otvaranje ili uređivanje)"
diff --git a/web_m2x_options/i18n/nl.po b/web_m2x_options/i18n/nl.po
index d14e5e621..a526a9254 100644
--- a/web_m2x_options/i18n/nl.po
+++ b/web_m2x_options/i18n/nl.po
@@ -149,9 +149,6 @@ msgstr ""
#~ msgid "You are creating a new %s, are you sure it does not exist yet?"
#~ msgstr "U maakt een nieuw %s, weet u het zeker dat dit nog niet bestaat?"
-#~ msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
-#~ msgstr "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
-
#~ msgid "Display Name"
#~ msgstr "Weergavenaam"
diff --git a/web_m2x_options/i18n/pt_BR.po b/web_m2x_options/i18n/pt_BR.po
index f91171bdd..7859dcab8 100644
--- a/web_m2x_options/i18n/pt_BR.po
+++ b/web_m2x_options/i18n/pt_BR.po
@@ -151,6 +151,3 @@ msgstr "como um novo"
#~ msgid "You are creating a new %s, are you sure it does not exist yet?"
#~ msgstr ""
#~ "Você está criando um novo %s, você tem certeza de que ainda não existe?"
-
-#~ msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
-#~ msgstr "!(widget.options.no_open || widget.nodeOptions.no_open_edit)"
diff --git a/web_m2x_options/i18n/zh_CN.po b/web_m2x_options/i18n/zh_CN.po
index df164a1e0..8097ff93d 100644
--- a/web_m2x_options/i18n/zh_CN.po
+++ b/web_m2x_options/i18n/zh_CN.po
@@ -148,6 +148,3 @@ msgstr ""
#, python-format
#~ msgid "You are creating a new %s, are you sure it does not exist yet?"
#~ msgstr "你正在创建一个新的%s,你确定它还不存在吗?"
-
-#~ msgid "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
-#~ msgstr "!(widget.nodeOptions.no_open || widget.nodeOptions.no_open_edit)"
diff --git a/web_m2x_options/models/ir_config_parameter.py b/web_m2x_options/models/ir_config_parameter.py
index c24506dd8..9841b57b1 100644
--- a/web_m2x_options/models/ir_config_parameter.py
+++ b/web_m2x_options/models/ir_config_parameter.py
@@ -11,8 +11,8 @@ class IrConfigParameter(models.Model):
"web_m2x_options.create_edit",
"web_m2x_options.limit",
"web_m2x_options.search_more",
- "web_m2x_options.m2o_dialog",
"web_m2x_options.field_limit_entries",
+ "web_m2x_options.open",
]
values = self.sudo().search_read([["key", "in", opts]], ["key", "value"])
return {res["key"]: res["value"] for res in values}
diff --git a/web_m2x_options/readme/CONTRIBUTORS.md b/web_m2x_options/readme/CONTRIBUTORS.md
index 2ffc113d6..df85534e3 100644
--- a/web_m2x_options/readme/CONTRIBUTORS.md
+++ b/web_m2x_options/readme/CONTRIBUTORS.md
@@ -22,3 +22,8 @@
- [Trobz](https://trobz.com):
- Hoang Diep \<\>
+
+- [Sygel](https://sygel.es):
+ - Manuel Regidor \<\>
+ - Valentín Vinagre \<\>
+ - Harald Panten \<\>
diff --git a/web_m2x_options/readme/DESCRIPTION.md b/web_m2x_options/readme/DESCRIPTION.md
index 5e4ccd0cf..ad2c87666 100644
--- a/web_m2x_options/readme/DESCRIPTION.md
+++ b/web_m2x_options/readme/DESCRIPTION.md
@@ -2,9 +2,8 @@ This modules modifies "many2one" and "many2manytags" form widgets so as
to add some new display control options.
Options provided includes possibility to remove "Create..." and/or
-"Create and Edit..." entries from many2one drop down. You can also
-change default number of proposition appearing in the drop-down. Or
-prevent the dialog box poping in case of validation error.
+"Create and Edit..." entries drop down. You can also change default
+number of proposition appearing in the drop-down.
If not specified, the module will avoid proposing any of the create
options if the current user has no permission rights to create the
diff --git a/web_m2x_options/readme/ROADMAP.md b/web_m2x_options/readme/ROADMAP.md
index f445a6c3b..48e3fe771 100644
--- a/web_m2x_options/readme/ROADMAP.md
+++ b/web_m2x_options/readme/ROADMAP.md
@@ -7,7 +7,3 @@ your installation.
- Instead of making the tags rectangle clickable, I think it's better to
put the text as a clickable link, so we will get a consistent
behaviour/aspect with other clickable elements (many2one...).
-- In edit mode, it would be great to add an icon like the one on
- many2one fields to allow to open the many2many in a popup window.
-- Include this feature as a configurable option via parameter to have
- this behaviour by default in all many2many tags.
diff --git a/web_m2x_options/readme/USAGE.md b/web_m2x_options/readme/USAGE.md
index 73507a0f9..22cda9e22 100644
--- a/web_m2x_options/readme/USAGE.md
+++ b/web_m2x_options/readme/USAGE.md
@@ -2,16 +2,12 @@
`create` *boolean* (Default: depends if user have create rights)
-> Whether to display the "Create..." entry in dropdown panel.
+> Whether to display the "Create..." entry in dropdown panel. Only for m2o fields.
`create_edit` *boolean* (Default: depends if user have create rights)
> Whether to display "Create and Edit..." entry in dropdown panel
-`m2o_dialog` *boolean* (Default: depends if user have create rights)
-
-> Whether to display the many2one dialog in case of validation error.
-
`limit` *int* (Default: odoo default value is `8`)
> Number of displayed record in drop-down panel
@@ -30,21 +26,9 @@
> A dictionary to link field value with a HTML color. This option has to
> be used with field_color.
-`no_open_edit` *boolean* (Default: value of `no_open` which is `False`
-if not set)
-
-> Causes a many2one not to offer to click through in edit mode, but well
-> in read mode
-
`open` *boolean* (Default: `False`)
-> Makes many2many_tags and one2many rows buttons that open the linked
-> resource
-
-`no_color_picker` *boolean* (Default: `False`)
-
-> Deactivates the color picker on many2many_tags buttons to do nothing
-> (ignored if open is set)
+> Makes many2one buttons that open the linked resource.
## ir.config_parameter options
@@ -65,12 +49,6 @@ create rights)
> Whether to display "Create and Edit..." entry in dropdown panel for
> all fields in the odoo instance.
-`web_m2x_options.m2o_dialog` *boolean* (Default: depends if user have
-create rights)
-
-> Whether to display the many2one dialog in case of validation error for
-> all fields in the odoo instance.
-
`web_m2x_options.limit` *int* (Default: odoo default value is `8`)
> Number of displayed record in drop-down panel for all fields in the
@@ -90,7 +68,6 @@ To add these parameters go to Configuration -\> Technical -\> Parameters
- web_m2x_options.create: False
- web_m2x_options.create_edit: False
-- web_m2x_options.m2o_dialog: False
- web_m2x_options.limit: 10
- web_m2x_options.search_more: True
- web_m2x_options.field_limit_entries: 5
@@ -101,6 +78,6 @@ Your XML form view definition could contain:
``` xml
...
-
+
...
```
diff --git a/web_m2x_options/static/description/index.html b/web_m2x_options/static/description/index.html
index bf406ab18..f2dab10fc 100644
--- a/web_m2x_options/static/description/index.html
+++ b/web_m2x_options/static/description/index.html
@@ -1,20 +1,19 @@
-
-
-Add new options for many2one field
+
+web_m2x_options
-
-
Add new options for many2one field
+
+
web_m2x_options
-
-
Description
-
This modules modifies "many2one" and "many2manytags" form widgets so as to add some new display
-control options.
-
New: support many2manytags widget !
-
New: support global option management with ir.config_parameter !
-
Options provided includes possibility to remove "Create..." and/or "Create and
-Edit..." entries from many2one drop down. You can also change default number of
-proposition appearing in the drop-down. Or prevent the dialog box poping in
-case of validation error.
-
If not specified, the module will avoid proposing any of the create options
-if the current user have no permission rights to create the related object.
+
+
+
This modules modifies “many2one” and “many2manytags” form widgets so as
+to add some new display control options.
+
Options provided includes possibility to remove “Create…” and/or
+“Create and Edit…” entries drop down. You can also change default
+number of proposition appearing in the drop-down.
+
If not specified, the module will avoid proposing any of the create
+options if the current user has no permission rights to create the
+related object.
createboolean (Default: depends if user have create rights)
-Whether to display the "Create..." entry in dropdown panel.
+Whether to display the “Create…” entry in dropdown panel. Only for
+m2o fields.
create_editboolean (Default: depends if user have create rights)
-Whether to display "Create and Edit..." entry in dropdown panel
-
m2o_dialogboolean (Default: depends if user have create rights)
-
-Whether to display the many2one dialog in case of validation error.
-
limitint (Default: openerp default value is 7)
+Whether to display “Create and Edit…” entry in dropdown panel
+
limitint (Default: odoo default value is 8)
Number of displayed record in drop-down panel
+
search_moreboolean
+
+Used to force disable/enable search more button.
+
field_colorstring
+
+A string to define the field used to define color. This option has to
+be used with colors.
+
colorsdictionary
+
+A dictionary to link field value with a HTML color. This option has
+to be used with field_color.
+
openboolean (Default: False)
+
+Makes many2one buttons that open the linked resource.
-
ir.config_parameter options
-
Now you can disable "Create..." and "Create and Edit..." entry for all widgets in the odoo instance.
-If you disable one option, you can enable it for particular field by setting "create: True" option directly on the field definition.
-
web_m2x_options.createboolean (Default: depends if user have create rights)
Now you can disable “Create…” and “Create and Edit…” entry for all
+widgets in the odoo instance. If you disable one option, you can enable
+it for particular field by setting “create: True” option directly on the
+field definition.
+
web_m2x_options.createboolean (Default: depends if user have
+create rights)
-Whether to display the "Create..." entry in dropdown panel for all fields in the odoo instance.
-
web_m2x_options.create_editboolean (Default: depends if user have create rights)
+Whether to display the “Create…” entry in dropdown panel for all
+fields in the odoo instance.
+
web_m2x_options.create_editboolean (Default: depends if user have
+create rights)
-Whether to display "Create and Edit..." entry in dropdown panel for all fields in the odoo instance.
-
web_m2x_options.limitint (Default: openerp default value is 7)
+Whether to display “Create and Edit…” entry in dropdown panel for
+all fields in the odoo instance.
+
web_m2x_options.limitint (Default: odoo default value is 8)
-Number of displayed record in drop-down panel for all fields in the odoo instance
-
To add these parameters go to Configuration -> Technical -> Parameters -> System Parameters and add new parameters like:
+Number of displayed record in drop-down panel for all fields in the
+odoo instance
+
web_m2x_options.search_moreboolean (Default: default value is
+False)
+
+Whether the field should always show “Search more…” entry or not.
+
web_m2x_options.field_limit_entriesint
+
+Number of displayed lines on all One2many fields
+
To add these parameters go to Configuration -> Technical -> Parameters
+-> System Parameters and add new parameters like:
Double check that you have no inherited view that remote options you set on a field !
-If nothing work, add a debugger in the first ligne of get_search_result method and enable debug mode in OpenERP. When you write something in a many2one field, javascript debugger should pause. If not verify your installation.
Double check that you have no inherited view that remove options you
+set on a field ! If nothing works, add a debugger in the first line of
+_search method and enable debug mode in Odoo. When you write
+something in a many2one field, javascript debugger should pause. If not
+verify your installation.
+
+
Instead of making the tags rectangle clickable, I think it’s better
+to put the text as a clickable link, so we will get a consistent
+behaviour/aspect with other clickable elements (many2one…).
Bugs are tracked on GitHub Issues.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us to smash it by providing a detailed and welcomed
+feedback.
+
Do not contact contributors directly about support or help with technical issues.
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.
+
This module is part of the OCA/web project on GitHub.