Comments (4)
Here is the reference example of Many2Many
the 'attachment_ids' from crm;
the 'partner_ids' from messaging
https://github.com/Odoo-mobile/messaging/blob/0fc384ef747802516e65fe848c4aab8212abc3bd/src/com/odoo/addons/mail/services/MailSyncService.java
Line no 77+
Hope this will help you!!
from framework.
Hello @sailing135
As you mention, you are tyring to give condition on ManyToMany column. That actually does not exist in database table. But, system had created seperate table for maintaining the relation between two different tables. So, it's not possible to directly give condition using where.
The way you are trying to get record by conditioning on relation column (such as ManyToMany and OneToMany) is not possible with use of CursorLoader mechanism.
A CursorLoader runs an asynchronous query in the background against a ContentProvider, and returns the results in Cursor object.
How to do that?
For that, You need to create one join query.
CursorLoader works with ContentProvider. You can find tutorial for how to create custom provider for your model. Also for execute your query you need to create one custom URI that will invoke your custom query with join and return value in cursor.
Please refer this link to understand how to create custom provider and your own URI to execute your required query with CursorLoader
Also here is sample code for execute query:
Note applicaiton:
Refering the method, which returns cursor.
Hope this help
from framework.
thanks all so much, I will try it !!
from framework.
In Notes.java , it is not clear how you did use CursorLoader to fetch data from the two different tables ( notes and tags in your project ) , would you explain it more please?
from framework.
Related Issues (20)
- Application error
- Odoo Android v2.3.0 Crashes after login HOT 1
- Multiple @Odoo.domain in one OModel
- App Crashes when we run the release apk
- Consider using at OdooJsonRpcClient HOT 3
- Closing the database prematurely
- Unable to create record on server. HOT 5
- enable synchronization HOT 11
- Documentation link HOT 1
- Sync services E/SQLiteLog: (10) POSIX Error : 11 SQLite Error : 3850
- How to Disable the specific dates (Weekends, Holidays) in Odoo mobile DateTime Picker ?
- All fields are not showing while opening Repair Module
- How to use 'read_group' method in mobile application ?
- login Time Problem HOT 1
- adding models to the framework
- Empty Drawer Menu HOT 1
- Synchronization problem
- App crashes
- Odoo session expired on odoo v15 HOT 1
- iOS version
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 framework.