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ą
    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

[BUG] WhatsApp Template - TypeError: object of type 'LocalBinaryFile' has no len() | saas-19.3

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
whatsapp
2 Odpowiedzi
385 Widoki
Awatar
neelam@digimonk.in
Hi,

Getting this error when submitting a WhatsApp Template with Header Type = Document:

TypeError: object of type 'LocalBinaryFile' has no len()

File: whatsapp/tools/whatsapp_api.py, line 196, in _upload_demo_document
data=attachment.raw is passed to requests but LocalBinaryFile has no __len__()
so urllib3 crashes during chunked upload.

Version: Odoo Enterprise saas-19.3 (Odoo Online)

Steps:
1. WhatsApp → Templates → New
2. Header Type = Document → upload file
3. Submit for Approval → crash

Workaround: Switching Header Type to Text works but Document headers
are a valid Meta feature.

Suggested fix: read bytes before passing →
file_data = attachment.raw.read()
then pass data=file_data with Content-Length header.

Is there a patch available? Thanks!
0
Awatar
Odrzuć
Awatar
Zehntech Technologies Inc.
Najlepsza odpowiedź

Hello, 

Based on the traceback and your analysis, this does appear to be a bug in the WhatsApp template submission flow for Document headers in saas-19.3 rather than a configuration issue.

Since you're using Odoo Online, custom patches cannot be applied directly. If this issue is reproducible on a standard database, the recommended approach is to raise a support ticket with Odoo and provide the reproduction steps along with the traceback details.

Your proposed workaround (using a Text header) is valid for now, and the suggested code change also seems consistent with the root cause you identified. However, any permanent fix would need to come from Odoo's official SaaS codebase.

Hope this works for you! If you need any help implementing this or want a more optimized approach, feel free to reach out for further discussion.

Regards,

Zehntech Technologies Inc.

santosh.sekwadia@zehntech.com

0
Awatar
Odrzuć
Awatar
Vivek Kundaliya
Najlepsza odpowiedź

This is a known bug in saas-19.3 where attachment.raw returns a LocalBinaryFile object (not raw bytes), causing urllib3 to fail because it cannot determine the content length.


**Immediate Workaround (no code needed):**

Use a URL-based document header instead of a file upload:

  • In your WhatsApp Template, set Header Type = Document

Enter a public URL to your document instead of uploading a file

  • This bypasses the _upload_demo_document method entirely

**For Odoo Online (saas-19.3 Enterprise):**

Since you cannot modify server files directly:

  1. Submit a bug report to Odoo Support through your Enterprise subscription portal - this is a server-side bug they should hotfix
  2. 2. Use the URL workaround above in the meantime
  3. 3. Switch to Text header type for your templates until the patch is deployed

**Technical Root Cause:**

The bug is in whatsapp/tools/whatsapp_api.py where data=attachment.raw is passed directly. The fix would be reading the bytes first with attachment.raw.read() but on Odoo Online you cannot apply this patch yourself. This is Odoo's bug to fix.


Hope this helps - please upvote so Odoo prioritizes the fix!

0
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ść
WhatsApp Campaigns and Bulk Messaging in Odoo
whatsapp
Awatar
Awatar
2
kwi 26
3092
WhatsApp Username Adoption
whatsapp
Awatar
0
kwi 26
1071
When I'm calling someone on WhatsApp and it shows unavailable, what does that mean? Why does it happen?
whatsapp
Awatar
5
sie 25
271293
I am getting an error in some area codes that cannot send Whatsapp, although the number searched is still a correct WA account. Is there any solution to help me?
whatsapp
Awatar
Awatar
1
sie 25
3147
send whatsap message to multiple phone numbers Rozwiązane
whatsapp
Awatar
Awatar
1
cze 25
3350
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