mirror of https://github.com/OCA/web.git
[MIG] web_widget_domain_editor_dialog: Migration to 15.0
parent
53858f2ca8
commit
220d35ecd1
|
@ -14,13 +14,13 @@ Web Widget Domain Editor Dialog
|
|||
: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/14.0/web_widget_domain_editor_dialog
|
||||
:target: https://github.com/OCA/web/tree/15.0/web_widget_domain_editor_dialog
|
||||
:alt: OCA/web
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_widget_domain_editor_dialog
|
||||
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_widget_domain_editor_dialog
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/162/14.0
|
||||
:target: https://runbot.odoo-community.org/runbot/162/15.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
@ -57,7 +57,7 @@ with a user filter:
|
|||
|
||||
You can still edit the filter with Odoo's widget after that.
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/web/14.0/web_widget_domain_editor_dialog/static/src/img/behaviour.gif
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/web/15.0/web_widget_domain_editor_dialog/static/src/img/behaviour.gif
|
||||
:align: center
|
||||
:width: 600 px
|
||||
|
||||
|
@ -67,7 +67,7 @@ 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 smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_domain_editor_dialog%0Aversion:%2014.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_domain_editor_dialog%0Aversion:%2015.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.
|
||||
|
||||
|
@ -90,6 +90,7 @@ Contributors
|
|||
|
||||
* Darshan Patel <darshan.barcelona@gmail.com>
|
||||
* Helly kapatel <helly.kapatel@initos.com>
|
||||
* Carlos Lopez <celm1990@gmail.com>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
@ -104,6 +105,6 @@ 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/14.0/web_widget_domain_editor_dialog>`_ project on GitHub.
|
||||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/15.0/web_widget_domain_editor_dialog>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
|
@ -3,12 +3,16 @@
|
|||
{
|
||||
"name": "Web Widget Domain Editor Dialog",
|
||||
"summary": "Recovers the Domain Editor Dialog functionality",
|
||||
"version": "14.0.1.0.0",
|
||||
"version": "15.0.1.0.0",
|
||||
"category": "Web",
|
||||
"author": "Tecnativa," "Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/web",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["web"],
|
||||
"data": ["views/templates.xml"],
|
||||
"assets": {
|
||||
"web.assets_backend": [
|
||||
"/web_widget_domain_editor_dialog/static/src/js/*.js",
|
||||
],
|
||||
},
|
||||
"installable": True,
|
||||
}
|
||||
|
|
|
@ -6,3 +6,4 @@
|
|||
|
||||
* Darshan Patel <darshan.barcelona@gmail.com>
|
||||
* Helly kapatel <helly.kapatel@initos.com>
|
||||
* Carlos Lopez <celm1990@gmail.com>
|
||||
|
|
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
|||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! 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/14.0/web_widget_domain_editor_dialog"><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-14-0/web-14-0-web_widget_domain_editor_dialog"><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/14.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/15.0/web_widget_domain_editor_dialog"><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-15-0/web-15-0-web_widget_domain_editor_dialog"><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/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Since v11 introduced the new domain editor widget it’s not possible to edit
|
||||
the selected records from the current domain.</p>
|
||||
<p>This module reintroduces that dialog to complement the current widget with the
|
||||
|
@ -408,7 +408,7 @@ records and those unfolded groups will be set as filters to.</li>
|
|||
</blockquote>
|
||||
<p>You can still edit the filter with Odoo’s widget after that.</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="https://raw.githubusercontent.com/OCA/web/14.0/web_widget_domain_editor_dialog/static/src/img/behaviour.gif" src="https://raw.githubusercontent.com/OCA/web/14.0/web_widget_domain_editor_dialog/static/src/img/behaviour.gif" style="width: 600px;" />
|
||||
<img alt="https://raw.githubusercontent.com/OCA/web/15.0/web_widget_domain_editor_dialog/static/src/img/behaviour.gif" src="https://raw.githubusercontent.com/OCA/web/15.0/web_widget_domain_editor_dialog/static/src/img/behaviour.gif" style="width: 600px;" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
|
@ -416,7 +416,7 @@ records and those unfolded groups will be set as filters to.</li>
|
|||
<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.
|
||||
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_domain_editor_dialog%0Aversion:%2014.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_domain_editor_dialog%0Aversion:%2015.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>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
|
@ -438,6 +438,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
</li>
|
||||
<li>Darshan Patel <<a class="reference external" href="mailto:darshan.barcelona@gmail.com">darshan.barcelona@gmail.com</a>></li>
|
||||
<li>Helly kapatel <<a class="reference external" href="mailto:helly.kapatel@initos.com">helly.kapatel@initos.com</a>></li>
|
||||
<li>Carlos Lopez <<a class="reference external" href="mailto:celm1990@gmail.com">celm1990@gmail.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
|
@ -447,7 +448,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/14.0/web_widget_domain_editor_dialog">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/15.0/web_widget_domain_editor_dialog">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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
odoo.define("web_widget_domain_editor_dialog.basic_fields", function (require) {
|
||||
"use strict";
|
||||
|
||||
const core = require("web.core");
|
||||
const basic_fields = require("web.basic_fields");
|
||||
const {_t} = require("web.core");
|
||||
const {FieldDomain} = require("web.basic_fields");
|
||||
const DomainEditorDialog = require("web_widget_domain_editor_dialog.DomainEditorDialog");
|
||||
const _t = core._t;
|
||||
|
||||
basic_fields.FieldDomain.include({
|
||||
FieldDomain.include({
|
||||
_onShowSelectionButtonClick: function (event) {
|
||||
event.preventDefault();
|
||||
const _this = this;
|
||||
|
@ -30,9 +29,11 @@ odoo.define("web_widget_domain_editor_dialog.basic_fields", function (require) {
|
|||
_this.domainSelector
|
||||
.setDomain(this.get_domain(selected_ids))
|
||||
.then(_this._replaceContent.bind(_this));
|
||||
_this.trigger_up("domain_changed", {
|
||||
// Trigger from domainSelector instead of _this
|
||||
// for execute https://github.com/odoo/odoo/blob/15.0/addons/web/static/src/legacy/js/widgets/domain_selector.js#L623
|
||||
_this.domainSelector.trigger_up("domain_changed", {
|
||||
child: _this,
|
||||
alreadyRedrawn: true,
|
||||
noRedraw: true,
|
||||
});
|
||||
},
|
||||
}).open();
|
||||
|
|
|
@ -4,21 +4,19 @@
|
|||
odoo.define("web_widget_domain_editor_dialog.DomainEditorDialog", function (require) {
|
||||
"use strict";
|
||||
|
||||
const core = require("web.core");
|
||||
const view_dialogs = require("web.view_dialogs");
|
||||
const {_t} = require("web.core");
|
||||
const {SelectCreateDialog} = require("web.view_dialogs");
|
||||
const Domain = require("web.Domain");
|
||||
const _t = core._t;
|
||||
|
||||
const DomainEditorDialog = view_dialogs.SelectCreateDialog.extend({
|
||||
const DomainEditorDialog = SelectCreateDialog.extend({
|
||||
init: function () {
|
||||
this._super.apply(this, arguments);
|
||||
const _this = this;
|
||||
this.options = _.defaults(this.options, {
|
||||
dynamicFilters: [
|
||||
{
|
||||
description: _.str.sprintf(_t("Selected domain")),
|
||||
description: _t("Selected domain"),
|
||||
domain: Domain.prototype.stringToArray(
|
||||
_this.options.default_domain
|
||||
this.options.default_domain
|
||||
),
|
||||
},
|
||||
],
|
||||
|
@ -62,7 +60,7 @@ odoo.define("web_widget_domain_editor_dialog.DomainEditorDialog", function (requ
|
|||
return domain.concat(group_domain);
|
||||
},
|
||||
|
||||
on_view_list_loaded: () => {
|
||||
on_view_list_loaded: function () {
|
||||
this.$(".o_list_record_selector input").prop("checked", true);
|
||||
this.$footer
|
||||
.find(".o_selectcreatepopup_search_select")
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<template id="assets_backend" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/web_widget_domain_editor_dialog/static/src/js/widget_domain_editor_dialog.js"
|
||||
/>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/web_widget_domain_editor_dialog/static/src/js/basic_fields.js"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
Loading…
Reference in New Issue