Browse Source

[MIG] web_advanced_search: Migrate to v12

pull/1197/head
Jairo Llopis 5 years ago
committed by Pedro M. Baeza
parent
commit
dbd23a6519
  1. 14
      web_advanced_search/README.rst
  2. 2
      web_advanced_search/__manifest__.py
  3. 4
      web_advanced_search/readme/ROADMAP.rst
  4. 10
      web_advanced_search/static/description/index.html
  5. 13
      web_advanced_search/static/src/css/web_advanced_search.less
  6. 12
      web_advanced_search/static/src/js/web_advanced_search.js
  7. 10
      web_advanced_search/static/src/xml/web_advanced_search.xml
  8. 1
      web_advanced_search/views/templates.xml

14
web_advanced_search/README.rst

@ -14,13 +14,13 @@ Advanced search
: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/11.0/web_advanced_search
:target: https://github.com/OCA/web/tree/12.0/web_advanced_search
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_advanced_search
:target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_advanced_search
: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/11.0
:target: https://runbot.odoo-community.org/runbot/162/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@ -70,10 +70,6 @@ Improvements to the search view in this addon:
* Use widgets ``one2many_tags`` when searching ``one2many`` fields
* Use widgets ``many2many_tags`` when searching ``many2many`` fields
* Allow to edit current full search using the advanced domain editor
* Allow to edit individually any facet from current search using the
advanced domain editor
* Beautiful, human-readable, domain representation when adding an
advanced filter
Changelog
=========
@ -125,7 +121,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_advanced_search%0Aversion:%2011.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_advanced_search%0Aversion:%2012.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.
@ -161,6 +157,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/11.0/web_advanced_search>`_ project on GitHub.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/12.0/web_advanced_search>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

2
web_advanced_search/__manifest__.py

@ -5,7 +5,7 @@
{
"name": "Advanced search",
"version": "11.0.1.0.2",
"version": "12.0.1.0.0",
"author": "Therp BV, "
"Tecnativa, "
"Odoo Community Association (OCA)",

4
web_advanced_search/readme/ROADMAP.rst

@ -8,7 +8,3 @@ Improvements to the search view in this addon:
* Use widgets ``one2many_tags`` when searching ``one2many`` fields
* Use widgets ``many2many_tags`` when searching ``many2many`` fields
* Allow to edit current full search using the advanced domain editor
* Allow to edit individually any facet from current search using the
advanced domain editor
* Beautiful, human-readable, domain representation when adding an
advanced filter

10
web_advanced_search/static/description/index.html

@ -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/11.0/web_advanced_search"><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-11-0/web-11-0-web_advanced_search"><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/11.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/12.0/web_advanced_search"><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_advanced_search"><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>More powerful and easy to use search, especially for related fields.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
@ -425,10 +425,6 @@ to a journal which has a user who is member of a certain group etc.</p>
<li>Use widgets <tt class="docutils literal">one2many_tags</tt> when searching <tt class="docutils literal">one2many</tt> fields</li>
<li>Use widgets <tt class="docutils literal">many2many_tags</tt> when searching <tt class="docutils literal">many2many</tt> fields</li>
<li>Allow to edit current full search using the advanced domain editor</li>
<li>Allow to edit individually any facet from current search using the
advanced domain editor</li>
<li>Beautiful, human-readable, domain representation when adding an
advanced filter</li>
</ul>
</div>
<div class="section" id="changelog">
@ -477,7 +473,7 @@ search as expected too.</p>
<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_advanced_search%0Aversion:%2011.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_advanced_search%0Aversion:%2012.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">
@ -507,7 +503,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/11.0/web_advanced_search">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/12.0/web_advanced_search">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>

13
web_advanced_search/static/src/css/web_advanced_search.less

@ -1,13 +0,0 @@
.o_search_options {
.o_filters_menu {
.o_filter_condition {
max-width: inherit;
.o_searchview_extended_prop_value {
.o_field_domain {
min-width: 30vw;
}
}
}
}
}

12
web_advanced_search/static/src/js/web_advanced_search.js

@ -10,7 +10,7 @@ odoo.define("web_advanced_search", function (require) {
var DomainSelectorDialog = require("web.DomainSelectorDialog");
var field_registry = require("web.field_registry");
var FieldManagerMixin = require("web.FieldManagerMixin");
var FilterMenu = require("web.FilterMenu");
var FiltersMenu = require("web.FiltersMenu");
var human_domain = require("web_advanced_search.human_domain");
var SearchView = require("web.SearchView");
var Widget = require("web.Widget");
@ -52,7 +52,7 @@ odoo.define("web_advanced_search", function (require) {
/**
* Produce a filter descriptor for advanced searches.
*
* @returns {Object} In the format expected by `web.FilterMenu`.
* @returns {Object} In the format expected by `web.FiltersMenu`.
*/
get_filter: function () {
var domain_array = this.domain.toArray();
@ -74,12 +74,12 @@ odoo.define("web_advanced_search", function (require) {
});
// Add advanced search features
FilterMenu.include({
custom_events: _.extend({}, FilterMenu.prototype.custom_events, {
FiltersMenu.include({
custom_events: _.extend({}, FiltersMenu.prototype.custom_events, {
"domain_selected": "advanced_search_commit",
}),
events: _.extend({}, FilterMenu.prototype.events, {
events: _.extend({}, FiltersMenu.prototype.events, {
"click .o_add_advanced_search": "advanced_search_open",
}),
@ -126,7 +126,7 @@ odoo.define("web_advanced_search", function (require) {
event.data.domain
);
this.propositions = [proposition];
this.commit_search();
this._commitSearch();
},
});

10
web_advanced_search/static/src/xml/web_advanced_search.xml

@ -2,12 +2,10 @@
<!-- Copyright 2017-2018 Jairo Llopis <jairo.llopis@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<templates>
<t t-extend="SearchView.FilterMenu">
<t t-jquery=".o_filters_menu" t-operation="append">
<li class="divider"/>
<li>
<a class="o_add_advanced_search">Add Advanced Filter</a>
</li>
<t t-extend="FiltersMenuGenerator">
<t t-jquery=".o_add_filter_menu" t-operation="after">
<div role="separator" class="dropdown-divider"/>
<a class="dropdown-item o_add_advanced_search">Add Advanced Filter</a>
</t>
</t>
</templates>

1
web_advanced_search/views/templates.xml

@ -5,7 +5,6 @@
<template id="assets_backend" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/web_advanced_search/static/src/css/web_advanced_search.less"/>
<script type="text/javascript" src="/web_advanced_search/static/src/js/human_domain.js"/>
<script type="text/javascript" src="/web_advanced_search/static/src/js/web_advanced_search.js"/>
</xpath>

Loading…
Cancel
Save