Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] web_m2x_options: Migration to 18.0 #2962

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
db356ef
- Rename web_m2o_enhanced to web_m2x_options
Nov 18, 2013
6799d27
move all addons to __unported__, set all addons as not installable
hbrunn Jul 7, 2014
20cd73b
fix: obscur wrong path on last commit. recreate portage from scratch.
Jan 5, 2015
cc611d8
support 'open' on many2many_tags
hbrunn Jul 10, 2015
15158dc
web_m2x_options check Many2one and Many2many options
antespi Nov 16, 2015
6497a7d
Limit name_search to 160 like Odoo core does
antespi Feb 10, 2016
883abe7
Migration of module web_m2x_options. Adapt JS file to the new JS API …
zakiuu Sep 11, 2016
28011ac
Makes the module compatible with Odoo community
lmignon Oct 24, 2016
7afa4fc
web_m2x_options: s/ev.handleObj.selector/currentTarget * many2many wi…
zakiuu Feb 2, 2017
141d571
Fix Qweb templates. (#561)
yajo Mar 8, 2017
d9460ca
[MIG] web_m2x_options: migrated to 10.0
chienandalu May 16, 2017
cdb7e4b
[IMP] web_m2x_options: Perf issue https://github.com/OCA/web/issues/615
jesusVMayor May 30, 2017
2704ba7
web_m2x_options: Hide the create/create and edit... button when the u…
jesusVMayor May 30, 2017
61c70da
[10.0][ADD] option to deactivate color picker on many2many_tags (#713)
grindtildeath Sep 5, 2017
0bdcafa
[FIX] web_m2x_options: Compatibilize with web_advanced_search_x2x
yajo Oct 20, 2017
eb251bb
[MIG] web_m2x_options: Migration to 11.0
ernestotejeda May 28, 2018
18fc5a7
Translated using Weblate (Portuguese (Brazil))
Aug 3, 2018
d10de1c
[FIX] open option on many2many_tags
PCatinean Nov 29, 2018
b683a24
[FIX] web_m2x_options: Fix error in tree views with many2many_tags
yajo Jan 16, 2019
c9add10
[MIG] web_m2x_options: Migration to 12.0
gustitammam Oct 19, 2018
ec25b03
Translated using Weblate (French)
May 27, 2019
9a792e7
Translated using Weblate (French)
Aug 6, 2019
49838af
Translated using Weblate (Portuguese (Brazil))
Aug 26, 2019
5d49d8f
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
1f67463
Translated using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
1b35d6b
[MIG] web_m2x_options: Migration to 13.0
Oct 2, 2019
ec8e0c1
[REF] web_m2x_options: better imp and fixes
andres-pcg Feb 22, 2020
9ae0f2a
[REF] web_m2x_options: eslint complains
andres-pcg Feb 23, 2020
cf979c5
[REF] web_m2x_options: eslint fix
andres-pcg Feb 23, 2020
eae372e
[IMP] web_m2x_options: balck and eslint fix
andres-pcg Feb 23, 2020
e4d8e15
[IMP] web_m2x_options: black, isort
andres-pcg Feb 29, 2020
4405e91
[13.0][FIX] issue of field dropdown
Apr 1, 2020
95e292d
[FIX] pre-commit
Apr 1, 2020
0f33990
[FIX] web_m2x_options: quick search filter only if search value
ThomasBinsfeld Apr 15, 2020
40a7c2b
Translated using Weblate (Chinese (Simplified))
liweijie0812 Jul 8, 2020
a5c2353
Translated using Weblate (German)
didierdonze Jul 22, 2020
5711ffb
Translated using Weblate (French)
didierdonze Jul 22, 2020
f088db1
Fix mobile enterprise version
cormaza Sep 7, 2020
3f990de
[IMP] web_m2x_options: black, isort, prettier
dsolanki-initos Oct 26, 2020
32f7c24
[MIG] Migrate the module web_m2x_options to v14.
dsolanki-initos Oct 26, 2020
707cc5d
Added translation using Weblate (Dutch)
bosd May 17, 2021
8508880
Translated using Weblate (German)
Corneliuus Oct 13, 2021
c90a70a
[MIG] web_m2x_options: Migration to 15.0
Nov 5, 2021
e88777c
[15.0][MIG] web_widget_bokeh_chart
ChrisOForgeFlow Dec 10, 2021
34d9240
[FIX] web_m2x_options: fix search_more behaviour
SilvioC2C Aug 11, 2021
fc73343
[FIX] when all is undefined, fall back to core's default
hbrunn Apr 7, 2020
e37d9f9
[ADD] Option open for One2Many fields
qgroulard Jan 24, 2020
8f34e4d
[IMP] web_m2x_options: Efficiency
CarlosRoca13 Nov 9, 2020
441462d
[IMP] web_m2x_options: Added limit for o2m field entries
CarlosRoca13 Nov 9, 2020
7c92040
[FIX] web_m2x_options: fix test_ir_config_parameter
Dec 21, 2021
ad634ec
[15.0][FIX] Remove tests from init
CRogos Nov 9, 2022
3ab3afa
[16.0][MIG] web_m2x_options: Migration to 16.0
anothingguy Mar 28, 2023
474b98d
Update translation files
weblate Apr 5, 2023
b6fc49e
Added translation using Weblate (Spanish (Bolivia))
kikopeiro Apr 10, 2023
1ec5762
Translated using Weblate (German)
NICO-SOLUTIONS Jun 20, 2023
05c5abc
[FIX] web_m2x_options: Avoid constant RPC calls
nguyenminhchien Jul 28, 2023
1fd11e9
Update translation files
weblate Jul 28, 2023
72b3774
Translated using Weblate (Spanish)
Ivorra78 Aug 27, 2023
a9f2567
[16.0] web_m2x_options: impossible to open a mass mailing
fmdl Nov 11, 2023
e27911e
Translated using Weblate (Italian)
mymage Nov 27, 2023
bd20332
Translated using Weblate (Italian)
mymage Dec 24, 2023
e9f26e2
Translated using Weblate (French)
ThomasBinsfeld Jan 24, 2024
b3413ff
Translated using Weblate (French)
glitchov Feb 2, 2024
21ad087
[FIX] web_m2x_options: fix usage errors
vincent-hatakeyama May 15, 2024
0d72950
Translated using Weblate (Portuguese (Brazil))
May 29, 2024
f3d1062
[IMP] web_m2x_options: black, isort, prettier
manuelregidor Jul 22, 2024
c2938b5
[MIG]web_m2x_options: Migration to 17.0
manuelregidor Jul 22, 2024
f16533e
[UPD] Update web_m2x_options.pot
Jul 30, 2024
76a49ef
[BOT] post-merge updates
OCA-git-bot Jul 30, 2024
7778015
Update translation files
weblate Jul 30, 2024
87f62fb
[FIX] web_m2x_options: Error if not web_m2x_options set on session
CarlosRoca13 Aug 14, 2024
4dce9da
[FIX] web_m2x_options: add fieldColor to Many2OneAvatarUserField and …
CRogos Aug 22, 2024
03aa77b
[FIX] Error opening product form in shop floor
woutDynapps Aug 29, 2024
e3d3f49
[BOT] post-merge updates
OCA-git-bot Sep 16, 2024
0180449
[BOT] post-merge updates
OCA-git-bot Sep 16, 2024
191b8af
[FIX] web_m2x_options: add fieldColor to ListMany2ManyTagsAvatarField…
JordiMForgeFlow Oct 14, 2024
ffd03ca
[BOT] post-merge updates
OCA-git-bot Oct 15, 2024
c041646
[IMP] web_m2x_options: pre-commit auto fixes
chaule97 Oct 7, 2024
d2467e5
[MIG] web_m2x_options: Migration to 18.0
chaule97 Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 231 additions & 0 deletions web_m2x_options/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
===============
web_m2x_options
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:756e3ac0d0fa37abc2f9503af77e4de1ca23b8084443daaf106e88b045eed010
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/18.0/web_m2x_options
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_m2x_options
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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.

**Table of contents**

.. contents::
:local:

Usage
=====

in the field's options dict
---------------------------

``create`` *boolean* (Default: depends if user have create rights)

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

``limit`` *int* (Default: odoo default value is ``8``)

Number of displayed record in drop-down panel

``search_more`` *boolean*

Used to force disable/enable search more button.

``field_color`` *string*

A string to define the field used to define color. This option has to
be used with colors.

``colors`` *dictionary*

A dictionary to link field value with a HTML color. This option has
to be used with field_color.

``open`` *boolean* (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.create`` *boolean* (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_edit`` *boolean* (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.limit`` *int* (Default: odoo default value is ``8``)

Number of displayed record in drop-down panel for all fields in the
odoo instance

``web_m2x_options.search_more`` *boolean* (Default: default value is
``False``)

Whether the field should always show "Search more..." entry or not.

``web_m2x_options.field_limit_entries`` *int*

Number of displayed lines on all One2many fields

To add these parameters go to Configuration -> Technical -> Parameters
-> System Parameters and add new parameters like:

- web_m2x_options.create: False
- web_m2x_options.create_edit: False
- web_m2x_options.limit: 10
- web_m2x_options.search_more: True
- web_m2x_options.field_limit_entries: 5

Example
-------

Your XML form view definition could contain:

.. code:: xml

...
<field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false, 'search_more': true, 'field_color':'type', 'colors':{'contact':'green', 'invoice': 'red', 'delivery': 'blue'}}"/>
...

Known issues / Roadmap
======================

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...).

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/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 <https://github.com/OCA/web/issues/new?body=module:%20web_m2x_options%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* initOS GmbH
* ACSONE SA/NV
* 0k.io
* Tecnativa
* Sygel

Contributors
------------

- David Coninckx <[email protected]>

- Emanuel Cino <[email protected]>

- Holger Brunn <[email protected]>

- Nicolas JEUDY <[email protected]>

- Yannick Vaucher <[email protected]>

- Zakaria Makrelouf <[email protected]>

- `Tecnativa <https://www.tecnativa.com>`__:

- Jairo Llopis <[email protected]>
- David Vidal <[email protected]>
- Ernesto Tejeda <[email protected]>
- Carlos Roca

- Bhavesh Odedra <[email protected]>

- Dhara Solanki <[email protected]> (http://www.initos.com)

- `Trobz <https://trobz.com>`__:

- Hoang Diep <[email protected]>
- Chau Le <[email protected]>

- `Sygel <https://sygel.es>`__:

- Manuel Regidor <[email protected]>
- Valentín Vinagre <[email protected]>
- Harald Panten <[email protected]>

Other credits
-------------

The migration of this module from 17.0 to 18.0 was financially supported
by Camptocamp

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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 <https://github.com/OCA/web/tree/18.0/web_m2x_options>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions web_m2x_options/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
31 changes: 31 additions & 0 deletions web_m2x_options/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2015 0k.io
# Copyright 2016 ACSONE SA/NV
# Copyright 2017 Tecnativa
# Copyright 2020 initOS GmbH.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "web_m2x_options",
"version": "18.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": [
(
"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,
}
46 changes: 46 additions & 0 deletions web_m2x_options/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-03 03:50+0000\n"
"PO-Revision-Date: 2018-01-03 03:50+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2017\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"

#. module: web_m2x_options
#: model:ir.model,name:web_m2x_options.model_ir_http
msgid "HTTP Routing"
msgstr ""

#. module: web_m2x_options
#: model:ir.model,name:web_m2x_options.model_ir_config_parameter
msgid "System Parameter"
msgstr ""

#, python-format
#~ msgid "Search More..."
#~ msgstr "البحث عن المزيد ..."

#, python-format
#~ msgid "Cancel"
#~ msgstr "إلغاء"

#, python-format
#~ msgid "Create \"<strong>%s</strong>\""
#~ msgstr "إنشاء \"<strong>%s</strong>\""

#, python-format
#~ msgid "Create and Edit..."
#~ msgstr "إنشاء وتحرير ..."
Loading
Loading