Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] web_advanced_search: Migrate to v12 #1197

Merged
merged 23 commits into from
Feb 22, 2019

Conversation

yajo
Copy link
Member

@yajo yajo commented Feb 18, 2019

Routine migration.

@Tecnativa

@oca-clabot

This comment has been minimized.

@yajo yajo self-assigned this Feb 18, 2019
@yajo yajo added this to the 12.0 milestone Feb 18, 2019
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 18, 2019
40 tasks
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried on runbot

@pedrobaeza
Copy link
Member

@tarteo may I ask your review?

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Tested on runbot

Would it be possible in the advanced filter to have the button to the selected records dialog?

Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runbot 👍

@yajo
Copy link
Member Author

yajo commented Feb 22, 2019

Merge please.

@pedrobaeza
Copy link
Member

What about the question:

Would it be possible in the advanced filter to have the button to the selected records dialog?

@yajo
Copy link
Member Author

yajo commented Feb 22, 2019

If I understand the question fine, the answer is that it depends on the domain selector widget itself, not on the search feature here.

You can see some improvements being made for v11 in #1200.

hbrunn and others added 16 commits February 22, 2019 10:17
and replace company icon

[FIX] js syntax

[FIX] move our patched equals operator to top of list

[ADD] support selecting domains on x2x fields

[FIX] eval search view's domain

[IMP] UI fixes

[IMP] reflect recent additions in README.rst

[FIX] typos

[ADD] translations

[FIX] correct js reference

[RFR] rebuild our domains in a different way

this solves timing problems
I could not find the project on Transifex...
- Use the new domain widget.
- Use modules system.
* Make it good-looking
* Update known issues
* Fix templates.
* Make other operators work again
[MIG] web_advanced_search_x2x: Migrated to 10.0 FIX review Remarks
* Ensure that domain field can be evaluated before creating x2x field
* Fixed navigation error after using x2x advanced search
[FIX] StopPropagation when clicking in domain selector.
* Complete migration to v11
* Refactor to use the new v11 decoupled widgets system
* Advanced search is now a high-level feature from the filters menu; it simplifies code a lot, and the UX is even better
* Split README system
* Add fun to ROADMAP
* Addon is renamed to web_advanced_search, since it enhaces the searching experience for all kind of fields now
hhgabelgaard and others added 7 commits February 22, 2019 10:20
Currently translated at 100,0% (1 of 1 strings)

Translation: web-11.0/web-11.0-web_advanced_search
Translate-URL: https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_advanced_search/da/
Before this patch, when searching with the "equals to" operator in any
x2many field, the searched parameter was always `undefined`.

The problem was that the underlying field manager implementation was
treating those fields as x2many, while the widget used was the `one2many`
one.

This patch simply mocks the underlying fake record to make think that
any relational field is always a `one2many`. This sets all pieces in
place and makes the field manager work as expected, and thus you can
search as expected too.
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
If we honor the domain value, the user may not be getting all available
records when selecting from an x2many dropdown, or even worse, if the
domain references another field in the view, the user may be getting
an error when opening the field dropdown, like this:

    Error: NameError: name 'company_id' is not defined

    http://localhost/web/static/lib/py.js/lib/py.js:370
    Rastreo de error:
    PY_ensurepy@http://localhost/web/static/lib/py.js/lib/py.js:370:19
    py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1340:20
    py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1397:35
    py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1409:34
    py.eval@http://localhost/web/static/lib/py.js/lib/py.js:1453:16
    eval_domains/<@http://localhost/web/static/src/js/core/pyeval.js:886:39
    _.forEach@http://localhost/web/static/lib/underscore/underscore.js:145:9
    _.mixin/</_.prototype[name]@http://localhost/web/static/lib/underscore/underscore.js:1484:29
    eval_domains@http://localhost/web/static/src/js/core/pyeval.js:877:16
    pyeval@http://localhost/web/static/src/js/core/pyeval.js:988:16
    stringToArray@http://localhost/web/static/src/js/core/domain.js:243:16
    _getDomain@http://localhost/web/static/src/js/views/basic/basic_model.js:3004:24
    _search@http://localhost/web_m2x_options/static/src/js/form.js:139:26
    source@http://localhost/web/static/src/js/fields/relational_fields.js:198:17
    _search@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:6823:3
    $.widget/</proxiedPrototype[prop]</<@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:415:19
    search@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:6815:10
    $.widget/</proxiedPrototype[prop]</<@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:415:19
    $.widget.bridge/$.fn[name]/<@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:508:19
    each@http://localhost/web/static/lib/jquery/jquery.js:383:49
    each@http://localhost/web/static/lib/jquery/jquery.js:136:24
    $.widget.bridge/$.fn[name]@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:494:4
    _onInputClick@http://localhost/web/static/src/js/fields/relational_fields.js:565:13
    proxy/<@http://localhost/web/static/src/js/core/mixins.js:279:20
    dispatch@http://localhost/web/static/lib/jquery/jquery.js:4640:50
    add/elemData.handle@http://localhost/web/static/lib/jquery/jquery.js:4309:41
@pedrobaeza pedrobaeza force-pushed the 12.0-web_advanced_search branch from c88c630 to dbd23a6 Compare February 22, 2019 09:22
@pedrobaeza pedrobaeza merged commit 760a904 into OCA:12.0 Feb 22, 2019
@pedrobaeza pedrobaeza deleted the 12.0-web_advanced_search branch February 22, 2019 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.