mirror of https://github.com/OCA/web.git
[MIG] web_widget_dropdown_dynamic: Migration to 13.0
parent
dce8707813
commit
88d09ba309
|
@ -14,13 +14,13 @@ Dynamic Dropdown Widget
|
||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
||||||
:target: https://github.com/OCA/web/tree/12.0/web_widget_dropdown_dynamic
|
:target: https://github.com/OCA/web/tree/13.0/web_widget_dropdown_dynamic
|
||||||
:alt: OCA/web
|
:alt: OCA/web
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_dropdown_dynamic
|
:target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_widget_dropdown_dynamic
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
:target: https://runbot.odoo-community.org/runbot/162/12.0
|
:target: https://runbot.odoo-community.org/runbot/162/13.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
@ -68,18 +68,13 @@ Usage
|
||||||
context="{'depending_on': other_field}"
|
context="{'depending_on': other_field}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
Known issues / Roadmap
|
|
||||||
======================
|
|
||||||
|
|
||||||
* In v13, ``$.when`` is going to become `Promise.resolve`
|
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
|
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.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_dropdown_dynamic%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_dropdown_dynamic%0Aversion:%2013.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.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
@ -109,6 +104,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/12.0/web_widget_dropdown_dynamic>`_ project on GitHub.
|
This module is part of the `OCA/web <https://github.com/OCA/web/tree/13.0/web_widget_dropdown_dynamic>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
|
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
{
|
{
|
||||||
"name": "Dynamic Dropdown Widget",
|
"name": "Dynamic Dropdown Widget",
|
||||||
"summary": "This module adds support for dynamic dropdown widget",
|
"summary": "This module adds support for dynamic dropdown widget",
|
||||||
"category": "Web",
|
"category": "Web",
|
||||||
"version": "12.0.1.0.0",
|
"version": "13.0.1.0.0",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "Brainbean Apps OU, Odoo Community Association (OCA)",
|
"author": "Brainbean Apps OU, Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/web/",
|
"website": "https://github.com/OCA/web/",
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 12.0\n"
|
"Project-Id-Version: Odoo Server 13.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -15,8 +15,7 @@ msgstr ""
|
||||||
|
|
||||||
#. module: web_widget_dropdown_dynamic
|
#. module: web_widget_dropdown_dynamic
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/web_widget_dropdown_dynamic/static/src/js/field_dynamic_dropdown.js:15
|
#: code:addons/web_widget_dropdown_dynamic/static/src/js/field_dynamic_dropdown.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Dynamic Dropdown"
|
msgid "Dynamic Dropdown"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
* In v13, ``$.when`` is going to become `Promise.resolve`
|
|
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<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/12.0/web_widget_dropdown_dynamic"><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-12-0/web-12-0-web_widget_dropdown_dynamic"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<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/13.0/web_widget_dropdown_dynamic"><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-13-0/web-13-0-web_widget_dropdown_dynamic"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>Dynamic dropdown widget that supports resolving options from backend of:</p>
|
<p>Dynamic dropdown widget that supports resolving options from backend of:</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
@ -383,12 +383,11 @@ instead.</p>
|
||||||
<div class="contents local topic" id="contents">
|
<div class="contents local topic" id="contents">
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
|
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
|
||||||
<li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</a></li>
|
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
|
||||||
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
|
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
|
||||||
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
|
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
|
||||||
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
|
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
|
||||||
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
|
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
|
||||||
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -419,44 +418,36 @@ instead.</p>
|
||||||
<span class="nt">/></span>
|
<span class="nt">/></span>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="known-issues-roadmap">
|
|
||||||
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
|
|
||||||
<blockquote>
|
|
||||||
<ul class="simple">
|
|
||||||
<li>In v13, <tt class="docutils literal">$.when</tt> is going to become <cite>Promise.resolve</cite></li>
|
|
||||||
</ul>
|
|
||||||
</blockquote>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="bug-tracker">
|
<div class="section" id="bug-tracker">
|
||||||
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
|
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
|
||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_dropdown_dynamic%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_dropdown_dynamic%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
|
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
|
||||||
<div class="section" id="authors">
|
<div class="section" id="authors">
|
||||||
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
|
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Brainbean Apps OU</li>
|
<li>Brainbean Apps OU</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="contributors">
|
<div class="section" id="contributors">
|
||||||
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Alexey Pelykh <<a class="reference external" href="mailto:alexey.pelykh@brainbeanapps.com">alexey.pelykh@brainbeanapps.com</a>></li>
|
<li>Alexey Pelykh <<a class="reference external" href="mailto:alexey.pelykh@brainbeanapps.com">alexey.pelykh@brainbeanapps.com</a>></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
|
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
|
||||||
<p>This module is maintained by the OCA.</p>
|
<p>This module is maintained by the OCA.</p>
|
||||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_dropdown_dynamic">OCA/web</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/13.0/web_widget_dropdown_dynamic">OCA/web</a> project on GitHub.</p>
|
||||||
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
|
* Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
|
||||||
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
*/
|
*/
|
||||||
odoo.define("web_widget_dropdown_dynamic.basic_model", function(require) {
|
odoo.define("web_widget_dropdown_dynamic.basic_model", function(require) {
|
||||||
|
@ -24,7 +24,7 @@ odoo.define("web_widget_dropdown_dynamic.basic_model", function(require) {
|
||||||
var model = fieldInfo.options.model || record.model;
|
var model = fieldInfo.options.model || record.model;
|
||||||
var method = fieldInfo.values || fieldInfo.options.values;
|
var method = fieldInfo.values || fieldInfo.options.values;
|
||||||
if (!method) {
|
if (!method) {
|
||||||
return $.when();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
var context = record.getContext({fieldName: fieldName});
|
var context = record.getContext({fieldName: fieldName});
|
||||||
|
@ -34,7 +34,7 @@ odoo.define("web_widget_dropdown_dynamic.basic_model", function(require) {
|
||||||
context: context,
|
context: context,
|
||||||
});
|
});
|
||||||
if (!hasChanged) {
|
if (!hasChanged) {
|
||||||
return $.when();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._rpc({
|
return this._rpc({
|
||||||
|
|
|
@ -29,7 +29,7 @@ odoo.define("web_widget_dropdown_dynamic.web_widget_dropdown_dynamic_tests", fun
|
||||||
"</form>",
|
"</form>",
|
||||||
mockRPC: function(route, args) {
|
mockRPC: function(route, args) {
|
||||||
if (args.method === "_get_test_field_values") {
|
if (args.method === "_get_test_field_values") {
|
||||||
return $.when([["value", "Title"]]);
|
return Promise.resolve([["value", "Title"]]);
|
||||||
}
|
}
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
@ -61,7 +61,7 @@ odoo.define("web_widget_dropdown_dynamic.web_widget_dropdown_dynamic_tests", fun
|
||||||
"</form>",
|
"</form>",
|
||||||
mockRPC: function(route, args) {
|
mockRPC: function(route, args) {
|
||||||
if (args.method === "_get_test_field_values") {
|
if (args.method === "_get_test_field_values") {
|
||||||
return $.when([[0, "Title"]]);
|
return Promise.resolve([[0, "Title"]]);
|
||||||
}
|
}
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
@ -95,7 +95,7 @@ odoo.define("web_widget_dropdown_dynamic.web_widget_dropdown_dynamic_tests", fun
|
||||||
"</form>",
|
"</form>",
|
||||||
mockRPC: function(route, args) {
|
mockRPC: function(route, args) {
|
||||||
if (args.method === "_get_test_field_values") {
|
if (args.method === "_get_test_field_values") {
|
||||||
return $.when([["value", "Title"]]);
|
return Promise.resolve([["value", "Title"]]);
|
||||||
}
|
}
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
@ -130,14 +130,14 @@ odoo.define("web_widget_dropdown_dynamic.web_widget_dropdown_dynamic_tests", fun
|
||||||
mockRPC: function(route, args) {
|
mockRPC: function(route, args) {
|
||||||
if (args.method === "_get_test_field_values") {
|
if (args.method === "_get_test_field_values") {
|
||||||
if (args.kwargs.context.step === "step-1") {
|
if (args.kwargs.context.step === "step-1") {
|
||||||
return $.when([["value", "Title"]]);
|
return Promise.resolve([["value", "Title"]]);
|
||||||
} else if (args.kwargs.context.step === "step-2") {
|
} else if (args.kwargs.context.step === "step-2") {
|
||||||
return $.when([
|
return Promise.resolve([
|
||||||
["value", "Title"],
|
["value", "Title"],
|
||||||
["value_2", "Title 2"],
|
["value_2", "Title 2"],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
return $.when([]);
|
return Promise.resolve([]);
|
||||||
}
|
}
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue