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 #2961

Open
wants to merge 80 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
bdc4cd4
- Rename web_m2o_enhanced to web_m2x_options
Nov 18, 2013
4364dc7
move all addons to __unported__, set all addons as not installable
hbrunn Jul 7, 2014
e5d197c
fix: obscur wrong path on last commit. recreate portage from scratch.
Jan 5, 2015
05d02f6
support 'open' on many2many_tags
hbrunn Jul 10, 2015
0dbcf7f
web_m2x_options check Many2one and Many2many options
antespi Nov 16, 2015
363ea62
Limit name_search to 160 like Odoo core does
antespi Feb 10, 2016
097fbc6
Migration of module web_m2x_options. Adapt JS file to the new JS API …
zakiuu Sep 11, 2016
e3d0a18
Makes the module compatible with Odoo community
lmignon Oct 24, 2016
77dd78f
web_m2x_options: s/ev.handleObj.selector/currentTarget * many2many wi…
zakiuu Feb 2, 2017
dea149b
Fix Qweb templates. (#561)
yajo Mar 8, 2017
125fc07
[MIG] web_m2x_options: migrated to 10.0
chienandalu May 16, 2017
f05ad4a
[IMP] web_m2x_options: Perf issue https://github.com/OCA/web/issues/615
jesusVMayor May 30, 2017
c70bb14
web_m2x_options: Hide the create/create and edit... button when the u…
jesusVMayor May 30, 2017
b876e78
[10.0][ADD] option to deactivate color picker on many2many_tags (#713)
grindtildeath Sep 5, 2017
f800d1e
[FIX] web_m2x_options: Compatibilize with web_advanced_search_x2x
yajo Oct 20, 2017
753490c
[MIG] web_m2x_options: Migration to 11.0
ernestotejeda May 28, 2018
c20a4b3
Translated using Weblate (Portuguese (Brazil))
Aug 3, 2018
6c4e553
[FIX] open option on many2many_tags
PCatinean Nov 29, 2018
f557164
[FIX] web_m2x_options: Fix error in tree views with many2many_tags
yajo Jan 16, 2019
0230288
[MIG] web_m2x_options: Migration to 12.0
gustitammam Oct 19, 2018
c9f9657
Translated using Weblate (French)
May 27, 2019
67632a0
Translated using Weblate (French)
Aug 6, 2019
6258542
Translated using Weblate (Portuguese (Brazil))
Aug 26, 2019
023f49a
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
e1282e3
Translated using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
7c7a563
[MIG] web_m2x_options: Migration to 13.0
Oct 2, 2019
77420c4
[REF] web_m2x_options: better imp and fixes
andres-pcg Feb 22, 2020
e398624
[REF] web_m2x_options: eslint complains
andres-pcg Feb 23, 2020
518a571
[REF] web_m2x_options: eslint fix
andres-pcg Feb 23, 2020
5e6283d
[IMP] web_m2x_options: balck and eslint fix
andres-pcg Feb 23, 2020
0f51ed5
[IMP] web_m2x_options: black, isort
andres-pcg Feb 29, 2020
709c4db
[13.0][FIX] issue of field dropdown
Apr 1, 2020
3f44f18
[FIX] pre-commit
Apr 1, 2020
0374c96
[FIX] web_m2x_options: quick search filter only if search value
ThomasBinsfeld Apr 15, 2020
014ad95
Translated using Weblate (Chinese (Simplified))
liweijie0812 Jul 8, 2020
3ae6eaa
Translated using Weblate (German)
didierdonze Jul 22, 2020
1a4717c
Translated using Weblate (French)
didierdonze Jul 22, 2020
dde535b
Fix mobile enterprise version
cormaza Sep 7, 2020
c92a151
[IMP] web_m2x_options: black, isort, prettier
dsolanki-initos Oct 26, 2020
15d2e44
[MIG] Migrate the module web_m2x_options to v14.
dsolanki-initos Oct 26, 2020
9780a96
Added translation using Weblate (Dutch)
bosd May 17, 2021
0c62cac
Translated using Weblate (German)
Corneliuus Oct 13, 2021
e787468
[MIG] web_m2x_options: Migration to 15.0
Nov 5, 2021
5e6ea18
[15.0][MIG] web_widget_bokeh_chart
ChrisOForgeFlow Dec 10, 2021
32f0aa4
[FIX] web_m2x_options: fix search_more behaviour
SilvioC2C Aug 11, 2021
4ad5bc3
[FIX] when all is undefined, fall back to core's default
hbrunn Apr 7, 2020
a5a5548
[ADD] Option open for One2Many fields
qgroulard Jan 24, 2020
9219b0b
[IMP] web_m2x_options: Efficiency
CarlosRoca13 Nov 9, 2020
ba1fc7a
[IMP] web_m2x_options: Added limit for o2m field entries
CarlosRoca13 Nov 9, 2020
2cdf7d0
[FIX] web_m2x_options: fix test_ir_config_parameter
Dec 21, 2021
7d05025
[15.0][FIX] Remove tests from init
CRogos Nov 9, 2022
bf4ace4
[16.0][MIG] web_m2x_options: Migration to 16.0
anothingguy Mar 28, 2023
6cb72c5
Update translation files
weblate Apr 5, 2023
3d81236
Added translation using Weblate (Spanish (Bolivia))
kikopeiro Apr 10, 2023
b612600
Translated using Weblate (German)
NICO-SOLUTIONS Jun 20, 2023
ffcc0ca
[FIX] web_m2x_options: Avoid constant RPC calls
nguyenminhchien Jul 28, 2023
96eac4f
Update translation files
weblate Jul 28, 2023
2a27f21
Translated using Weblate (Spanish)
Ivorra78 Aug 27, 2023
714d3ce
[16.0] web_m2x_options: impossible to open a mass mailing
fmdl Nov 11, 2023
c3310e9
Translated using Weblate (Italian)
mymage Nov 27, 2023
96b2ffa
Translated using Weblate (Italian)
mymage Dec 24, 2023
a482617
Translated using Weblate (French)
ThomasBinsfeld Jan 24, 2024
d050130
Translated using Weblate (French)
glitchov Feb 2, 2024
3198c45
[FIX] web_m2x_options: fix usage errors
vincent-hatakeyama May 15, 2024
60f7b1b
Translated using Weblate (Portuguese (Brazil))
May 29, 2024
4a25ffc
[IMP] web_m2x_options: black, isort, prettier
manuelregidor Jul 22, 2024
3539732
[MIG]web_m2x_options: Migration to 17.0
manuelregidor Jul 22, 2024
159e398
[UPD] Update web_m2x_options.pot
Jul 30, 2024
aaf96bf
[BOT] post-merge updates
OCA-git-bot Jul 30, 2024
224401f
Update translation files
weblate Jul 30, 2024
686b451
[FIX] web_m2x_options: Error if not web_m2x_options set on session
CarlosRoca13 Aug 14, 2024
6e7e9d2
[FIX] web_m2x_options: add fieldColor to Many2OneAvatarUserField and …
CRogos Aug 22, 2024
75d6587
[FIX] Error opening product form in shop floor
woutDynapps Aug 29, 2024
145d73d
[BOT] post-merge updates
OCA-git-bot Sep 16, 2024
a3f8e5a
[BOT] post-merge updates
OCA-git-bot Sep 16, 2024
178d433
[FIX] web_m2x_options: add fieldColor to ListMany2ManyTagsAvatarField…
JordiMForgeFlow Oct 14, 2024
3985bc4
[BOT] post-merge updates
OCA-git-bot Oct 15, 2024
8e2cf61
[IMP] web_m2x_options: remove unneeded fieldColor on ListMany2ManyTag…
JordiMForgeFlow Oct 15, 2024
d90b2b8
[BOT] post-merge updates
OCA-git-bot Oct 15, 2024
21fbaa1
[MIG][18.0] web_m2x_options
bud-e Oct 16, 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
232 changes: 232 additions & 0 deletions web_m2x_options/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
===============
web_m2x_options
===============

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

.. |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-17-0/web-17-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:%2017.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]>

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

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

- Siddharth Bhalgami <[email protected]>

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

The migration of this module from 15.0 to 16.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
32 changes: 32 additions & 0 deletions web_m2x_options/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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, "
"Siddharth Bhalgami, "
"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