Skip to content

Commit

Permalink
[MIG] web_edit_user_filter: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amh-mw committed Jun 12, 2024
1 parent fe3978d commit 1e0ed15
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 40 deletions.
6 changes: 6 additions & 0 deletions setup/web_edit_user_filter/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
16 changes: 8 additions & 8 deletions web_edit_user_filter/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Edit User Filters
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:42a237e72292f5c09e0b1846ccc3d939ee6f7e1c2749fd3c05e4b12efeea336a
!! source digest: sha256:4cc9e36f8b83405fb9429e15bbbfbb762910146226d25a928e6a6ec05b91566c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand All @@ -17,13 +17,13 @@ Edit User Filters
: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_edit_user_filter
:target: https://github.com/OCA/web/tree/15.0/web_edit_user_filter
: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_edit_user_filter
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_edit_user_filter
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=14.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=15.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -49,7 +49,7 @@ Edit a favourite filter:
#. Select a filter and click on the star icon of the filter name
#. click on the pencil icon to start editing the filter.

.. image:: https://raw.githubusercontent.com/web_edit_user_filter/static/description/select_facet.png
.. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_edit_user_filter/static/description/select_facet.png
:alt: Select Facet

Edit a facet:
Expand All @@ -58,7 +58,7 @@ Edit a facet:
#. a menu is now shown which allows you to remove values from the facet;
#. to cancel removal you can click outside the popover.

.. image:: https://raw.githubusercontent.com/web_edit_user_filter/static/description/edit_facet.png
.. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_edit_user_filter/static/description/edit_facet.png
:alt: Edit Facet

Known issues / Roadmap
Expand All @@ -73,7 +73,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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_edit_user_filter%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_edit_user_filter%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.

Expand Down Expand Up @@ -105,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_edit_user_filter>`_ project on GitHub.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/15.0/web_edit_user_filter>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
13 changes: 10 additions & 3 deletions web_edit_user_filter/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@
{
"name": "Edit User Filters",
"category": "Extra Tools",
"version": "14.0.1.0.1",
"version": "15.0.1.0.0",
"author": "Onestein,Level Prime Srl,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"development_status": "Production/Stable",
"license": "AGPL-3",
"depends": ["web"],
"data": ["templates/assets.xml"],
"qweb": ["static/src/xml/backend.xml", "static/src/xml/search_extended.xml"],
"installable": True,
"assets": {
"web.assets_backend": [
"web_edit_user_filter/static/src/js/*.js",
"web_edit_user_filter/static/src/scss/*.scss",
],
"web.assets_qweb": [
"web_edit_user_filter/static/src/xml/*.xml",
],
},
}
4 changes: 2 additions & 2 deletions web_edit_user_filter/readme/USAGE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Edit a favourite filter:
#. Select a filter and click on the star icon of the filter name
#. click on the pencil icon to start editing the filter.

.. image:: /web_edit_user_filter/static/description/select_facet.png
.. image:: ../static/description/select_facet.png
:alt: Select Facet

Edit a facet:
Expand All @@ -15,5 +15,5 @@ Edit a facet:
#. a menu is now shown which allows you to remove values from the facet;
#. to cancel removal you can click outside the popover.

.. image:: /web_edit_user_filter/static/description/edit_facet.png
.. image:: ../static/description/edit_facet.png
:alt: Edit Facet
12 changes: 6 additions & 6 deletions web_edit_user_filter/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Edit User Filters</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:42a237e72292f5c09e0b1846ccc3d939ee6f7e1c2749fd3c05e4b12efeea336a
!! source digest: sha256:4cc9e36f8b83405fb9429e15bbbfbb762910146226d25a928e6a6ec05b91566c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/OCA/web/tree/14.0/web_edit_user_filter"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_edit_user_filter"><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/web&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/OCA/web/tree/15.0/web_edit_user_filter"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_edit_user_filter"><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/web&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>In standard Odoo you can edit user filters via the debug module.
The problem is that normal users often don’t have access to this menu therefore can’t adjust filters once they’re saved.
This module makes this feature available for normal users with a user friendly interface.
Expand Down Expand Up @@ -398,14 +398,14 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<li>Select a filter and click on the star icon of the filter name</li>
<li>click on the pencil icon to start editing the filter.</li>
</ol>
<img alt="Select Facet" src="https://raw.githubusercontent.com/web_edit_user_filter/static/description/select_facet.png" />
<img alt="Select Facet" src="https://raw.githubusercontent.com/OCA/web/15.0/web_edit_user_filter/static/description/select_facet.png" />
<p>Edit a facet:</p>
<ol class="arabic simple">
<li>Click on the facet;</li>
<li>a menu is now shown which allows you to remove values from the facet;</li>
<li>to cancel removal you can click outside the popover.</li>
</ol>
<img alt="Edit Facet" src="https://raw.githubusercontent.com/web_edit_user_filter/static/description/edit_facet.png" />
<img alt="Edit Facet" src="https://raw.githubusercontent.com/OCA/web/15.0/web_edit_user_filter/static/description/edit_facet.png" />
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
Expand All @@ -419,7 +419,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<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 to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_edit_user_filter%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_edit_user_filter%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">
Expand All @@ -445,7 +445,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<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_edit_user_filter">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_edit_user_filter">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>
Expand Down
10 changes: 6 additions & 4 deletions web_edit_user_filter/static/src/js/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ odoo.define("web_edit_user_filter/static/src/js/backend.js", function (require)
),
type: "danger",
});
return this.descriptionRef.el.focus();
this.descriptionRef.el.focus();
return;
}
const favorites = this.model.get(
"filters",
Expand All @@ -75,7 +76,8 @@ odoo.define("web_edit_user_filter/static/src/js/backend.js", function (require)
message: this.env._t("Filter with same name already exists."),
type: "danger",
});
return this.descriptionRef.el.focus();
this.descriptionRef.el.focus();
return;
}
var facets = this.model.get("facets");
this.model.dispatch("createNewFavorite", {
Expand Down Expand Up @@ -118,7 +120,7 @@ odoo.define("web_edit_user_filter/static/src/js/backend.js", function (require)
var selectedFacet = self.model.get("filters").filter(function (facet) {
return (
facet.type === facet_type &&
facet.groupId == facetId &&
facet.groupId === facetId &&
facet.isActive === true
);
});
Expand All @@ -129,7 +131,7 @@ odoo.define("web_edit_user_filter/static/src/js/backend.js", function (require)
var FavFacets = [];
var currentFacet = self.model.get(
"filters",
(f) => f.type === "favorite" && f.groupId == facetId
(f) => f.type === "favorite" && f.groupId === facetId
);
if (currentFacet[0].groupBys.length) {
_.each(currentFacet[0].groupBys, function (description) {
Expand Down
17 changes: 0 additions & 17 deletions web_edit_user_filter/templates/assets.xml

This file was deleted.

0 comments on commit 1e0ed15

Please sign in to comment.