Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Send sales order or quotation by email functionality not working

By
Giorgio
on 9/29/14, 7:14 AM 1,419 views

I have installed odoo latest on a fresh Debian 32bit. I can create quotations and create PDF of them correctly. The only functionality which is not working is the "Send by Email", which gives me the following error:

OpenERP Server Error

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 499, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 516, in dispatch result = self._call_function(**self.params) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 282, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 279, in checked_call return self.endpoint(*a, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 732, in __call__ return self.method(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 375, in response_wrap response = f(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 944, in call_kw return self._call_kw(model, method, args, kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/email_template/wizard/mail_compose_message.py", line 54, in default_get res.get('model'), res.get('res_id'), context=context File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/email_template/wizard/mail_compose_message.py", line 103, in onchange_template_id values = self.generate_email_for_composer_batch(cr, uid, template_id, [res_id], context=context)[res_id] File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/email_template/wizard/mail_compose_message.py", line 167, in generate_email_for_composer_batch template_values = self.pool.get('email.template').generate_email_batch(cr, uid, template_id, res_ids, fields=fields, context=ctx) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/email_template/email_template.py", line 489, in generate_email_batch values['body_html'] = tools.append_content_to_html(values['body_html'], signature, plaintext=False) File "/usr/lib/python2.7/dist-packages/openerp/tools/mail.py", line 582, in append_content_to_html content = re.sub(r'(?i)(</?html.*>|</?body.*>|<!\W*DOCTYPE.*>)', '', content) File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or buffer

Any idea on how I can solve?

Thanks

0
Eric
On 9/29/14, 12:02 PM

Perhaps the 'content' variable is either None, or False.  You could be referencing a field that does not have any data in it.

 

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/29/14, 7:14 AM
Seen: 1419 times
Last updated: 3/16/15, 8:10 AM