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.

4

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

By
Felipe
on 4/29/13, 2:12 PM 1,758 views

The Question has been closed

by
Felipe
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?

2

Felipe

--Felipe--
962
| 5 3 8
Bogotá, Colombia
--Felipe--
Informatics engineer Industrial engineer
Felipe
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"/>

with

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

0

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
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

plus

  • 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

Felipe
on 4/30/13, 12:58 AM
0

Martin

--Martin--
1978
| 5 6 8
Cornwall, Canada
--Martin--

Analysing, designing, coding and mentoring since 1975. Kilobytes to terabytes. Punch cards to punchy sites. My OpenERP video series: http://www.youtube.com/playlist?list=PLq7op4J183lX44ZlXPiHxUpRvmmRDtxye My Google Speadsheets --> OpenERP Data Pump project: http://martinhbramwell.github.io/GData_OpenERP_Data_Pump My email (with spaces removed) : mhb . warehouseman @ gmail . com

Martin
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.

Felipe
on 4/29/13, 2:21 PM

About This Community

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

Question tools

0 follower(s)

Stats

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