Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Bricoleur
    • Matériel informatique & support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Parcourir toutes les industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Getting all calendar events of today thru XML-RPC in Odoo V12.

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
calendar.eventXML-RPC
1 Répondre
4741 Vues
Avatar
Bastiaan

Hi,

I'm trying to get all calendar events for today thru the XML RPC API in Odoo V12 using PHP. 

$calendarEventIds = $this->models->execute_kw(DB, UID, PASSWORD, 'calendar.event', 'search', array(array('start_date', '=', '2019-09-03')));

Somehow if I remove the date filter, I do receive the whole list. So the date filter does not seems to work. Is there something wrong with my syntax?

Stacktrace:

{"faultCode":1,"faultString":"Traceback (most recent call last):\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/addons\/base\/controllers\/rpc.py\", line 63, in xmlrpc_2\n response = self._xmlrpc(service)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/addons\/base\/controllers\/rpc.py\", line 43, in _xmlrpc\n result = dispatch_rpc(service, method, params)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/http.py\", line 120, in dispatch_rpc\n result = dispatch(method, params)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/service\/model.py\", line 39, in dispatch\n res = fn(db, uid, *params)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/service\/model.py\", line 171, in execute_kw\n return execute(db, uid, obj, method, *args, **kw or {})\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/service\/model.py\", line 97, in wrapper\n return f(dbname, *args, **kwargs)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/service\/model.py\", line 178, in execute\n res = execute_cr(cr, uid, obj, method, *args, **kw)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/service\/model.py\", line 167, in execute_cr\n return odoo.api.call_kw(recs, method, args, kw)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/api.py\", line 745, in call_kw\n return _call_kw_model(method, model, args, kwargs)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/api.py\", line 718, in _call_kw_model\n result = method(recs, *args, **kwargs)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/models.py\", line 1561, in search\n res = self._search(args, offset=offset, limit=limit, order=order, count=count)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/addons\/calendar\/models\/calendar.py\", line 1775, in _search\n event_ids = super(Meeting, self)._search(new_args, offset=0, limit=0, order=None, count=False, access_rights_uid=access_rights_uid)\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/models.py\", line 4100, in _search\n if expression.is_false(self, args):\n File \"\/usr\/lib\/python3\/dist-packages\/odoo\/osv\/expression.py\", line 225, in is_false\n elif token[1] == 'in' and not token[2]:\nIndexError: string index out of range\n"}}

Kind regards,

Bastiaan    


2
Avatar
Ignorer
Avatar
Anoop Menon
Meilleure réponse
Hi,

Im not an expert in PHP but i believe the expected syntax is different . please use the below syntax while specifying the domain.
$calendarEventIds = $this->models->execute_kw(DB, UID, PASSWORD, 'calendar.event', 'search', array(array('start_date' = '2019-09-03')));

if that doesn't work try going through Odoo's official documentation on making rpc calls from other languages in the below link. you can see sample codes for php in the right side
https://www.odoo.com/documentation/12.0/webservices/odoo.html
7
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Calendar.event user_id to be user_id of the related document
calendar.event
Avatar
0
mai 24
2542
Connect to Odoo external Api's
XML-RPC
Avatar
Avatar
1
janv. 24
5357
Can the `read` operation fetch multiple results in the XML-Rpc API ?
XML-RPC
Avatar
Avatar
1
juil. 23
4695
Strategies to speed up search queries via XML-RPC
XML-RPC
Avatar
0
oct. 22
4207
Event reminder not sent to event creator
calendar.event
Avatar
0
sept. 22
2546
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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