Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

How to limit reading data in XMLRPC android

Odoberať

Get notified when there's activity on this post

This question has been flagged
xmlrpcandroid
3 Replies
8757 Zobrazenia
Avatar
Benedict

I am an android developer who is now working with OODO API. My aim is to read a specific amount of data present in the res.partner object in the OpenERP.

I used the below code to get all the data's present in the res.partner object.

  String[] arrayOfString4 = new String[4];

  arrayOfString4[0] = "name";

  arrayOfString4[1] = "date";

  arrayOfString4[2] = "state_id";

  arrayOfString4[3] = "ho_branch_id";

  arrayOfString4[4] = "client_id";

  tableId = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "search", new Object[0]); Object[]      

 tableitems = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "read", tableId, arrayOfString4);

This code retrieves more than 20,000 data's where I only need the first 50 data's. I checked this OODO API link for a solution.And from there I tried this.

tableId = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "search", new Object[0],new HashMap() {{ put("limit",50); }});

Object[] tableitems = (Object[]) client1.call("execute", DB_NAME, UID, PASSWORD, "res.partner", "read", tableId, arrayOfString4);

But I get an error java.lang.string cannot be converted into java.lang.integer Can anyone please help me how to limit the number of data's read??? I hope my question is clear enough..I am new at this. Thank you.

0
Avatar
Zrušiť
OdooBot
Hi.

I'm sorry...I am new to the oodo forum....Could you tell me if you answered my question??
I cannot find the answer in the page where I posted my question.

Thank you.

 

On Tue, Feb 21, 2017 at 12:45 PM, Ermin Trevisan <trevi@twanda.com> wrote:

A new question How to limit reading data in XMLRPC android on Help has been posted. Click here to access the question :

See question

--
Ermin Trevisan


Sent by Odoo S.A. using Odoo.


Avatar
Ramsad pv
Best Answer

which API are you using ??

 is it Odoo External Api ??.


In the Odoo External Api Documentation is explaining that ,  you can set the limit for the reading Records in Read and Search_read methods ,  and you can set the offset and the limit if need . refer the link

https://www.odoo.com/documentation/11.0/webservices/odoo.html

1
Avatar
Zrušiť
Avatar
Benoît Vézina
Best Answer

use fields as this example :

def getConvert(self, partner_id):
    modelName = 'membership.membership.line'                       
    domain = [ ('partner_id','=',partner_id )]       
    fields =[
            'id',
             'partner_id',
             'name', ]
        user = self.execute(modelName, 'search_read',    [domain,    fields])
        try :
            userId = user[0]['id']
            logger.info("converted ParterId :" + str(partner_id)+ " == UserId ids : " + str(userId))
        except IndexError as e:
            logger.warn(str(e) + "can not converted - no UserId for Partner:" + str(partner_id))
            userId = False
        return  userId

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
I was using XML-RPC to upload image from Android to Odoo, why so slow?
xmlrpc android
Avatar
0
aug 16
5732
XMLRPC in android Studio
xmlrpc android odoo
Avatar
Avatar
1
mar 17
5315
Calling Xfunction in X_model via XML RPC
xmlrpc webservices android
Avatar
0
nov 15
4037
xmlrpc Error when attempting to connect to my local instance Solved
xmlrpc
Avatar
Avatar
Avatar
3
júl 25
4095
Cannot marshal None unless allow_none is enabled
xmlrpc
Avatar
1
okt 24
2963
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now