Odoo Help


How to select an openerp attachment to send a new e-mail [Closed]

on 4/29/13, 2:12 PM 2,043 views

The Question has been closed

on 08/12/2013 18:07:19

I have installed the document module, now I can manage the attachments and documents, but.

In the "compose a new message wizard", there is an attach button, but I can only select files from my local PC, and I want to be able to select an attachment from my openerp attachments repository(previously uploaded), how can I enable this option?

On 5/2/13, 5:34 PM

As I did not found any configuration to make this, a simple code modification made the trick.

In the form view of the wizard replace

<field name="attachment_ids" widget="many2many_binary"/>


<field name="attachment_ids"/>

That's all

You can also have both options(widgets) if you create another attachment_ids2 field and add their values in the post_values inside function send_mail.

'attachments': [(attach.datas_fname or attach.name,base64.b64decode(attach.datas)) for attach in wizard.attachment_ids]+[(attach.datas_fname or attach.name, base64.b64decode(attach.datas)) for attach in  wizard.attachment_ids2],

Modifying the source code is not recommended, the good practice is to create a custom module than implements this.

On 4/29/13, 6:45 PM

why not use the function share ? go to menu documents and share your document.

that functionality is completely different, there you send a link and a username,password,database to share the openerp document and give permissions to edit or view


  • share wizard doesn't have the partners relationship unlike mail.message

  • share wizard is not shown in every form view unlike mail.message

  • share wizard does not have the templates features

  • share wizard does not have the wysiwyg editor

  • you should be able to select more than one attachment per email

on 4/30/13, 12:58 AM
On 4/29/13, 2:18 PM

Have a look at Settings >> Technical >> Low Level Objects >> Attachments.

That will allow you to edit existing attachments.

This might help too:

Can i attach existing file from google docs?

yes, in that menu I can edit and manage the attachments, but that is not the question.

on 4/29/13, 2:21 PM

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

0 follower(s)


Asked: 4/29/13, 2:12 PM
Seen: 2043 times
Last updated: 10/16/15, 11:29 AM