Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Help with Subscription Webhooks

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
webclientjavascriptdevelopmentaccountingdebug
1 Antworten
830 Ansichten
Avatar
m.arabyat@gasable.com

Hey everyone,

I’m working on integrating Odoo subscriptions with my app through webhooks, and I’ve been able to make some progress — but I’m stuck on a few fields.


What I Have So Far


I managed to set up a webhook that triggers when the “next invoice date” of a subscription changes. The webhook is connected to my Edge Function, and it’s receiving data correctly.


What I’m Trying to Add


I’d like to include a few more details in the webhook payload, but I couldn’t find them in the subscription model:


Last invoice ID


Status (active, expired, canceled, etc.)


Current period end (right now I’m just using the “next invoice date” as a placeholder)


The Problem


When creating the webhook in Odoo, I couldn’t find a clear way to include these variables — especially the status field. I’m not sure if it’s missing from the subscription model or if it’s stored in a related model (like invoices or analytic accounts).


Has anyone worked with subscription webhooks before or figured out how to include these kinds of fields in the payload? Any pointers or examples would be really helpful.


Thanks!


0
Avatar
Verwerfen
Christoph Farnleitner

Can you clarify what you're missing exactly, how you're trying to create the webhook and what your configuration is?

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste Antwort

Hi,

To enhance your Odoo subscription webhook integration by including additional details such as the last invoice ID, subscription status, and current period end, you can utilize Odoo's built-in automation features.

Create a New Automated Action:

Navigate to Settings > Technical > Automation > Automated Actions.

Click on Create to define a new automated action.

Model: Select Subscription.

Trigger: Choose On Update to capture changes in subscription records.

Action To Do: Select Execute Python Code.


Python Code: Use the following script to compile the necessary subscription details:


subscription = record

last_invoice = subscription.recurring_invoice_ids.sorted('id')[-1] if subscription.recurring_invoice_ids else None

payload = {

    "subscription_id": subscription.id,

    "next_invoice_date": subscription.recurring_next_date,

    "current_period_end": getattr(subscription, 'recurring_next_date_end', None),

    "last_invoice_id": last_invoice.id if last_invoice else None,

    "last_invoice_name": last_invoice.name if last_invoice else None,

    "status": subscription.state

}

# Send the payload to your external system's webhook URL


Refer:

1. https://www.odoo.com/documentation/19.0/applications/studio/automated_actions/webhooks.html

Detailed information on setting up webhooks in Odoo

2. https://www.odoo.com/documentation/19.0/applications/studio/automated_actions.html

Automation rules — Odoo 19.0 documentation: Learn how to automate actions in Odoo, including sending data to external systems via webhooks


Hope it helps.

0
Avatar
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
How to hide the title or the close (X) button from a dialogService dialog?
javascript development debug
Avatar
Avatar
2
Sept. 25
963
Importable Module Controller (Using XML Data Files)
webclient development debug
Avatar
0
Apr. 25
1377
Updating acc_holder_name via external function
javascript development configuration accounting function debug
Avatar
0
Sept. 25
748
Help with Subscription Proration Logic (React + Odoo)
webclient javascript development configuration accounting project workflow
Avatar
0
Okt. 25
568
Error with rpc call
javascript development function debug
Avatar
Avatar
Avatar
2
Juli 25
1877
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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