Comments (10)
@invitu thank you for the report. Is'it possible to have the html content of your mail? We encountered some troubles in the past because Odoo has changed the way they format the url to reference an ir.attachment.
from acsone-addons.
hi laurent, (impossible to put some html stuff here...) I send you a private email...
cyril
from acsone-addons.
@invitu
The problem come from the way we find the URLs in the document for the ir.attachement referenced in the document.
In your message URLs looks like
<img src="http://localhost:8069/website/image/ir.attachment/27_f345651/datas" style="display:block;border:none;min-height:50px" width="175">
<img src="http://localhost:8069/website/image/ir.attachment/28_aa2e3f0/datas" style="display:block;border:none;min-height:50px" width="175">
<img src="http://localhost:8069/website/image/ir.attachment/29_a265d8f/datas" style="display:block;border:none;min-height:50px" width="175">
In the code we expect that the part after 'ir.attachment' contains only figures since it should be the id of the attachement. (https://github.com/acsone/acsone-addons/blame/8.0/html_widget_embedded_picture/ir_mail_server.py#L49)
/ir.attachment/29_a265d8f/datas
In your case, the attachment also contains others chars. Therefore, the code is not able to find the attachment since 29_a265d8f
is not a valid Id. The change in the way odoo build the id of the attachement in the url has been introduced by odoo/odoo@bc5e6fa.
We need to fix the code.
Regards,
lmi
from acsone-addons.
hello, thanks for analysing
i think odoo still takes the id of the attachment in the first part of the URL :
/ir.attachment/29_a265d8f/datas --> 29 is the attachment id
so your code still fits the case because matching_buffer.keys() still are the attachment ids
I think the problem might be in the missing multipart/related which should be in the beginning of the mail
By the way, it should also be a thunderbird bug... https://bugzilla.mozilla.org/show_bug.cgi?id=61815
from acsone-addons.
dear laurent
I got it work with multipart/related in the email building :
diff --git a/openerp/addons/base/ir/ir_mail_server.py b/openerp/addons/base/ir/ir_mail_server.py
@@ -303,7 +303,7 @@ class ir_mail_server(osv.osv):
email_body_utf8 = ustr(body).encode('utf-8')
email_text_part = MIMEText(email_body_utf8, _subtype=subtype, _charset='utf-8')
-
msg = MIMEMultipart()
-
msg = MIMEMultipart(_subtype='related',) if not message_id:
I guess this is related to the difficulty to have embedded images with "cid" working in most of the email clients...
Is there a way to include that in your module ?
from acsone-addons.
@invitu thank you for your work. I'm on vacation and I'll be back at work next monday.
from acsone-addons.
hello jonathan, it works with your branch 8.0-fix_63_mail_related_multipart-jne
from acsone-addons.
Can you please give me orientation about how can I do to obtain the image attachment id 27_f345651
, to do the following:
<img src="http://localhost:8069/website/image/ir.attachment/27_f345651/datas">
Thanks a lot
from acsone-addons.
Hi @ysantiago , personnaly I succeed in making it work and readable in my webmail by using the ckeditor widget and choosing my full URL with attachment URL copy pasted from the drop down attachment menu.
from acsone-addons.
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
from acsone-addons.
Related Issues (15)
- hr utilization report: how to include leaves HOT 5
- Move to OCA some interesting modules HOT 3
- Setup branch 10.0 HOT 2
- [RFC] cagnotte* addons => OCA HOT 7
- Pylint cleanup HOT 1
- ir_noupdate_override causes -u website to reset website homepage, about us, footer...
- Installation of module fails : Odoo 8 HOT 1
- split html_widget_embedded_picture HOT 2
- embedded picture: generalize filter HOT 5
- hr_utilization: stack trace when Group by company / Group by department not checked
- Porting readonly_bypass on v7 HOT 6
- remove readonly_bypass from acsone-addons when web_readonly_bypass is merged in OCA/web HOT 1
- [html_widget_embedded_picture] accented characters are not well displayed HOT 4
- Documentation for html embed image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acsone-addons.