forked from Techsystech/web
[MIG] web_domain_field: Migration to 11.0
parent
4613c6e3d7
commit
f95ef19bd6
|
@ -65,7 +65,7 @@ Usage
|
||||||
|
|
||||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
:target: https://runbot.odoo-community.org/runbot/162/10.0
|
:target: https://runbot.odoo-community.org/runbot/162/11.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ Contributors
|
||||||
|
|
||||||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||||
* Denis Roussel <denis.roussel@acsone.eu>
|
* Denis Roussel <denis.roussel@acsone.eu>
|
||||||
|
* Martín Nicolás Cuesta <cuesta.martin.n@hotmail.com>
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2017 ACSONE SA/NV
|
# Copyright 2017 ACSONE SA/NV
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
@ -6,7 +5,7 @@
|
||||||
'name': 'Web Domain Field',
|
'name': 'Web Domain Field',
|
||||||
'summary': """
|
'summary': """
|
||||||
Use computed field as domain""",
|
Use computed field as domain""",
|
||||||
'version': '10.0.1.0.0',
|
'version': '11.0.1.0.0',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'author': 'ACSONE SA/NV,Odoo Community Association (OCA)',
|
'author': 'ACSONE SA/NV,Odoo Community Association (OCA)',
|
||||||
'website': 'https://acsone.eu/',
|
'website': 'https://acsone.eu/',
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 10.0\n"
|
"Project-Id-Version: Odoo Server 11.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||||
|
* Denis Roussel <denis.roussel@acsone.eu>
|
||||||
|
* Martín Nicolás Cuesta <cuesta.martin.n@hotmail.com>
|
|
@ -0,0 +1,3 @@
|
||||||
|
In order to mitigate limitations with domains in views, now you can define
|
||||||
|
a computed field in a domain attribute and It's related method will return
|
||||||
|
the domain to apply.
|
|
@ -47,7 +47,7 @@ var wrapping_dict = py.type('wrapping_dict', null, {
|
||||||
return this.__getitem__(py.str.fromJSON(key));
|
return this.__getitem__(py.str.fromJSON(key));
|
||||||
},
|
},
|
||||||
__len__: function () {
|
__len__: function () {
|
||||||
return Object.keys(this._store).length
|
return Object.keys(this._store).length;
|
||||||
},
|
},
|
||||||
__nonzero__: function () {
|
__nonzero__: function () {
|
||||||
return py.PY_size(this) > 0 ? py.True : py.False;
|
return py.PY_size(this) > 0 ? py.True : py.False;
|
||||||
|
@ -99,8 +99,7 @@ function wrap_context (context) {
|
||||||
if (val === null) { continue; }
|
if (val === null) { continue; }
|
||||||
if (val.constructor === Array) {
|
if (val.constructor === Array) {
|
||||||
context[k] = wrapping_list.fromJSON(val);
|
context[k] = wrapping_list.fromJSON(val);
|
||||||
} else if (val.constructor === Object
|
} else if (val.constructor === Object && !py.PY_isInstance(val, py.object)) {
|
||||||
&& !py.PY_isInstance(val, py.object)) {
|
|
||||||
context[k] = wrapping_dict.fromJSON(val);
|
context[k] = wrapping_dict.fromJSON(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,4 +229,4 @@ pyeval.eval = domain_field_pyeval;
|
||||||
pyeval.ensure_evaluated = ensure_evaluated;
|
pyeval.ensure_evaluated = ensure_evaluated;
|
||||||
pyeval.sync_eval_domains_and_contexts = sync_eval_domains_and_contexts;
|
pyeval.sync_eval_domains_and_contexts = sync_eval_domains_and_contexts;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
<script type="text/javascript" src="/web_domain_field/static/src/js/pyeval.js" />
|
<script type="text/javascript" src="/web_domain_field/static/src/js/pyeval.js" />
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
Loading…
Reference in New Issue