Comments (6)
the trick is that you need to submit your search after the first selection. If you add conditions in advances search, the terms will be joined by conjunction. If you apply first, and then add the second condition, you'll get the disjunction.
from web.
Hi @hbrunn , I leaved this without answer and without solving.
Let's say conditions in Projects.
- A: is manager (res.user) = 145 results
- B: is member (res.user) = 15 results
- C: is follower (we want follower for res.user and not from res.partner) = 149 results
I'm looking (in this example) for A OR B OR C = 154
the trick is that you need to submit your search after the first selection. If you add conditions in advances search, the terms will be joined by conjunction. If you apply first, and then add the second condition, you'll get the disjunction
I'm not able to reproduce this, as you said me. I think I was using you trick and that why I said module has a [BUG]
In Odoo core: (Go to Projects -> projects)
1 - If you want to make disjunction, A OR B, you have to select first condition (A=is manager), add second codition (B=is member), ... and after all conditions are added click in the button Apply.
- Unfold advance search, select field "Project manager", set "is equal", select your own user
- Click add condition
- Select field "Project members", set "is equial", select your own user
- Click Apply
- A OR B = 148 results
2 - If you want to make conjunction, A AND B, you have to select first condition (A=is manager), apply, add second codition (B=is member), aplpy, ...
- Unfold advance search, select field "Project manager", set "is equal", select your own user
- Click Apply
- Unfold advance search, select field "Project members", set "is equial", select your own user
- Click Apply
- A AND B = 12
Adding module OCA web_advanced_search_x2x
3 - So with my search (I would like to filter projects which User (uid) is "manager" OR "member" OR "follower".) and you comment I did:
- Case 3.1
- Point 1 described above (A OR B) +
- C: Unfold advance search, select field Follower -> Is in selection and then in res.parter search User -> you own user
- A OR B AND C = 143
- Case 3.2
- Unfold advance search, select field Follower -> Is in selection and then in res.parter search User -> you own user
- Unfold advance search, select field "Project manager", set "is equal", select your own user
- Click add condition
- Select field "Project members", set "is equial", select your own user
- Click Apply
- A OR B OR C = 53 --> incorrect, here is the BUG
Could you tell me if I'm missing the trick?
Additionaly
- How can we do/improve this module to be able for excluding a selection?
- Let's say you have 3 mailing list (m1[rafaelbn], m2[hbrum], m3[rafaelbn,hbrum]) lists and in customers you want to search all customer which are not in mailng list m1. Result now if you make "is in selection"+"mailing list is not equial to m1" is rafaelbn,hbrum (because they are in m2 or m3). But we would like logic for "is not in selection"+
- We think that we must add the option "is not in selection". Did you not include it for any special reason?
from web.
@rafaelbn thanks for elaborating, it's fixed in #263
from web.
About your other questions: negative operators on x2many fields in odoo are nearly never treated the way a user would expect, so implementing it on this level is a recipe for frustration.
For your use cases, use https://github.com/OCA/web/tree/7.0/web_advanced_filters
from web.
@pedrobaeza @antespi if we want to implement negative operator we must take care on #222 (comment) and maybe discuss with @hbrunn
from web.
Solved in #263
from web.
Related Issues (20)
- [16.0] web_chatter_position: Button to switch between sided and bottom views HOT 3
- [16.0] web_responsive: document_url module is not working properly when installed
- [17.0] web_responsive: Main document preview is activated by default HOT 4
- [17.0]Can this module be migrated to the 17.0 version ?? HOT 6
- column width in tree view HOT 2
- [11.0] error install web_responsive module HOT 1
- [16.0] web_advanced_search bug HOT 7
- [16.0] web_responsive: The web responsive will revert back to odoo base behaviour when we reload the page from website. HOT 3
- [16.0] web_refresher: Refresh action returns to create a new record when already has been created the record HOT 3
- [16][web_responsive] Bold doest whows as normal text in HTML fields HOT 3
- web_widget_x2many_2d_matrix 17.0 can not edit the value
- [16.0] web_widget_x2many_2d_matrix: Error when value is Date HOT 1
- [16.0] web_responsive: The web responsive will revert back to odoo base behaviour when we reload the page from website. HOT 4
- [16.0] web_pivot_computed_measure - error when divide by 0
- [17.0] web_widget_x2many_2d_matrix - Domain is not taken into account
- [16.0] web_refresher: bug when clicking on production plan HOT 3
- [16.0] web_responsive and web_theme_classic incompatibility
- [17.0] web_responsive: When becoming superuser HOT 3
- web_m2x_options module, options="{'open':True}" tree views bug.
- Widget Model Viewer for Odoo 17 online is supposed to be found here HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.