odoo-addon-base-view-inheritance-extension 16.0.1.0.0.11__py3-none-any.whl → 17.0.1.0.0.2__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/base_view_inheritance_extension/README.rst +46 -26
- odoo/addons/base_view_inheritance_extension/__manifest__.py +1 -1
- odoo/addons/base_view_inheritance_extension/i18n/base_view_inheritance_extension.pot +1 -6
- odoo/addons/base_view_inheritance_extension/models/ir_ui_view.py +75 -0
- odoo/addons/base_view_inheritance_extension/readme/CONTRIBUTORS.md +6 -0
- odoo/addons/base_view_inheritance_extension/readme/{DESCRIPTION.rst → DESCRIPTION.md} +2 -2
- odoo/addons/base_view_inheritance_extension/readme/ROADMAP.md +1 -0
- odoo/addons/base_view_inheritance_extension/readme/USAGE.md +32 -0
- odoo/addons/base_view_inheritance_extension/static/description/index.html +27 -10
- {odoo_addon_base_view_inheritance_extension-16.0.1.0.0.11.dist-info → odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info}/METADATA +53 -36
- {odoo_addon_base_view_inheritance_extension-16.0.1.0.0.11.dist-info → odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info}/RECORD +13 -13
- {odoo_addon_base_view_inheritance_extension-16.0.1.0.0.11.dist-info → odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info}/WHEEL +1 -1
- odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info/top_level.txt +1 -0
- odoo/addons/base_view_inheritance_extension/readme/CONTRIBUTORS.rst +0 -4
- odoo/addons/base_view_inheritance_extension/readme/ROADMAP.rst +0 -1
- odoo/addons/base_view_inheritance_extension/readme/USAGE.rst +0 -16
- odoo_addon_base_view_inheritance_extension-16.0.1.0.0.11.dist-info/top_level.txt +0 -1
|
@@ -7,7 +7,7 @@ Extended view inheritance
|
|
|
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:cc3eeb2e6514c28a74085cfaf6c72c75677d641778f0fcf248155f48600ac86f
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
|
|
@@ -17,19 +17,19 @@ Extended view inheritance
|
|
|
17
17
|
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
|
|
18
18
|
:alt: License: LGPL-3
|
|
19
19
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
|
|
20
|
-
:target: https://github.com/OCA/server-tools/tree/
|
|
20
|
+
:target: https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension
|
|
21
21
|
:alt: OCA/server-tools
|
|
22
22
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
23
|
-
:target: https://translation.odoo-community.org/projects/server-tools-
|
|
23
|
+
:target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_view_inheritance_extension
|
|
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/server-tools&target_branch=
|
|
26
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0
|
|
27
27
|
:alt: Try me on Runboat
|
|
28
28
|
|
|
29
29
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
30
30
|
|
|
31
|
-
This module was written to make it simple to add custom operators for
|
|
32
|
-
inheritance.
|
|
31
|
+
This module was written to make it simple to add custom operators for
|
|
32
|
+
view inheritance.
|
|
33
33
|
|
|
34
34
|
**Table of contents**
|
|
35
35
|
|
|
@@ -41,25 +41,41 @@ Usage
|
|
|
41
41
|
|
|
42
42
|
**Change a python dictionary (context for example)**
|
|
43
43
|
|
|
44
|
+
.. code:: xml
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
<field position="attributes">
|
|
47
|
+
<attribute name="context" operation="update">
|
|
48
|
+
{
|
|
49
|
+
"key": "value",
|
|
50
|
+
}
|
|
51
|
+
</attribute>
|
|
52
|
+
</field>
|
|
46
53
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
"key": "value",
|
|
51
|
-
}
|
|
52
|
-
</attribute>
|
|
53
|
-
</field>
|
|
54
|
+
Note that views are subject to evaluation of xmlids anyways, so if you
|
|
55
|
+
need to refer to some xmlid, say ``%(xmlid)s``.
|
|
54
56
|
|
|
57
|
+
**Add text after and/or before than original**
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
.. code:: xml
|
|
60
|
+
|
|
61
|
+
<attribute name="$attribute" operation="text_add">
|
|
62
|
+
$text_before {old_value} $text_after
|
|
63
|
+
</attribute>
|
|
64
|
+
|
|
65
|
+
**Add domain with AND/OR join operator (AND if missed) allowing
|
|
66
|
+
conditional changes**
|
|
67
|
+
|
|
68
|
+
.. code:: xml
|
|
69
|
+
|
|
70
|
+
<attribute name="$attribute" operation="domain_add"
|
|
71
|
+
condition="$field_condition" join_operator="OR">
|
|
72
|
+
$domain_to_add
|
|
73
|
+
</attribute>
|
|
58
74
|
|
|
59
75
|
Known issues / Roadmap
|
|
60
76
|
======================
|
|
61
77
|
|
|
62
|
-
|
|
78
|
+
- Support an ``eval`` attribute for our new node types.
|
|
63
79
|
|
|
64
80
|
Bug Tracker
|
|
65
81
|
===========
|
|
@@ -67,7 +83,7 @@ Bug Tracker
|
|
|
67
83
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
|
|
68
84
|
In case of trouble, please check there if your issue has already been reported.
|
|
69
85
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
70
|
-
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%
|
|
86
|
+
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
71
87
|
|
|
72
88
|
Do not contact contributors directly about support or help with technical issues.
|
|
73
89
|
|
|
@@ -75,20 +91,24 @@ Credits
|
|
|
75
91
|
=======
|
|
76
92
|
|
|
77
93
|
Authors
|
|
78
|
-
|
|
94
|
+
-------
|
|
79
95
|
|
|
80
96
|
* Therp BV
|
|
81
97
|
|
|
82
98
|
Contributors
|
|
83
|
-
|
|
99
|
+
------------
|
|
100
|
+
|
|
101
|
+
- Holger Brunn <hbrunn@therp.nl>
|
|
102
|
+
- Ronald Portier <rportier@therp.nl>
|
|
103
|
+
- `Tecnativa <https://www.tecnativa.com>`__:
|
|
104
|
+
|
|
105
|
+
- Sergio Teruel
|
|
106
|
+
- Carlos Dauden
|
|
84
107
|
|
|
85
|
-
|
|
86
|
-
* Ronald Portier <rportier@therp.nl>
|
|
87
|
-
* Sergio Teruel <sergio.teruel@tecnativa.com>
|
|
88
|
-
* Iván Todorovich <ivan.todorovich@camptocamp.com>
|
|
108
|
+
- Iván Todorovich <ivan.todorovich@camptocamp.com>
|
|
89
109
|
|
|
90
110
|
Maintainers
|
|
91
|
-
|
|
111
|
+
-----------
|
|
92
112
|
|
|
93
113
|
This module is maintained by the OCA.
|
|
94
114
|
|
|
@@ -100,6 +120,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
100
120
|
mission is to support the collaborative development of Odoo features and
|
|
101
121
|
promote its widespread use.
|
|
102
122
|
|
|
103
|
-
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/
|
|
123
|
+
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension>`_ project on GitHub.
|
|
104
124
|
|
|
105
125
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
|
4
4
|
{
|
|
5
5
|
"name": "Extended view inheritance",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "17.0.1.0.0",
|
|
7
7
|
"development_status": "Mature",
|
|
8
8
|
"author": "Therp BV,Odoo Community Association (OCA)",
|
|
9
9
|
"license": "LGPL-3",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
msgid ""
|
|
6
6
|
msgstr ""
|
|
7
|
-
"Project-Id-Version: Odoo Server
|
|
7
|
+
"Project-Id-Version: Odoo Server 17.0\n"
|
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
|
9
9
|
"Last-Translator: \n"
|
|
10
10
|
"Language-Team: \n"
|
|
@@ -23,11 +23,6 @@ msgstr ""
|
|
|
23
23
|
msgid "Phone numbers"
|
|
24
24
|
msgstr ""
|
|
25
25
|
|
|
26
|
-
#. module: base_view_inheritance_extension
|
|
27
|
-
#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search
|
|
28
|
-
msgid "Smart Search"
|
|
29
|
-
msgstr ""
|
|
30
|
-
|
|
31
26
|
#. module: base_view_inheritance_extension
|
|
32
27
|
#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view
|
|
33
28
|
msgid "View"
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
# Copyright 2016 Therp BV <https://therp.nl>
|
|
2
2
|
# Copyright 2018 Tecnativa - Sergio Teruel
|
|
3
3
|
# Copyright 2021 Camptocamp SA (https://www.camptocamp.com).
|
|
4
|
+
# Copyright 2023 Tecnativa - Carlos Dauden
|
|
4
5
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
|
5
6
|
|
|
6
7
|
import ast
|
|
8
|
+
import re
|
|
7
9
|
|
|
8
10
|
import astor
|
|
9
11
|
from lxml import etree
|
|
10
12
|
|
|
11
13
|
from odoo import api, models
|
|
14
|
+
from odoo.osv import expression
|
|
12
15
|
|
|
13
16
|
|
|
14
17
|
def ast_dict_update(source, update):
|
|
@@ -128,3 +131,75 @@ class IrUiView(models.Model):
|
|
|
128
131
|
pretty_source=lambda s: "".join(s).strip(),
|
|
129
132
|
)
|
|
130
133
|
return source
|
|
134
|
+
|
|
135
|
+
@api.model
|
|
136
|
+
def inheritance_handler_attributes_text_add(self, source, specs):
|
|
137
|
+
"""Implement
|
|
138
|
+
<$node position="attributes">
|
|
139
|
+
<attribute name="$attribute" operation="text_add">
|
|
140
|
+
$text_before {old_value} $text_after
|
|
141
|
+
</attribute>
|
|
142
|
+
</$node>"""
|
|
143
|
+
node = self.locate_node(source, specs)
|
|
144
|
+
for attribute_node in specs:
|
|
145
|
+
attribute_name = attribute_node.get("name")
|
|
146
|
+
old_value = node.get(attribute_name) or ""
|
|
147
|
+
node.attrib[attribute_name] = attribute_node.text.format(
|
|
148
|
+
old_value=old_value
|
|
149
|
+
)
|
|
150
|
+
return source
|
|
151
|
+
|
|
152
|
+
@api.model
|
|
153
|
+
def inheritance_handler_attributes_domain_add(self, source, specs):
|
|
154
|
+
"""Implement
|
|
155
|
+
<$node position="attributes">
|
|
156
|
+
<attribute name="$attribute" operation="domain_add"
|
|
157
|
+
condition="$field_condition" join_operator="OR">
|
|
158
|
+
$domain_to_add
|
|
159
|
+
</attribute>
|
|
160
|
+
</$node>"""
|
|
161
|
+
node = self.locate_node(source, specs)
|
|
162
|
+
for attribute_node in specs:
|
|
163
|
+
attribute_name = attribute_node.get("name")
|
|
164
|
+
condition = attribute_node.get("condition")
|
|
165
|
+
join_operator = attribute_node.get("join_operator") or "AND"
|
|
166
|
+
old_value = node.get(attribute_name) or ""
|
|
167
|
+
if old_value:
|
|
168
|
+
old_domain = ast.literal_eval(
|
|
169
|
+
self.var2str_domain_text(old_value.strip())
|
|
170
|
+
)
|
|
171
|
+
new_domain = ast.literal_eval(
|
|
172
|
+
self.var2str_domain_text(attribute_node.text.strip())
|
|
173
|
+
)
|
|
174
|
+
if join_operator == "OR":
|
|
175
|
+
new_value = str(expression.OR([old_domain, new_domain]))
|
|
176
|
+
else:
|
|
177
|
+
new_value = str(expression.AND([old_domain, new_domain]))
|
|
178
|
+
new_value = self.str2var_domain_text(new_value)
|
|
179
|
+
else:
|
|
180
|
+
# We must ensure that the domain definition has not line breaks because
|
|
181
|
+
# in update mode the domain cause an invalid syntax error
|
|
182
|
+
new_value = attribute_node.text.strip()
|
|
183
|
+
if condition:
|
|
184
|
+
new_value = f"{condition} and {new_value} or {old_value or []}"
|
|
185
|
+
node.attrib[attribute_name] = new_value
|
|
186
|
+
return source
|
|
187
|
+
|
|
188
|
+
@api.model
|
|
189
|
+
def var2str_domain_text(self, domain_str):
|
|
190
|
+
"""Replaces var names with str names to allow eval without defined vars"""
|
|
191
|
+
# Replace fields in 2 steps because 1 step returns "parent_sufix"."var_sufix"
|
|
192
|
+
regex_parent = re.compile(r"parent\.(\b\w+\b)")
|
|
193
|
+
domain_str = re.sub(
|
|
194
|
+
regex_parent, r"'parent.\1_is_a_var_to_replace'", domain_str
|
|
195
|
+
)
|
|
196
|
+
regex = re.compile(r"(?<!\')(\b\w+\b)(?!\')")
|
|
197
|
+
return re.sub(regex, r"'\1_is_a_var_to_replace'", domain_str)
|
|
198
|
+
|
|
199
|
+
@api.model
|
|
200
|
+
def str2var_domain_text(self, domain_str):
|
|
201
|
+
"""Revert var2str_domain_text cleaning apostrophes and suffix in vars"""
|
|
202
|
+
pattern = re.compile(r"'(parent\.[^']+)_is_a_var_to_replace'")
|
|
203
|
+
domain_str = pattern.sub(r"\1", domain_str)
|
|
204
|
+
pattern = re.compile(r"'([^']+)_is_a_var_to_replace'")
|
|
205
|
+
return pattern.sub(r"\1", domain_str)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
This module was written to make it simple to add custom operators for
|
|
2
|
-
inheritance.
|
|
1
|
+
This module was written to make it simple to add custom operators for
|
|
2
|
+
view inheritance.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- Support an `eval` attribute for our new node types.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
**Change a python dictionary (context for example)**
|
|
2
|
+
|
|
3
|
+
``` xml
|
|
4
|
+
<field position="attributes">
|
|
5
|
+
<attribute name="context" operation="update">
|
|
6
|
+
{
|
|
7
|
+
"key": "value",
|
|
8
|
+
}
|
|
9
|
+
</attribute>
|
|
10
|
+
</field>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Note that views are subject to evaluation of xmlids anyways, so if you
|
|
14
|
+
need to refer to some xmlid, say `%(xmlid)s`.
|
|
15
|
+
|
|
16
|
+
**Add text after and/or before than original**
|
|
17
|
+
|
|
18
|
+
``` xml
|
|
19
|
+
<attribute name="$attribute" operation="text_add">
|
|
20
|
+
$text_before {old_value} $text_after
|
|
21
|
+
</attribute>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Add domain with AND/OR join operator (AND if missed) allowing
|
|
25
|
+
conditional changes**
|
|
26
|
+
|
|
27
|
+
``` xml
|
|
28
|
+
<attribute name="$attribute" operation="domain_add"
|
|
29
|
+
condition="$field_condition" join_operator="OR">
|
|
30
|
+
$domain_to_add
|
|
31
|
+
</attribute>
|
|
32
|
+
```
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
2
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
3
|
<head>
|
|
@@ -367,11 +366,11 @@ ul.auto-toc {
|
|
|
367
366
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
367
|
!! changes will be overwritten. !!
|
|
369
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
369
|
+
!! source digest: sha256:cc3eeb2e6514c28a74085cfaf6c72c75677d641778f0fcf248155f48600ac86f
|
|
371
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/
|
|
373
|
-
<p>This module was written to make it simple to add custom operators for
|
|
374
|
-
inheritance.</p>
|
|
371
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_view_inheritance_extension"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
372
|
+
<p>This module was written to make it simple to add custom operators for
|
|
373
|
+
view inheritance.</p>
|
|
375
374
|
<p><strong>Table of contents</strong></p>
|
|
376
375
|
<div class="contents local topic" id="contents">
|
|
377
376
|
<ul class="simple">
|
|
@@ -398,8 +397,22 @@ inheritance.</p>
|
|
|
398
397
|
</span><span class="nt"></attribute></span><span class="w">
|
|
399
398
|
</span><span class="nt"></field></span>
|
|
400
399
|
</pre>
|
|
401
|
-
<p>Note that views are subject to evaluation of xmlids anyways, so if you
|
|
402
|
-
to refer to some xmlid, say <tt class="docutils literal">%(xmlid)s</tt>.</p>
|
|
400
|
+
<p>Note that views are subject to evaluation of xmlids anyways, so if you
|
|
401
|
+
need to refer to some xmlid, say <tt class="docutils literal">%(xmlid)s</tt>.</p>
|
|
402
|
+
<p><strong>Add text after and/or before than original</strong></p>
|
|
403
|
+
<pre class="code xml literal-block">
|
|
404
|
+
<span class="nt"><attribute</span><span class="w"> </span><span class="na">name=</span><span class="s">"$attribute"</span><span class="w"> </span><span class="na">operation=</span><span class="s">"text_add"</span><span class="nt">></span><span class="w">
|
|
405
|
+
</span>$text_before<span class="w"> </span>{old_value}<span class="w"> </span>$text_after<span class="w">
|
|
406
|
+
</span><span class="nt"></attribute></span>
|
|
407
|
+
</pre>
|
|
408
|
+
<p><strong>Add domain with AND/OR join operator (AND if missed) allowing
|
|
409
|
+
conditional changes</strong></p>
|
|
410
|
+
<pre class="code xml literal-block">
|
|
411
|
+
<span class="nt"><attribute</span><span class="w"> </span><span class="na">name=</span><span class="s">"$attribute"</span><span class="w"> </span><span class="na">operation=</span><span class="s">"domain_add"</span><span class="w">
|
|
412
|
+
</span><span class="na">condition=</span><span class="s">"$field_condition"</span><span class="w"> </span><span class="na">join_operator=</span><span class="s">"OR"</span><span class="nt">></span><span class="w">
|
|
413
|
+
</span>$domain_to_add<span class="w">
|
|
414
|
+
</span><span class="nt"></attribute></span>
|
|
415
|
+
</pre>
|
|
403
416
|
</div>
|
|
404
417
|
<div class="section" id="known-issues-roadmap">
|
|
405
418
|
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
|
@@ -412,7 +425,7 @@ to refer to some xmlid, say <tt class="docutils literal">%(xmlid)s</tt>.</p>
|
|
|
412
425
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
|
|
413
426
|
In case of trouble, please check there if your issue has already been reported.
|
|
414
427
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
415
|
-
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%
|
|
428
|
+
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
416
429
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
417
430
|
</div>
|
|
418
431
|
<div class="section" id="credits">
|
|
@@ -428,7 +441,11 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
428
441
|
<ul class="simple">
|
|
429
442
|
<li>Holger Brunn <<a class="reference external" href="mailto:hbrunn@therp.nl">hbrunn@therp.nl</a>></li>
|
|
430
443
|
<li>Ronald Portier <<a class="reference external" href="mailto:rportier@therp.nl">rportier@therp.nl</a>></li>
|
|
431
|
-
<li
|
|
444
|
+
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
|
445
|
+
<li>Sergio Teruel</li>
|
|
446
|
+
<li>Carlos Dauden</li>
|
|
447
|
+
</ul>
|
|
448
|
+
</li>
|
|
432
449
|
<li>Iván Todorovich <<a class="reference external" href="mailto:ivan.todorovich@camptocamp.com">ivan.todorovich@camptocamp.com</a>></li>
|
|
433
450
|
</ul>
|
|
434
451
|
</div>
|
|
@@ -439,7 +456,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
439
456
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
440
457
|
mission is to support the collaborative development of Odoo features and
|
|
441
458
|
promote its widespread use.</p>
|
|
442
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/
|
|
459
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension">OCA/server-tools</a> project on GitHub.</p>
|
|
443
460
|
<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>
|
|
444
461
|
</div>
|
|
445
462
|
</div>
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name: odoo-addon-
|
|
3
|
-
Version:
|
|
2
|
+
Name: odoo-addon-base_view_inheritance_extension
|
|
3
|
+
Version: 17.0.1.0.0.2
|
|
4
|
+
Requires-Python: >=3.10
|
|
5
|
+
Requires-Dist: astor
|
|
6
|
+
Requires-Dist: odoo>=17.0a,<17.1dev
|
|
4
7
|
Summary: Adds more operators for view inheritance
|
|
5
8
|
Home-page: https://github.com/OCA/server-tools
|
|
9
|
+
License: LGPL-3
|
|
6
10
|
Author: Therp BV,Odoo Community Association (OCA)
|
|
7
11
|
Author-email: support@odoo-community.org
|
|
8
|
-
License: LGPL-3
|
|
9
|
-
Platform: UNKNOWN
|
|
10
12
|
Classifier: Programming Language :: Python
|
|
11
13
|
Classifier: Framework :: Odoo
|
|
12
|
-
Classifier: Framework :: Odoo ::
|
|
14
|
+
Classifier: Framework :: Odoo :: 17.0
|
|
13
15
|
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
14
16
|
Classifier: Development Status :: 6 - Mature
|
|
15
|
-
Requires-Python: >=3.10
|
|
16
|
-
Requires-Dist: astor
|
|
17
|
-
Requires-Dist: odoo <16.1dev,>=16.0a
|
|
18
17
|
|
|
19
18
|
=========================
|
|
20
19
|
Extended view inheritance
|
|
@@ -25,7 +24,7 @@ Extended view inheritance
|
|
|
25
24
|
!! This file is generated by oca-gen-addon-readme !!
|
|
26
25
|
!! changes will be overwritten. !!
|
|
27
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
|
-
!! source digest: sha256:
|
|
27
|
+
!! source digest: sha256:cc3eeb2e6514c28a74085cfaf6c72c75677d641778f0fcf248155f48600ac86f
|
|
29
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30
29
|
|
|
31
30
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
|
|
@@ -35,19 +34,19 @@ Extended view inheritance
|
|
|
35
34
|
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
|
|
36
35
|
:alt: License: LGPL-3
|
|
37
36
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
|
|
38
|
-
:target: https://github.com/OCA/server-tools/tree/
|
|
37
|
+
:target: https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension
|
|
39
38
|
:alt: OCA/server-tools
|
|
40
39
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
41
|
-
:target: https://translation.odoo-community.org/projects/server-tools-
|
|
40
|
+
:target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_view_inheritance_extension
|
|
42
41
|
:alt: Translate me on Weblate
|
|
43
42
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
44
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=
|
|
43
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0
|
|
45
44
|
:alt: Try me on Runboat
|
|
46
45
|
|
|
47
46
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
48
47
|
|
|
49
|
-
This module was written to make it simple to add custom operators for
|
|
50
|
-
inheritance.
|
|
48
|
+
This module was written to make it simple to add custom operators for
|
|
49
|
+
view inheritance.
|
|
51
50
|
|
|
52
51
|
**Table of contents**
|
|
53
52
|
|
|
@@ -59,25 +58,41 @@ Usage
|
|
|
59
58
|
|
|
60
59
|
**Change a python dictionary (context for example)**
|
|
61
60
|
|
|
61
|
+
.. code:: xml
|
|
62
|
+
|
|
63
|
+
<field position="attributes">
|
|
64
|
+
<attribute name="context" operation="update">
|
|
65
|
+
{
|
|
66
|
+
"key": "value",
|
|
67
|
+
}
|
|
68
|
+
</attribute>
|
|
69
|
+
</field>
|
|
62
70
|
|
|
63
|
-
|
|
71
|
+
Note that views are subject to evaluation of xmlids anyways, so if you
|
|
72
|
+
need to refer to some xmlid, say ``%(xmlid)s``.
|
|
64
73
|
|
|
65
|
-
|
|
66
|
-
<attribute name="context" operation="update">
|
|
67
|
-
{
|
|
68
|
-
"key": "value",
|
|
69
|
-
}
|
|
70
|
-
</attribute>
|
|
71
|
-
</field>
|
|
74
|
+
**Add text after and/or before than original**
|
|
72
75
|
|
|
76
|
+
.. code:: xml
|
|
73
77
|
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
<attribute name="$attribute" operation="text_add">
|
|
79
|
+
$text_before {old_value} $text_after
|
|
80
|
+
</attribute>
|
|
81
|
+
|
|
82
|
+
**Add domain with AND/OR join operator (AND if missed) allowing
|
|
83
|
+
conditional changes**
|
|
84
|
+
|
|
85
|
+
.. code:: xml
|
|
86
|
+
|
|
87
|
+
<attribute name="$attribute" operation="domain_add"
|
|
88
|
+
condition="$field_condition" join_operator="OR">
|
|
89
|
+
$domain_to_add
|
|
90
|
+
</attribute>
|
|
76
91
|
|
|
77
92
|
Known issues / Roadmap
|
|
78
93
|
======================
|
|
79
94
|
|
|
80
|
-
|
|
95
|
+
- Support an ``eval`` attribute for our new node types.
|
|
81
96
|
|
|
82
97
|
Bug Tracker
|
|
83
98
|
===========
|
|
@@ -85,7 +100,7 @@ Bug Tracker
|
|
|
85
100
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
|
|
86
101
|
In case of trouble, please check there if your issue has already been reported.
|
|
87
102
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
88
|
-
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%
|
|
103
|
+
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20base_view_inheritance_extension%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
89
104
|
|
|
90
105
|
Do not contact contributors directly about support or help with technical issues.
|
|
91
106
|
|
|
@@ -93,20 +108,24 @@ Credits
|
|
|
93
108
|
=======
|
|
94
109
|
|
|
95
110
|
Authors
|
|
96
|
-
|
|
111
|
+
-------
|
|
97
112
|
|
|
98
113
|
* Therp BV
|
|
99
114
|
|
|
100
115
|
Contributors
|
|
101
|
-
|
|
116
|
+
------------
|
|
117
|
+
|
|
118
|
+
- Holger Brunn <hbrunn@therp.nl>
|
|
119
|
+
- Ronald Portier <rportier@therp.nl>
|
|
120
|
+
- `Tecnativa <https://www.tecnativa.com>`__:
|
|
102
121
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
122
|
+
- Sergio Teruel
|
|
123
|
+
- Carlos Dauden
|
|
124
|
+
|
|
125
|
+
- Iván Todorovich <ivan.todorovich@camptocamp.com>
|
|
107
126
|
|
|
108
127
|
Maintainers
|
|
109
|
-
|
|
128
|
+
-----------
|
|
110
129
|
|
|
111
130
|
This module is maintained by the OCA.
|
|
112
131
|
|
|
@@ -118,8 +137,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
118
137
|
mission is to support the collaborative development of Odoo features and
|
|
119
138
|
promote its widespread use.
|
|
120
139
|
|
|
121
|
-
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/
|
|
140
|
+
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension>`_ project on GitHub.
|
|
122
141
|
|
|
123
142
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
124
|
-
|
|
125
|
-
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
odoo/addons/base_view_inheritance_extension/README.rst,sha256=
|
|
1
|
+
odoo/addons/base_view_inheritance_extension/README.rst,sha256=fdZDk9SE5ShC-08XrqHevheeem4_cyX8kB40NeXqdtc,4035
|
|
2
2
|
odoo/addons/base_view_inheritance_extension/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
-
odoo/addons/base_view_inheritance_extension/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/base_view_inheritance_extension/__manifest__.py,sha256=PSczUq_IZiBVrmXP1mZvBdICJAuYzoiv3VWAbHjI7aE,616
|
|
4
4
|
odoo/addons/base_view_inheritance_extension/demo/ir_ui_view.xml,sha256=MHPVOGOM6XnNOTsq0ylz1B5r0sPJpRKHLan3K2mZ6sA,1200
|
|
5
|
-
odoo/addons/base_view_inheritance_extension/i18n/base_view_inheritance_extension.pot,sha256=
|
|
5
|
+
odoo/addons/base_view_inheritance_extension/i18n/base_view_inheritance_extension.pot,sha256=B5ae18bfXVMomBlVh0Bf5Su6Q5urtlT2bKWa0Rav7UE,850
|
|
6
6
|
odoo/addons/base_view_inheritance_extension/i18n/ca.po,sha256=7ncEf2XfOWoOIlU7jysZhKYtd1KEF7oUHABgxJeEm9Q,1443
|
|
7
7
|
odoo/addons/base_view_inheritance_extension/i18n/de.po,sha256=yaXLt5LJ08bt1zv4h76aKSH0blNmlHOW8ZMI34VOix8,1364
|
|
8
8
|
odoo/addons/base_view_inheritance_extension/i18n/es.po,sha256=iQy3KiLd16FHheppaA1xkRNV7uFkkBiNAGw7wlVIwYE,1458
|
|
@@ -12,16 +12,16 @@ odoo/addons/base_view_inheritance_extension/i18n/it.po,sha256=342XK5tLJJavpToQ_T
|
|
|
12
12
|
odoo/addons/base_view_inheritance_extension/i18n/sl.po,sha256=YjMtgl3N0bkOH8ngh_FMy7m-vxpNXt12WWiHYSmnFhY,1446
|
|
13
13
|
odoo/addons/base_view_inheritance_extension/i18n/tr.po,sha256=S3G6M2N5DNbiTpctuhlJ14hfKa_BJ_v0Ju-4cHu7eQQ,1453
|
|
14
14
|
odoo/addons/base_view_inheritance_extension/models/__init__.py,sha256=SjKfc8ocbCImvP5DpGQbS0hWmQRYPjtzJdyio6TPII0,25
|
|
15
|
-
odoo/addons/base_view_inheritance_extension/models/ir_ui_view.py,sha256=
|
|
16
|
-
odoo/addons/base_view_inheritance_extension/readme/CONTRIBUTORS.
|
|
17
|
-
odoo/addons/base_view_inheritance_extension/readme/DESCRIPTION.
|
|
18
|
-
odoo/addons/base_view_inheritance_extension/readme/ROADMAP.
|
|
19
|
-
odoo/addons/base_view_inheritance_extension/readme/USAGE.
|
|
15
|
+
odoo/addons/base_view_inheritance_extension/models/ir_ui_view.py,sha256=utESRn6fjo0Xt6YFlmM4yprEemfgpYYpBAsVjU3IVCU,8043
|
|
16
|
+
odoo/addons/base_view_inheritance_extension/readme/CONTRIBUTORS.md,sha256=AplbG1Uhen3Vibr66YJ5c3DidJ2dCK6dWORzEOc_De8,212
|
|
17
|
+
odoo/addons/base_view_inheritance_extension/readme/DESCRIPTION.md,sha256=TC-vXmaSQ5oo7nNl5jxSyurQiz2597hDzQirRGw73BI,88
|
|
18
|
+
odoo/addons/base_view_inheritance_extension/readme/ROADMAP.md,sha256=79XqQ49EvpKp11-P-rimu8Mwklpwor3rkWKFPym9YbA,54
|
|
19
|
+
odoo/addons/base_view_inheritance_extension/readme/USAGE.md,sha256=g7ZkBJmm4ldDD-tkQjlzW7WpvssmBi23Dj2KCUuxlug,748
|
|
20
20
|
odoo/addons/base_view_inheritance_extension/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
21
|
-
odoo/addons/base_view_inheritance_extension/static/description/index.html,sha256=
|
|
21
|
+
odoo/addons/base_view_inheritance_extension/static/description/index.html,sha256=NKB4v7yaNi9y-0p83FUCLRfuWHPZVtun_3ANMOUyh4E,15436
|
|
22
22
|
odoo/addons/base_view_inheritance_extension/tests/__init__.py,sha256=kTcGsgnWhpM7vII3sEdNX5XVxDHHqRc5KdrxInG6GSw,51
|
|
23
23
|
odoo/addons/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py,sha256=vl07csg7Q9ZNtlnOgnL3AiyNEo7OHpcSdhxULPZuV5k,8618
|
|
24
|
-
odoo_addon_base_view_inheritance_extension-
|
|
25
|
-
odoo_addon_base_view_inheritance_extension-
|
|
26
|
-
odoo_addon_base_view_inheritance_extension-
|
|
27
|
-
odoo_addon_base_view_inheritance_extension-
|
|
24
|
+
odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info/METADATA,sha256=-Npc5Ye-gyBwPyaEQhnBtOWfyS64aqfLsGwjaGHqn1k,4655
|
|
25
|
+
odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info/WHEEL,sha256=0WPb27lpWF0K4Majm_kVmkl1QxJZxoKxO5GGil8gPB4,81
|
|
26
|
+
odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
27
|
+
odoo_addon_base_view_inheritance_extension-17.0.1.0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* Support an ``eval`` attribute for our new node types.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
**Change a python dictionary (context for example)**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
.. code-block:: xml
|
|
5
|
-
|
|
6
|
-
<field position="attributes">
|
|
7
|
-
<attribute name="context" operation="update">
|
|
8
|
-
{
|
|
9
|
-
"key": "value",
|
|
10
|
-
}
|
|
11
|
-
</attribute>
|
|
12
|
-
</field>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Note that views are subject to evaluation of xmlids anyways, so if you need
|
|
16
|
-
to refer to some xmlid, say ``%(xmlid)s``.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
odoo
|