CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
The Question has been closedby
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?
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"/>
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.
About This Community
Odoo Training Center
|Asked: 4/29/13, 2:12 PM|
|Seen: 2128 times|
|Last updated: 10/16/15, 11:29 AM|