odoo-addon-web-m2x-options-manager 15.0.1.0.0.3__py3-none-any.whl → 16.0.1.0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/web_m2x_options_manager/README.rst +7 -6
- odoo/addons/web_m2x_options_manager/__manifest__.py +1 -1
- odoo/addons/web_m2x_options_manager/i18n/web_m2x_options_manager.pot +4 -2
- odoo/addons/web_m2x_options_manager/models/ir_model.py +2 -15
- odoo/addons/web_m2x_options_manager/models/ir_ui_view.py +1 -2
- odoo/addons/web_m2x_options_manager/models/m2x_create_edit_option.py +9 -8
- odoo/addons/web_m2x_options_manager/readme/CONTRIBUTORS.rst +1 -0
- odoo/addons/web_m2x_options_manager/static/description/index.html +21 -20
- odoo/addons/web_m2x_options_manager/tests/test_m2x_create_edit_option.py +10 -23
- odoo/addons/web_m2x_options_manager/views/ir_model.xml +1 -1
- {odoo_addon_web_m2x_options_manager-15.0.1.0.0.3.dist-info → odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info}/METADATA +13 -15
- {odoo_addon_web_m2x_options_manager-15.0.1.0.0.3.dist-info → odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info}/RECORD +14 -14
- {odoo_addon_web_m2x_options_manager-15.0.1.0.0.3.dist-info → odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info}/WHEEL +1 -1
- {odoo_addon_web_m2x_options_manager-15.0.1.0.0.3.dist-info → odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ Web M2X Options Manager
|
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
8
|
!! changes will be overwritten. !!
|
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
10
|
+
!! source digest: sha256:e2c7c70fbcb74be8ffaed3747c322112463936bb6fbb5a48c42d659a5f8ddce7
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -17,13 +17,13 @@ Web M2X Options Manager
|
|
|
17
17
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
18
18
|
:alt: License: AGPL-3
|
|
19
19
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
|
20
|
-
:target: https://github.com/OCA/web/tree/
|
|
20
|
+
:target: https://github.com/OCA/web/tree/16.0/web_m2x_options_manager
|
|
21
21
|
:alt: OCA/web
|
|
22
22
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
23
|
-
:target: https://translation.odoo-community.org/projects/web-
|
|
23
|
+
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options_manager
|
|
24
24
|
:alt: Translate me on Weblate
|
|
25
25
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
26
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=
|
|
26
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
|
|
27
27
|
:alt: Try me on Runboat
|
|
28
28
|
|
|
29
29
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
@@ -53,7 +53,7 @@ Bug Tracker
|
|
|
53
53
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
|
|
54
54
|
In case of trouble, please check there if your issue has already been reported.
|
|
55
55
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
56
|
-
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_m2x_options_manager%0Aversion:%
|
|
56
|
+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_m2x_options_manager%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
57
57
|
|
|
58
58
|
Do not contact contributors directly about support or help with technical issues.
|
|
59
59
|
|
|
@@ -71,6 +71,7 @@ Contributors
|
|
|
71
71
|
* `Camptocamp <https://www.camptocamp.com>`__:
|
|
72
72
|
|
|
73
73
|
* Silvio Gregorini
|
|
74
|
+
* Duong (Tran Quoc) <duongtq@trobz.com>
|
|
74
75
|
|
|
75
76
|
Maintainers
|
|
76
77
|
~~~~~~~~~~~
|
|
@@ -85,6 +86,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
85
86
|
mission is to support the collaborative development of Odoo features and
|
|
86
87
|
promote its widespread use.
|
|
87
88
|
|
|
88
|
-
This module is part of the `OCA/web <https://github.com/OCA/web/tree/
|
|
89
|
+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_m2x_options_manager>`_ project on GitHub.
|
|
89
90
|
|
|
90
91
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"summary": 'Adds an interface to manage the "Create" and'
|
|
7
7
|
' "Create and Edit" options for specific models and'
|
|
8
8
|
" fields.",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "16.0.1.0.0",
|
|
10
10
|
"author": "Camptocamp, Odoo Community Association (OCA)",
|
|
11
11
|
"license": "AGPL-3",
|
|
12
12
|
"category": "Web",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
msgid ""
|
|
6
6
|
msgstr ""
|
|
7
|
-
"Project-Id-Version: Odoo Server
|
|
7
|
+
"Project-Id-Version: Odoo Server 16.0\n"
|
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
|
9
9
|
"Last-Translator: \n"
|
|
10
10
|
"Language-Team: \n"
|
|
@@ -14,9 +14,10 @@ msgstr ""
|
|
|
14
14
|
"Plural-Forms: \n"
|
|
15
15
|
|
|
16
16
|
#. module: web_m2x_options_manager
|
|
17
|
+
#. odoo-python
|
|
17
18
|
#: code:addons/web_m2x_options_manager/models/m2x_create_edit_option.py:0
|
|
18
19
|
#, python-format
|
|
19
|
-
msgid "%(
|
|
20
|
+
msgid "'%(field_name)s' is not a valid field for model '%(model_name)s'!"
|
|
20
21
|
msgstr ""
|
|
21
22
|
|
|
22
23
|
#. module: web_m2x_options_manager
|
|
@@ -174,6 +175,7 @@ msgid "Models"
|
|
|
174
175
|
msgstr ""
|
|
175
176
|
|
|
176
177
|
#. module: web_m2x_options_manager
|
|
178
|
+
#. odoo-python
|
|
177
179
|
#: code:addons/web_m2x_options_manager/models/m2x_create_edit_option.py:0
|
|
178
180
|
#, python-format
|
|
179
181
|
msgid "Only Many2many and Many2one fields can be chosen!"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright 2021 Camptocamp SA
|
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import fields, models
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class IrModel(models.Model):
|
|
@@ -36,17 +36,4 @@ class IrModel(models.Model):
|
|
|
36
36
|
|
|
37
37
|
class IrModelFields(models.Model):
|
|
38
38
|
_inherit = "ir.model.fields"
|
|
39
|
-
|
|
40
|
-
@api.model
|
|
41
|
-
def name_search(self, name="", args=None, operator="ilike", limit=100):
|
|
42
|
-
res = super().name_search(name, args, operator, limit)
|
|
43
|
-
if not (name and self.env.context.get("search_by_technical_name")):
|
|
44
|
-
return res
|
|
45
|
-
domain = list(args or []) + [("name", operator, name)]
|
|
46
|
-
new_fids = self.search(domain, limit=limit).ids
|
|
47
|
-
for fid in [x[0] for x in res]:
|
|
48
|
-
if fid not in new_fids:
|
|
49
|
-
new_fids.append(fid)
|
|
50
|
-
if limit and limit > 0:
|
|
51
|
-
new_fids = new_fids[:limit]
|
|
52
|
-
return self.browse(new_fids).sudo().name_get()
|
|
39
|
+
_rec_names_search = ["name", "field_description"]
|
|
@@ -11,8 +11,7 @@ class IrUiView(models.Model):
|
|
|
11
11
|
res = super()._postprocess_tag_field(node, name_manager, node_info)
|
|
12
12
|
if node.tag == "field":
|
|
13
13
|
mname = name_manager.model._name
|
|
14
|
-
|
|
15
|
-
field = self.env[mname]._fields.get(fname)
|
|
14
|
+
field = name_manager.model._fields.get(node.get("name"))
|
|
16
15
|
if field and field.type in ("many2many", "many2one"):
|
|
17
16
|
rec = self.env["m2x.create.edit.option"].get(mname, field.name)
|
|
18
17
|
if rec:
|
|
@@ -22,7 +22,6 @@ class M2xCreateEditOption(models.Model):
|
|
|
22
22
|
field_name = fields.Char(
|
|
23
23
|
related="field_id.name",
|
|
24
24
|
store=True,
|
|
25
|
-
string="Field Name",
|
|
26
25
|
)
|
|
27
26
|
|
|
28
27
|
model_id = fields.Many2one(
|
|
@@ -125,9 +124,9 @@ class M2xCreateEditOption(models.Model):
|
|
|
125
124
|
for opt in self:
|
|
126
125
|
if opt.field_id.model_id != opt.model_id:
|
|
127
126
|
msg = _(
|
|
128
|
-
"%(
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
"'%(field_name)s' is not a valid field for model '%(model_name)s'!",
|
|
128
|
+
field_name=opt.field_name,
|
|
129
|
+
model_name=opt.model_name,
|
|
131
130
|
)
|
|
132
131
|
raise ValidationError(msg)
|
|
133
132
|
|
|
@@ -144,17 +143,19 @@ class M2xCreateEditOption(models.Model):
|
|
|
144
143
|
options = node.attrib.get("options") or {}
|
|
145
144
|
if isinstance(options, str):
|
|
146
145
|
options = safe_eval(options, dict(self.env.context or [])) or {}
|
|
146
|
+
|
|
147
147
|
for k in ("create", "create_edit"):
|
|
148
148
|
opt = self["option_%s" % k]
|
|
149
149
|
if opt == "none":
|
|
150
150
|
continue
|
|
151
151
|
mode, val = opt.split("_")
|
|
152
|
-
if
|
|
152
|
+
if k not in options:
|
|
153
153
|
options[k] = val == "true"
|
|
154
|
-
|
|
154
|
+
if mode == "force":
|
|
155
|
+
options["no_%s" % k] = val == "false"
|
|
155
156
|
if not self.option_create_edit_wizard:
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
options["no_quick_create"] = True
|
|
158
|
+
node.set("options", str(options))
|
|
158
159
|
|
|
159
160
|
@api.model
|
|
160
161
|
def get(self, model_name, field_name):
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
2
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<meta name="generator" content="Docutils:
|
|
6
|
+
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
|
7
7
|
<title>Web M2X Options Manager</title>
|
|
8
8
|
<style type="text/css">
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
:Author: David Goodger (goodger@python.org)
|
|
12
|
-
:Id: $Id: html4css1.css
|
|
12
|
+
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
|
13
13
|
:Copyright: This stylesheet has been placed in the public domain.
|
|
14
14
|
|
|
15
15
|
Default cascading style sheet for the HTML output of Docutils.
|
|
16
16
|
|
|
17
|
-
See
|
|
17
|
+
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
|
18
18
|
customize this style sheet.
|
|
19
19
|
*/
|
|
20
20
|
|
|
@@ -367,26 +367,26 @@ ul.auto-toc {
|
|
|
367
367
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
368
|
!! changes will be overwritten. !!
|
|
369
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
370
|
+
!! source digest: sha256:e2c7c70fbcb74be8ffaed3747c322112463936bb6fbb5a48c42d659a5f8ddce7
|
|
371
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
-
<p><a class="reference external
|
|
372
|
+
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_m2x_options_manager"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options_manager"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
373
|
<p>Allows managing the “Create…” and “Create and Edit…” options for <cite>Many2one</cite>
|
|
374
374
|
and <cite>Many2many</cite> fields directly from the <cite>ir.model</cite> form view.</p>
|
|
375
375
|
<p><strong>Table of contents</strong></p>
|
|
376
376
|
<div class="contents local topic" id="contents">
|
|
377
377
|
<ul class="simple">
|
|
378
|
-
<li><a class="reference internal" href="#usage" id="
|
|
379
|
-
<li><a class="reference internal" href="#bug-tracker" id="
|
|
380
|
-
<li><a class="reference internal" href="#credits" id="
|
|
381
|
-
<li><a class="reference internal" href="#authors" id="
|
|
382
|
-
<li><a class="reference internal" href="#contributors" id="
|
|
383
|
-
<li><a class="reference internal" href="#maintainers" id="
|
|
378
|
+
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
|
|
379
|
+
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
|
|
380
|
+
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
|
|
381
|
+
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
|
|
382
|
+
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
|
|
383
|
+
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
|
|
384
384
|
</ul>
|
|
385
385
|
</li>
|
|
386
386
|
</ul>
|
|
387
387
|
</div>
|
|
388
388
|
<div class="section" id="usage">
|
|
389
|
-
<h1><a class="toc-backref" href="#
|
|
389
|
+
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
|
|
390
390
|
<p>Go to Settings > Technical > Models.</p>
|
|
391
391
|
<p>Choose the model you wish to edit, and open its form view. Go to the
|
|
392
392
|
“Create/Edit Options” tab, and add the fields you want to manage.</p>
|
|
@@ -394,38 +394,39 @@ and <cite>Many2many</cite> fields directly from the <cite>ir.model</cite> form v
|
|
|
394
394
|
Button “Empty” will remove every option.</p>
|
|
395
395
|
</div>
|
|
396
396
|
<div class="section" id="bug-tracker">
|
|
397
|
-
<h1><a class="toc-backref" href="#
|
|
397
|
+
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
|
|
398
398
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
|
|
399
399
|
In case of trouble, please check there if your issue has already been reported.
|
|
400
400
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
401
|
-
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_m2x_options_manager%0Aversion:%
|
|
401
|
+
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_m2x_options_manager%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
402
402
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
403
403
|
</div>
|
|
404
404
|
<div class="section" id="credits">
|
|
405
|
-
<h1><a class="toc-backref" href="#
|
|
405
|
+
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
|
|
406
406
|
<div class="section" id="authors">
|
|
407
|
-
<h2><a class="toc-backref" href="#
|
|
407
|
+
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
|
|
408
408
|
<ul class="simple">
|
|
409
409
|
<li>Camptocamp</li>
|
|
410
410
|
</ul>
|
|
411
411
|
</div>
|
|
412
412
|
<div class="section" id="contributors">
|
|
413
|
-
<h2><a class="toc-backref" href="#
|
|
413
|
+
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
|
|
414
414
|
<ul class="simple">
|
|
415
415
|
<li><a class="reference external" href="https://www.camptocamp.com">Camptocamp</a>:<ul>
|
|
416
416
|
<li>Silvio Gregorini</li>
|
|
417
417
|
</ul>
|
|
418
418
|
</li>
|
|
419
|
+
<li>Duong (Tran Quoc) <<a class="reference external" href="mailto:duongtq@trobz.com">duongtq@trobz.com</a>></li>
|
|
419
420
|
</ul>
|
|
420
421
|
</div>
|
|
421
422
|
<div class="section" id="maintainers">
|
|
422
|
-
<h2><a class="toc-backref" href="#
|
|
423
|
+
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
|
|
423
424
|
<p>This module is maintained by the OCA.</p>
|
|
424
425
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
|
425
426
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
426
427
|
mission is to support the collaborative development of Odoo features and
|
|
427
428
|
promote its widespread use.</p>
|
|
428
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/
|
|
429
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_m2x_options_manager">OCA/web</a> project on GitHub.</p>
|
|
429
430
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
430
431
|
</div>
|
|
431
432
|
</div>
|
|
@@ -75,7 +75,7 @@ class TestM2xCreateEditOption(TransactionCase):
|
|
|
75
75
|
)
|
|
76
76
|
|
|
77
77
|
def test_apply_options(self):
|
|
78
|
-
res = self.env["res.partner"].
|
|
78
|
+
res = self.env["res.partner"].get_view(self.view.id)
|
|
79
79
|
|
|
80
80
|
# Check fields on res.partner form view
|
|
81
81
|
form_arch = res["arch"]
|
|
@@ -97,37 +97,24 @@ class TestM2xCreateEditOption(TransactionCase):
|
|
|
97
97
|
safe_eval(categ_node.attrib.get("options"), nocopy=True),
|
|
98
98
|
{"create": False, "create_edit": True},
|
|
99
99
|
)
|
|
100
|
-
self.assertEqual(
|
|
101
|
-
(
|
|
102
|
-
categ_node.attrib.get("can_create"),
|
|
103
|
-
categ_node.attrib.get("can_write"),
|
|
104
|
-
),
|
|
105
|
-
("true", "true"),
|
|
106
|
-
)
|
|
107
|
-
|
|
108
100
|
# Check fields on res.users tree view (contained in ``user_ids`` field)
|
|
109
|
-
|
|
110
|
-
tree_doc = etree.XML(tree_arch)
|
|
111
|
-
company_node = tree_doc.xpath("//field[@name='company_id']")[0]
|
|
101
|
+
company_node = form_doc.xpath("//field[@name='company_id']")[0]
|
|
112
102
|
self.assertEqual(
|
|
113
103
|
safe_eval(company_node.attrib.get("options"), nocopy=True),
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
),
|
|
121
|
-
("false", "false"),
|
|
104
|
+
{
|
|
105
|
+
"create": False,
|
|
106
|
+
"no_create": False,
|
|
107
|
+
"create_edit": True,
|
|
108
|
+
"no_quick_create": True,
|
|
109
|
+
},
|
|
122
110
|
)
|
|
123
|
-
|
|
124
111
|
# Update options, check that node has been updated too
|
|
125
112
|
self.title_opt.option_create_edit = "force_false"
|
|
126
|
-
res = self.env["res.partner"].
|
|
113
|
+
res = self.env["res.partner"].get_view(self.view.id)
|
|
127
114
|
form_arch = res["arch"]
|
|
128
115
|
form_doc = etree.XML(form_arch)
|
|
129
116
|
title_node = form_doc.xpath("//field[@name='title']")[0]
|
|
130
117
|
self.assertEqual(
|
|
131
118
|
safe_eval(title_node.attrib.get("options"), nocopy=True),
|
|
132
|
-
{"create": True, "create_edit": False},
|
|
119
|
+
{"create": True, "create_edit": False, "no_create_edit": True},
|
|
133
120
|
)
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<field name="model_name" invisible="1" />
|
|
22
22
|
<field
|
|
23
23
|
name="field_id"
|
|
24
|
-
context="{'
|
|
24
|
+
context="{'display_technical_name': True}"
|
|
25
25
|
domain="[('ttype', 'in', ('many2many', 'many2one')), ('model_id.model', '=', model_name)]"
|
|
26
26
|
options="{'create': False, 'create_edit': False}"
|
|
27
27
|
/>
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name: odoo-addon-
|
|
3
|
-
Version:
|
|
2
|
+
Name: odoo-addon-web_m2x_options_manager
|
|
3
|
+
Version: 16.0.1.0.0.1
|
|
4
4
|
Summary: Adds an interface to manage the "Create" and "Create and Edit" options for specific models and fields.
|
|
5
5
|
Home-page: https://github.com/OCA/web
|
|
6
6
|
Author: Camptocamp, Odoo Community Association (OCA)
|
|
7
7
|
Author-email: support@odoo-community.org
|
|
8
8
|
License: AGPL-3
|
|
9
|
-
Platform: UNKNOWN
|
|
10
9
|
Classifier: Programming Language :: Python
|
|
11
10
|
Classifier: Framework :: Odoo
|
|
12
|
-
Classifier: Framework :: Odoo ::
|
|
11
|
+
Classifier: Framework :: Odoo :: 16.0
|
|
13
12
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
14
|
-
Requires-Python: >=3.
|
|
15
|
-
Requires-Dist: odoo-addon-web-m2x-options
|
|
16
|
-
Requires-Dist: odoo
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Requires-Dist: odoo-addon-web-m2x-options<16.1dev,>=16.0dev
|
|
15
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
|
17
16
|
|
|
18
17
|
=======================
|
|
19
18
|
Web M2X Options Manager
|
|
@@ -24,7 +23,7 @@ Web M2X Options Manager
|
|
|
24
23
|
!! This file is generated by oca-gen-addon-readme !!
|
|
25
24
|
!! changes will be overwritten. !!
|
|
26
25
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
|
-
!! source digest: sha256:
|
|
26
|
+
!! source digest: sha256:e2c7c70fbcb74be8ffaed3747c322112463936bb6fbb5a48c42d659a5f8ddce7
|
|
28
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
28
|
|
|
30
29
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -34,13 +33,13 @@ Web M2X Options Manager
|
|
|
34
33
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
35
34
|
:alt: License: AGPL-3
|
|
36
35
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
|
37
|
-
:target: https://github.com/OCA/web/tree/
|
|
36
|
+
:target: https://github.com/OCA/web/tree/16.0/web_m2x_options_manager
|
|
38
37
|
:alt: OCA/web
|
|
39
38
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
40
|
-
:target: https://translation.odoo-community.org/projects/web-
|
|
39
|
+
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options_manager
|
|
41
40
|
:alt: Translate me on Weblate
|
|
42
41
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
43
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=
|
|
42
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
|
|
44
43
|
:alt: Try me on Runboat
|
|
45
44
|
|
|
46
45
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
@@ -70,7 +69,7 @@ Bug Tracker
|
|
|
70
69
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
|
|
71
70
|
In case of trouble, please check there if your issue has already been reported.
|
|
72
71
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
73
|
-
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_m2x_options_manager%0Aversion:%
|
|
72
|
+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_m2x_options_manager%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
74
73
|
|
|
75
74
|
Do not contact contributors directly about support or help with technical issues.
|
|
76
75
|
|
|
@@ -88,6 +87,7 @@ Contributors
|
|
|
88
87
|
* `Camptocamp <https://www.camptocamp.com>`__:
|
|
89
88
|
|
|
90
89
|
* Silvio Gregorini
|
|
90
|
+
* Duong (Tran Quoc) <duongtq@trobz.com>
|
|
91
91
|
|
|
92
92
|
Maintainers
|
|
93
93
|
~~~~~~~~~~~
|
|
@@ -102,8 +102,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
102
102
|
mission is to support the collaborative development of Odoo features and
|
|
103
103
|
promote its widespread use.
|
|
104
104
|
|
|
105
|
-
This module is part of the `OCA/web <https://github.com/OCA/web/tree/
|
|
105
|
+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_m2x_options_manager>`_ project on GitHub.
|
|
106
106
|
|
|
107
107
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
108
|
-
|
|
109
|
-
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
odoo/addons/web_m2x_options_manager/README.rst,sha256=
|
|
1
|
+
odoo/addons/web_m2x_options_manager/README.rst,sha256=cbuSbF9xFhqaKwQmMQeBvn-Gn6_bRaPgciygHbd7b-0,3218
|
|
2
2
|
odoo/addons/web_m2x_options_manager/__init__.py,sha256=MQ_oFQRAL26SDOPEHU8Z3LssM8EuoHM1g-mMfuEMfJw,117
|
|
3
|
-
odoo/addons/web_m2x_options_manager/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/web_m2x_options_manager/__manifest__.py,sha256=NQgTsIph6EuX6fpE5sOVyC5ALCddJmm-G2a_cA1Y0ko,681
|
|
4
4
|
odoo/addons/web_m2x_options_manager/demo/res_partner_demo_view.xml,sha256=pRjm0rLV58DAEhTLwdkGvvZljX7cTvQNYhQRpslfHEc,1047
|
|
5
|
-
odoo/addons/web_m2x_options_manager/i18n/web_m2x_options_manager.pot,sha256=
|
|
5
|
+
odoo/addons/web_m2x_options_manager/i18n/web_m2x_options_manager.pot,sha256=LrWb9CnqAA2JNGFN5cXCC3y8WGkNw9_j6s7SLCsPY9A,7407
|
|
6
6
|
odoo/addons/web_m2x_options_manager/models/__init__.py,sha256=6rWwX_fAKmZjvwbL6ulFExLvyjGAndhj4V-Ek_cUXfY,181
|
|
7
|
-
odoo/addons/web_m2x_options_manager/models/ir_model.py,sha256=
|
|
8
|
-
odoo/addons/web_m2x_options_manager/models/ir_ui_view.py,sha256=
|
|
9
|
-
odoo/addons/web_m2x_options_manager/models/m2x_create_edit_option.py,sha256=
|
|
10
|
-
odoo/addons/web_m2x_options_manager/readme/CONTRIBUTORS.rst,sha256=
|
|
7
|
+
odoo/addons/web_m2x_options_manager/models/ir_model.py,sha256=3LUXby3VScKbFiTme282Q6t12fOq9Fyg4Wt9DaS0g58,1237
|
|
8
|
+
odoo/addons/web_m2x_options_manager/models/ir_ui_view.py,sha256=twY65gm0Vf73esz71xXVFkFL6dZSPzUzMsG7VaRuvbA,706
|
|
9
|
+
odoo/addons/web_m2x_options_manager/models/m2x_create_edit_option.py,sha256=7kdWtB5olV28P9cn3tLzju-fwGgCtZOpz4onYutMhQE,6348
|
|
10
|
+
odoo/addons/web_m2x_options_manager/readme/CONTRIBUTORS.rst,sha256=Z7_e5_kF-ij_NMsloJWIB55sZWp4r_niEFcG5s8wItE,109
|
|
11
11
|
odoo/addons/web_m2x_options_manager/readme/DESCRIPTION.rst,sha256=qNonLT0wKuMEZvrEhgIZvVvSoWyEmXbE6TUaODr6nnM,143
|
|
12
12
|
odoo/addons/web_m2x_options_manager/readme/USAGE.rst,sha256=AKDGSyfH7sqY_jlPizrPoobjLiFvDFB-zvsSKyKuumE,274
|
|
13
13
|
odoo/addons/web_m2x_options_manager/security/ir.model.access.csv,sha256=BDamAhpQq8i7Y4cwZQdgyQ7z7e06FEEHOor0FmVUzFs,329
|
|
14
14
|
odoo/addons/web_m2x_options_manager/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
15
|
-
odoo/addons/web_m2x_options_manager/static/description/index.html,sha256=
|
|
15
|
+
odoo/addons/web_m2x_options_manager/static/description/index.html,sha256=otu8IxZQj7sboPBOBCQK6R6tvOcSGh_9zUkr77udCYY,12600
|
|
16
16
|
odoo/addons/web_m2x_options_manager/tests/__init__.py,sha256=HeH_Zl3Im8dDTGl9fXOGE5drpiVgBfboD0O2BrrrrR4,138
|
|
17
|
-
odoo/addons/web_m2x_options_manager/tests/test_m2x_create_edit_option.py,sha256=
|
|
18
|
-
odoo/addons/web_m2x_options_manager/views/ir_model.xml,sha256=
|
|
19
|
-
odoo_addon_web_m2x_options_manager-
|
|
20
|
-
odoo_addon_web_m2x_options_manager-
|
|
21
|
-
odoo_addon_web_m2x_options_manager-
|
|
22
|
-
odoo_addon_web_m2x_options_manager-
|
|
17
|
+
odoo/addons/web_m2x_options_manager/tests/test_m2x_create_edit_option.py,sha256=EQ_qPfz5Pz5R3SZZiHvYQ3ro5XdggQ6ZUuCnZ05NCww,4835
|
|
18
|
+
odoo/addons/web_m2x_options_manager/views/ir_model.xml,sha256=MWrUO0xNhbEqdzdCR6-VjVT9ij10LoS32S-y44e25ho,1749
|
|
19
|
+
odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info/METADATA,sha256=iOY7rJZKDyfq8NK5NckFUQZ2ZUroVcaZFSex6MgG9Cw,3871
|
|
20
|
+
odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
|
21
|
+
odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
22
|
+
odoo_addon_web_m2x_options_manager-16.0.1.0.0.1.dist-info/RECORD,,
|