web icon indicating copy to clipboard operation
web copied to clipboard

[14.0] Web advanced search select dialog

Open NL66278 opened this issue 4 years ago • 15 comments

Restore the in old versions existing 'is in selection' operator.

Note that this build on the improvements in https://github.com/OCA/web/pull/2003

NL66278 avatar Sep 21 '21 10:09 NL66278

@hbrunn I tried to recreate on Odoo 14.0 what you created a long time ago, and that some customers were sorely missing. Would be nice if you had a look, It is my first non-trivial web development.

NL66278 avatar Sep 22 '21 17:09 NL66278

@jgrandguillaume Very interesting talk you gave!

You mentioned the web_advanced_search module, that could be made even more fantastic with the features offered here, that recreates some of the original functionality created by @hbrunn, that was lost in later migrations.

NL66278 avatar Oct 29 '21 13:10 NL66278

The button Use criteria does not get enabled when a domain is entered image

rven avatar Nov 17 '21 14:11 rven

@rven Strange, this was working before. I will try to find out what went wrong.

NL66278 avatar Dec 02 '21 09:12 NL66278

One of those horrible problems that do not exist when debugging... Must be some timing issue...

NL66278 avatar Dec 02 '21 11:12 NL66278

@NL66278 The following error rises on runbot, when selecting the in selection option of the Custom Filter image

tested on http://3519656-2033-61096c.runbot2.odoo-community.org/web#action=35&model=ir.module.module&view_type=kanban&cids=1&menu_id=5

rven avatar Dec 02 '21 14:12 rven

LGTM
I've just installed you PR on my project and it works as designed

xavier-bouquiaux avatar Apr 15 '22 07:04 xavier-bouquiaux

@NL66278 Hi, You updated this for me at therp, use criteria is not working, I have emailed your directly with no response, please help.

spadae22 avatar Jan 31 '23 04:01 spadae22

@rven Could you have another look?

NL66278 avatar Mar 21 '24 15:03 NL66278

Hmm.. Maybe I'm missing something here. How does one apply the 'is in selection' operator. Is it broken by the latest commit? Or maybe I don't understand the readme / workflow :thinking:

Can you make short screencast?

bosd avatar Mar 21 '24 17:03 bosd

Hmm.. Maybe I'm missing something here. How does one apply the 'is in selection' operator. Is it broken by the latest commit? Or maybe I don't understand the readme / workflow 🤔

Can you make short screencast?

here is a screencast of selecting "in selection" option:

https://github.com/OCA/web/assets/8994879/b0e7ba0c-d491-4523-9b4f-ae7c30cad485

gfcapalbo avatar Mar 25 '24 10:03 gfcapalbo

Hmm.. Maybe I'm missing something here. How does one apply the 'is in selection' operator. Is it broken by the latest commit? Or maybe I don't understand the readme / workflow 🤔 Can you make short screencast?

here is a screencast of selecting "in selection" option: for_euge.mp4

@spadae22 @gfcapalbo On my linux does not open in Firefox, but does run in Chromium.

NL66278 avatar Mar 25 '24 11:03 NL66278

@gfcapalbo Thanks for the screencast.

I was able to add a filter on the runboat.

But I also got an error.. On runbot I follow this: Go to Apps

Add Cutsom Filter --> Author --> is in selection


Error:
Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo/http.py", line 696, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 328, in _call_function
    raise werkzeug.exceptions.BadRequest(msg % params)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 652, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
werkzeug.exceptions.BadRequest: 400 Bad Request: <function Home.web_client at 0x7f8ac9faa430>, /web: Function declared as capable of handling request of type 'http' but called with a request of type 'json'

bosd avatar Mar 26 '24 12:03 bosd

@gfcapalbo The error occurs when selecting on a non relational field (like Author or Description). These have no tree views or list, so an 'in selection' filter makes no sense. So the 'in selection' operator should only be shown for relational fields. Would that be easy to add?

NL66278 avatar Mar 26 '24 15:03 NL66278

@gfcapalbo The error occurs when selecting on a non relational field (like Author or Description). These have no tree views or list, so an 'in selection' filter makes no sense. So the 'in selection' operator should only be shown for relational fields. Would that be easy to add?

@NL66278 Please assign an internal issue with necessary priority, it should be possible , but not immediate, to filter out all non-relational fields from the options available when using "is in selection".

gfcapalbo avatar Apr 08 '24 08:04 gfcapalbo

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Dec 22 '24 12:12 github-actions[bot]