Community mailing list archives

community@mail.odoo.com

Re: Adding attachments in one2many line item fashion

by
Shawn Varghese
- 10/21/2015 08:10:32
Thanks Husen, I think you are referring to directory structure in Odoo. I would like to maintain it in different directories directly in the file system.

On Mon, Oct 19, 2015 at 5:03 PM, Husen Daudi <husen.daudi@serpentcs.com> wrote:

you can override create method and put under one res_id for all uploaded filed of that object.


Make a directory for that object in document directory and it will work like sale and HR.

Regards,
Husen Daudi,
Managing Director,
Serpent Consulting Services,
M : +91-9033472982
S : husen.daudi
Follow : Twitter | FaceBook | LinkedIn

On 19-Oct-2015, at 3:52 PM, Shawn Varghese <shawnvarghese.m@gmail.com> wrote:

Thanks a lot Husen,.
Based on your suggestion, I have created a many2one module referencing ir.attachment.

I also had another query. Is it possible to specify different data_dir locations? I understand that the encoding of filenames and folder structure cannot be encoded, but I would like to set a folder in the file system for all sales orders, a different one for HR and so on. Do you know how this could be achieved?



On Sun, Oct 18, 2015 at 4:52 PM, Husen Daudi <husen.daudi@serpentcs.com> wrote:

Hello Shawn,


To treat binary field as attachment and store based on Document Management configuration we need to make it attachment field and link to attachment object.
Many2one with ir.attachment will work.

We can override name get method for the field and display file name too.

Regards,
Husen Daudi,
Managing Director,
Serpent Consulting Services,
M : +91-9033472982
S : husen.daudi
Follow : Twitter | FaceBook | LinkedIn

On 18-Oct-2015, at 6:17 PM, Shawn Varghese <shawnvarghese.m@gmail.com> wrote:

<image.png>

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe