Odoo Help


Add an attachment to message_post

on 6/3/15, 10:20 AM 1,741 views

Hi everyone,

I would like to add a notification every time that someone use the "Print Quotation" button.

With the notification I would like to have a message like "Quotation Print" and the Quotation on attachment.

I was thinking that I can use something like this (in print_quotation in sale.py)

 body = "Print of a new quotation"
records = self._get_followers(cr, uid, ids, None, None, context=context)
followers = records[ids[0]]['message_follower_ids']
self.message_post(cr, uid, ids, body=body, subtype='mt_comment', partner_ids=followers, context=context)

However, is it possible to add the Quotation printed on attachment?

Thank a lot you for your help.



Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 7/10/15, 4:57 AM

You could pass the argument attachments=[('filename', 'file raw data not encoded with base64')] to message_post

Excellent! With this logic how can one attach, say, a report?

Nicolaus Hartmann
on 5/14/16, 12:15 PM
Hi, Send me the link of the forum post that you are referring to, because seems to be old and Odoo doesn't send me that

On Sat, May 14, 2016 at 11:15 AM, Niklaus Hartmann <n.hartmann-gmail.com@mail.odoo.com> wrote:

Excellent! With this logic how can one attach, say, a report?

Niklaus Hartmann

Sent by Odoo S.A. using Odoo

Axel Mendoza
on 5/14/16, 5:30 PM

Yes you can do it

Axel Mendoza
on 7/7/16, 7:27 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 6/3/15, 10:20 AM
Seen: 1741 times
Last updated: 7/10/15, 4:57 AM