Przejdź do zawartości
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Sztuczna inteligencja
    • IoT
    • VoIP
    • Wiedza
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    • Referral Program
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Handling Media in Odoo Helpdesk via External App

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
tickethelpdeskmediaV16
2 Odpowiedzi
1450 Widoki
Awatar
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
Awatar
Odrzuć
Hemanth
Autor

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
Autor

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?

Awatar
CandidRoot Solutions
Najlepsza odpowiedź

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
Awatar
Odrzuć
Awatar
Cybrosys Techno Solutions Pvt.Ltd
Najlepsza odpowiedź
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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
No Notification or Easy Way to Track Email Replies from Customers
ticket email helpdesk V16
Awatar
Awatar
1
mar 26
1832
How to add user email as follower when creating Odoo ticket
python ticket helpdesk V16
Awatar
Awatar
Awatar
2
gru 25
1414
Reply by email to helpdesk ticket problem Rozwiązane
ticket helpdesk
Awatar
Awatar
Awatar
3
mar 25
7662
How to get first help desk message from the customer in the create method?
ticket helpdesk
Awatar
0
maj 21
6065
How to automatically sort tickets by last stage update?
helpdesk sort V16
Awatar
Awatar
1
lut 26
932
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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