This question has been flagged
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.
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:
- Submit a bug report to Odoo Support through your Enterprise subscription portal - this is a server-side bug they should hotfix
- 2. Use the URL workaround above in the meantime
- 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!
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-se| Related Posts | Respostes | Vistes | Activitat | |
|---|---|---|---|---|
|
|
2
d’abr. 26
|
3080 | ||
|
|
0
d’abr. 26
|
1055 | ||
|
|
5
d’ag. 25
|
271293 | ||
|
|
1
d’ag. 25
|
3134 | ||
|
|
1
de juny 25
|
3328 |