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

mail.message Attachment through XMLRPC

Abonnieren

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

Diese Frage wurde gekennzeichnet
attachmentxmlrpchelpdeskcommentnodejs
2 Antworten
3713 Ansichten
Avatar
Tom

Hey team !

So here's the context, I'm using the 'helpdesk.ticket' thingy and a NodeJS library called 'odoo-await' that let me send XMLRPC request from a NodeJS app.

What I want to do is:
1. Create a new 'helpdesk.ticket'
2. Add a comment to the newly created ticket, I'm using the 'mail.message' model
3. I want that comment to have an attachment 'ir.attachment'

Right now I successfully created the ticket, the comment to that ticket and the orphan attachment.

My issue is that I'm not able to add the attachment to the 'mail.message' comment.

I first create the attachment so that I can use it's ids ('file_id') to put it in the 'attachment_ids' fields, and then create the comment with the code below :

await odoo.create('mail.message', {
model: 'helpdesk.ticket',
attachment_ids: [(6, 0, file_id)],
message_type: 'comment',
res_id: ticket_id
})

This code create the comment, and I tried multiple configuration for the 'attachment_ids' fields :

attachment_ids: [file_id]
attachment_ids: [(file_id)]
attachment_ids: [(0, file_id)]
attachment_ids: [[0, file_id]]

attachment_ids: [(6, 0, file_id)]
attachment_ids: [[6, 0, file_id]]

attachment_ids: [('6', '0', file_id)]
attachment_ids: [['6', '0', file_id]]

And also all these configurations with file_id as a String instead of an Int

No matter what I do in the end, when I check the new comment, the 'attachment_ids' field is always empty.

Any hints on what I'm doing wrong ?


I'm kinda lost on what the (6, 0, id) m2m represent, but I saw it in a bunch of other answer to similar issue.
I also tried reading the source code for mail.message, but yeah, python isn't really my thing...

Thanks everyone reading this.
Have a good day

0
Avatar
Verwerfen
Avatar
Tom
Autor Beste Antwort

I will close this issue since I found another way to do what I needed.

When creating the 'ir.attachment' I set the 'res_id' to the previously created ticket ID, so that the attachment can be seen in the the attachment tab of the 'helpdesk.ticket'.

0
Avatar
Verwerfen
Avatar
Esmiranda Joye
Beste Antwort

I have PDF files of prior employee payslips on a CD. I'd like to import these into OpenERP as attachments for each employee. In addition, I'd like to submit more files each month. To do this, I intend to develop a particular module/addon or a Python program that will access OpenERp through XML-RPC.

0
Avatar
Verwerfen
Esmiranda Joye

Does anyone have a solution for this https://dino-game.org problem?

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
check if user exists in odoo database
xmlrpc nodejs
Avatar
Avatar
2
Sept. 22
4416
How to attach a Company and Customer to the same Odoo invoice
xmlrpc invoces nodejs
Avatar
Avatar
1
Jan. 23
2406
How to add an attachment to Odoo v10 Helpdesk Ticket Gelöst
attachment attachments helpdesk
Avatar
Avatar
2
Mai 18
6886
Attachment from website v9c
attachment helpdesk website
Avatar
0
Juli 17
2934
Can't attach an attachment in Helpdesk Form
attachment helpdesk website Enterprise Odoo13.0
Avatar
1
Aug. 20
4218
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Ausbildung
  • 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