Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Generate Sales Report through API

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
posapireportxmlrpcPoint Of Sale
2 Antwoorden
5934 Weergaven
Avatar
Liam

Hello,

I need to automate the task of generating a report of the POS statistics. 

The same as decribed here: https://www.odoo.com/documentation/user/9.0/point_of_sale/analyze/statistics.html

I'm developing a simple script on PHP using a XMLRPC lib (ripcord) but when I try to access to the model "report.pos.order" using the 'search' function it doesn't return any report instead it gives me all the orders IDs.

Is there any way to auto generate the report and at the same time using some criteria for filtering by products or date using the API?

I also followed the "Report Printing" section in https://www.odoo.com/documentation/9.0/api_integration.html

It doesn't work for me with the "report.pos.order" model.

I would like to get the data in XML or CSV or even a raw array or objects instead of a PDF so I can manipulate it.

Example code I'm using (PHP):


$url = "https://myerp.my";
$db = "my_db";
$username = "user";
$password = "pass";

$common = ripcord::client("$url/xmlrpc/2/common");
$uid = $common->authenticate($db, $username, $password, []);

$models = ripcord::client("$url/xmlrpc/2/object");
$report = $models->execute_kw($db, $uid, $password, 'report.pos.order', 'search', array(array()));

I would appreciate any help!

Thank you!


Technical Details:

- PHP 7.1

- Odoo 9.0c

- Ripcord: https://github.com/DarkaOnLine/Ripcord


0
Avatar
Annuleer
Avatar
Liam
Auteur Beste antwoord

Hello Paresh,

Thank you very much for the reply. I have readed more about the ORM documentation and now I'm capable of gettig the sum of the sales without re-doing the entire calculation process but now I'm facing another issue, please see the link below:

https://www.odoo.com/forum/help-1/question/point-of-sale-read-group-group-by-funcionality-api-158773

And again, thank you!

0
Avatar
Annuleer
Avatar
Paresh Wagh
Beste antwoord

Hi Liam:

search retrieves a list of ids. You then have to do a read to retrieve the data associated with the ids. There is also a search_read method that allows you to do a search and a read in one step. In your case, you will need to read the data from the models associated with the orders and create the report in PHP. Retrieving the report PDF will not help since it will be in a base64 encoded format which you will not be able to use for manipulating the raw data. 

0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Point of Sale Read Group - Group By Funcionality API
pos api report xmlrpc Point Of Sale
Avatar
Avatar
1
nov. 22
6494
How can I print a custom report in odoo Point of sale interface Opgelost
pos report Point Of Sale Odoo13
Avatar
Avatar
3
sep. 22
8797
Where can i find apis for the POS module in php??
pos api point_of_sale Point Of Sale v13
Avatar
Avatar
2
aug. 20
72
I need a Point Of Sale api for v13 in php, it exists??
pos api point_of_sale Point Of Sale v13
Avatar
Avatar
2
aug. 20
52
Add filter on reporting -> orders -> pivot view
pos report
Avatar
Avatar
1
jul. 25
1773
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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