Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Discuss
    • Kecerdasan Buatan
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Manajemen Properti
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Konsultasi
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Handling Media in Odoo Helpdesk via External App

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
tickethelpdeskmediaV16
2 Replies
1407 Tampilan
Avatar
Hemanth

I'm working on an Odoo V16 Helpdesk setup where tickets are raised through an external app via FastAPI endpoint. If users upload images or screenshots with their tickets. I need to know how to handle these images in Odoo. 

Can Odoo store and display these images directly, or is it better to use an external service like Amazon S3 for storage and how? If Odoo can handle the media, what’s the best way to integrate images from the external app?

0
Avatar
Buang
Hemanth
Penulis

Thank you Cybrosys for your answer. If we store images using the ir.attachment mechanism, will they be automatically displayed in the media in chat? Also, would it be fine to clear the media from the database after a certain period to keep it clean, or would that delete any built-in media as well? Are both types of media stored in the same place?

CandidRoot Solutions

Good question. The beauty of the ir.attachment model is that "routing" the image and "tagging" it for safe deletion actually happen in the exact same step.

When your FastAPI sends the request to create the attachment, you are mandatory required to specify the target record. That specific field (res_model) is exactly what you will use later to filter your cleanup script.

1. How to ensure it routes to the Ticket: When your API calls the create method on ir.attachment, your payload must include these two fields:

'res_model': 'helpdesk.ticket' <-- This tells Odoo "This belongs to the Helpdesk app"

'res_id': 12345 <-- This is the specific Ticket ID you want to attach it to.

If you pass those, Odoo automatically links the file to that ticket. No extra routing logic is needed.

2. How to minimize delete risk: Since you must set 'res_model': 'helpdesk.ticket' to get the image on the ticket in the first place, you have effectively "tagged" it.

Your cleanup Cron job becomes very safe because you can simply tell it: "Find all attachments created more than 6 months ago WHERE res_model == 'helpdesk.ticket'."

As long as your script strictly filters by that model name, it is impossible for it to accidentally delete a system asset or product image, because those will have different model names (like product.template).

Hope that helps you build the endpoint!

Hemanth
Penulis

I understand CandidRoot thanks :) but suppose we take the image directly from the user using FastAPI and store it in ir.attachment. How can we ensure that it is routed to the linked ticket and that the model is set to helpdesk.ticket, minimizing the risk to periodically delete?

Avatar
CandidRoot Solutions
Jawaban Terbai

Hi Hemanth,

To answer your follow-up questions regarding the ir.attachment route:

1. Will they show in the Chatter? Yes and no.

  • If you just create the ir.attachment record linked to the ticket, the file will appear in the "Attachments" menu (the paperclip icon) at the top of the chatter.

  • If you want the image to actually appear inside the chat stream (like a WhatsApp message), your FastAPI endpoint should call the message_post method on the ticket and pass the attachment_ids. This effectively "sends" the image as a message so the support agent sees it immediately in the thread.

2. Can we auto-delete old media? (The Risk) You can write a Scheduled Action (Cron) to delete old attachments to save space, but you have to be extremely careful.

  • Are they stored in the same place? Yes. Your company logo, website assets, and these ticket images all live in the same ir.attachment table (and likely the same /filestore folder on the server).

  • The Danger: If you just run a script to "delete all attachments older than 6 months," you will break your website images, product photos, and company branding.

The Solution: If you set up a cleanup script, make sure you filter strictly by model. Only delete attachments where res_model = 'helpdesk.ticket'. Do not touch attachments where res_model is ir.ui.view or product.template.

So in summary: Go with the native Odoo attachment method, but if you automate cleanup, make sure your script checks the "Model" field so you don't wipe out your system icons!

Hope that clarifies things!

If this helped, kindly upvote.
Best Regards,


CandidRoot Solutions Pvt. Ltd.
Mobile: (+91) 8849036209
Whatapp: (+91) 8849036209

Email: info@candidroot.com
Web: https://www.candidroot.com

2
Avatar
Buang
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Jawaban Terbai
Hi,

Odoo V16 can effectively store and display images directly for Helpdesk tickets using its ir.attachment mechanism, where files are linked to records and stored either in the database or on the filesystem. This approach offers simpler integration, a seamless user experience within Odoo's interface, and leverages Odoo's built-in security and backup features. To integrate images from an external FastAPI application, you would typically encode the image data to base64 and then use Odoo's API (XML-RPC or JSON-RPC) to create an ir.attachment record, linking it to the relevant Helpdesk ticket. The main consideration for this method is the potential growth of your Odoo database or filestore with a very high volume of large images.

Alternatively, you could use an external service like Amazon S3 for image storage. In this scenario, your FastAPI application would upload images directly to S3, and Odoo would only store the S3 URL in a custom field on the Helpdesk ticket. This method offers superior scalability, performance, and keeps your Odoo database lean, but it introduces more complexity. Displaying these S3-hosted images natively within Odoo would require custom development, such as creating a custom widget to render the S3 URL as an image tag, and managing S3 access and security separately.

For most standard Odoo Helpdesk setups, storing images directly within Odoo as ir.attachment records is the recommended and more straightforward solution due to its native integration and ease of use. Amazon S3 should primarily be considered for scenarios involving extremely high volumes of large images, specific compliance requirements, or if you already have a robust S3 infrastructure in place.

Hope it helps

-2
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
No Notification or Easy Way to Track Email Replies from Customers
ticket email helpdesk V16
Avatar
Avatar
1
Mar 26
1782
How to add user email as follower when creating Odoo ticket
python ticket helpdesk V16
Avatar
Avatar
Avatar
2
Des 25
1391
Reply by email to helpdesk ticket problem Diselesaikan
ticket helpdesk
Avatar
Avatar
Avatar
3
Mar 25
7558
How to get first help desk message from the customer in the create method?
ticket helpdesk
Avatar
0
Mei 21
5921
How to automatically sort tickets by last stage update?
helpdesk sort V16
Avatar
Avatar
1
Feb 26
913
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Karir
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah software terintegrasi dengan 70+ aplikasi seperti CRM, Akuntansi, Inventaris, Sales, eCommerce, Marketing, POS; plus fitur lokal Indonesia!

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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