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] Clickeverywhere functionality regressed HOT 1
- [16.0] web_chatter_position: Traceback - incompatible with mass_mailing Module
- [16.0] web_advanced_search: Uncaught Javascript Error > FIELD_OPERATORS[genericType] is undefined HOT 5
- web_responsive Odoo online error 500 after install HOT 2
- [16.0] web_timeline: Create record: Cannot SAVE & CLOSE HOT 1
- [14.0] web_notify_channel_message raising exception for non admin users HOT 2
- Plotly autosize=True in update_layout s not working
- [15.0] web_advanced_search: values in code editor not propagated HOT 4
- Web Dialog Size - unexpected closing during export data HOT 1
- [16.0] web_widget_x2many_2d_matrix: not showing all columns HOT 4
- Make web_responsive work with Odoo Enterprise HOT 3
- [16.0] web_widget_x2many_2d_matrix: cells with no data error HOT 1
- [16.0] Missing key in search panel filter component OWL HOT 4
- Migration to version 17.0 HOT 33
- Clarification on the Necessity of web_responsive in Odoo 17 HOT 3
- [12.0] web_drop_target
- [16.0_
- [16.0] preview issues pdf on customer invoice/vendorbill in combination with addon web_responsive HOT 2
- [15.0] web_pivot_computed_measure question HOT 1
- [web_dialog_size] Reports re-generated on window size change
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.