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

[17.0][MIG] web_m2x_options: Migration to 17 #2888

Merged
merged 67 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8bd590f
- Rename web_m2o_enhanced to web_m2x_options
Nov 18, 2013
7621a8b
move all addons to __unported__, set all addons as not installable
hbrunn Jul 7, 2014
e1fd690
fix: obscur wrong path on last commit. recreate portage from scratch.
Jan 5, 2015
1fe71fa
support 'open' on many2many_tags
hbrunn Jul 10, 2015
f969cc2
web_m2x_options check Many2one and Many2many options
antespi Nov 16, 2015
89088e3
Limit name_search to 160 like Odoo core does
antespi Feb 10, 2016
b1a35f7
Migration of module web_m2x_options. Adapt JS file to the new JS API …
zakiuu Sep 11, 2016
a223f07
Makes the module compatible with Odoo community
lmignon Oct 24, 2016
f52a14d
web_m2x_options: s/ev.handleObj.selector/currentTarget * many2many wi…
zakiuu Feb 2, 2017
85294a1
Fix Qweb templates. (#561)
yajo Mar 8, 2017
10dca0e
[MIG] web_m2x_options: migrated to 10.0
chienandalu May 16, 2017
155c881
[IMP] web_m2x_options: Perf issue https://github.com/OCA/web/issues/615
jesusVMayor May 30, 2017
419ff89
web_m2x_options: Hide the create/create and edit... button when the u…
jesusVMayor May 30, 2017
2fe11f9
[10.0][ADD] option to deactivate color picker on many2many_tags (#713)
grindtildeath Sep 5, 2017
a695d34
[FIX] web_m2x_options: Compatibilize with web_advanced_search_x2x
yajo Oct 20, 2017
edcb302
[MIG] web_m2x_options: Migration to 11.0
ernestotejeda May 28, 2018
08cea92
Translated using Weblate (Portuguese (Brazil))
Aug 3, 2018
a74af87
[FIX] open option on many2many_tags
PCatinean Nov 29, 2018
7f05455
[FIX] web_m2x_options: Fix error in tree views with many2many_tags
yajo Jan 16, 2019
808eb50
[MIG] web_m2x_options: Migration to 12.0
gustitammam Oct 19, 2018
3c7dfb6
Translated using Weblate (French)
May 27, 2019
dfa26bb
Translated using Weblate (French)
Aug 6, 2019
3c9fed6
Translated using Weblate (Portuguese (Brazil))
Aug 26, 2019
ee57556
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
865ae51
Translated using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
3db68bc
[MIG] web_m2x_options: Migration to 13.0
Oct 2, 2019
f5c90d3
[REF] web_m2x_options: better imp and fixes
andres-pcg Feb 22, 2020
68d2168
[REF] web_m2x_options: eslint complains
andres-pcg Feb 23, 2020
c9c986d
[REF] web_m2x_options: eslint fix
andres-pcg Feb 23, 2020
ec50f14
[IMP] web_m2x_options: balck and eslint fix
andres-pcg Feb 23, 2020
719001c
[IMP] web_m2x_options: black, isort
andres-pcg Feb 29, 2020
5912e8c
[13.0][FIX] issue of field dropdown
Apr 1, 2020
8aa946c
[FIX] pre-commit
Apr 1, 2020
89cf226
[FIX] web_m2x_options: quick search filter only if search value
ThomasBinsfeld Apr 15, 2020
0e43f6d
Translated using Weblate (Chinese (Simplified))
liweijie0812 Jul 8, 2020
a8954b8
Translated using Weblate (German)
didierdonze Jul 22, 2020
c4cc872
Translated using Weblate (French)
didierdonze Jul 22, 2020
d0fe81d
Fix mobile enterprise version
cormaza Sep 7, 2020
267d9ab
[IMP] web_m2x_options: black, isort, prettier
dsolanki-initos Oct 26, 2020
69ab936
[MIG] Migrate the module web_m2x_options to v14.
dsolanki-initos Oct 26, 2020
43380ae
Added translation using Weblate (Dutch)
bosd May 17, 2021
67fd20d
Translated using Weblate (German)
Corneliuus Oct 13, 2021
3d7a2c4
[MIG] web_m2x_options: Migration to 15.0
Nov 5, 2021
f36f988
[15.0][MIG] web_widget_bokeh_chart
ChrisOForgeFlow Dec 10, 2021
0df169c
[FIX] web_m2x_options: fix search_more behaviour
SilvioC2C Aug 11, 2021
9840377
[FIX] when all is undefined, fall back to core's default
hbrunn Apr 7, 2020
bf17a7d
[ADD] Option open for One2Many fields
qgroulard Jan 24, 2020
eade95d
[IMP] web_m2x_options: Efficiency
CarlosRoca13 Nov 9, 2020
f7a0b31
[IMP] web_m2x_options: Added limit for o2m field entries
CarlosRoca13 Nov 9, 2020
a4f5bbf
[FIX] web_m2x_options: fix test_ir_config_parameter
Dec 21, 2021
12d9f16
[15.0][FIX] Remove tests from init
CRogos Nov 9, 2022
4c380a3
[16.0][MIG] web_m2x_options: Migration to 16.0
anothingguy Mar 28, 2023
f0ef4f2
Update translation files
weblate Apr 5, 2023
2d63329
Added translation using Weblate (Spanish (Bolivia))
kikopeiro Apr 10, 2023
aa582d1
Translated using Weblate (German)
NICO-SOLUTIONS Jun 20, 2023
d70acf8
[FIX] web_m2x_options: Avoid constant RPC calls
nguyenminhchien Jul 28, 2023
03ea167
Update translation files
weblate Jul 28, 2023
8e583e6
Translated using Weblate (Spanish)
Ivorra78 Aug 27, 2023
567f3e5
[16.0] web_m2x_options: impossible to open a mass mailing
fmdl Nov 11, 2023
22412c4
Translated using Weblate (Italian)
mymage Nov 27, 2023
f1ee6f1
Translated using Weblate (Italian)
mymage Dec 24, 2023
10e1cf8
Translated using Weblate (French)
ThomasBinsfeld Jan 24, 2024
d8512e5
Translated using Weblate (French)
glitchov Feb 2, 2024
c618c0b
[FIX] web_m2x_options: fix usage errors
vincent-hatakeyama May 15, 2024
020aa86
Translated using Weblate (Portuguese (Brazil))
May 29, 2024
f6edfac
[IMP] web_m2x_options: black, isort, prettier
manuelregidor Jul 22, 2024
6c3884f
[MIG]web_m2x_options: Migration to 17.0
manuelregidor Jul 22, 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
230 changes: 230 additions & 0 deletions web_m2x_options/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
===============
web_m2x_options
===============

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

.. |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/17.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=17.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 <davconinckx@gmail.com>

- Emanuel Cino <ecino@compassion.ch>

- Holger Brunn <hbrunn@therp.nl>

- Nicolas JEUDY <nicolas@sudokeys.com>

- Yannick Vaucher <yannick.vaucher@camptocamp.com>

- Zakaria Makrelouf <z.makrelouf@gmail.com>

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

- Jairo Llopis <jairo.llopis@tecnativa.com>
- David Vidal <david.vidal@tecnativa.com>
- Ernesto Tejeda <ernesto.tejeda87@gmail.com>
- Carlos Roca

- Bhavesh Odedra <bodedra@opensourceintegrators.com>

- Dhara Solanki <dhara.solanki@initos.com> (http://www.initos.com)

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

- Hoang Diep <hoang@trobz.com>

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

- Manuel Regidor <manuel.regidor@sygel.es>
- Valentín Vinagre <valentin.vinagre@sygel.es>
- Harald Panten <harald.panten@sygel.es>

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/17.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": "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": [
(
"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,
}
133 changes: 133 additions & 0 deletions web_m2x_options/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_m2x_options
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid ", are you sure it does not exist yet?"
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "Create"
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Create \"%s\""
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "Create and Edit"
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Create and edit..."
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "Discard"
msgstr ""

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

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/form.esm.js:0
#, python-format
msgid "New: %s"
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "No records"
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/form.esm.js:0
#, python-format
msgid "Open: "
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Search More..."
msgstr "البحث عن المزيد ..."

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/relational_utils.esm.js:0
#, python-format
msgid "Start typing..."
msgstr ""

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

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "You are creating a new"
msgstr ""

#. module: web_m2x_options
#. odoo-javascript
#: code:addons/web_m2x_options/static/src/components/base.xml:0
#, python-format
msgid "as a new"
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