Community mailing list archives
Re: Adding attachments in one2many line item fashionby
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 <email@example.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.On 19-Oct-2015, at 3:52 PM, Shawn Varghese <firstname.lastname@example.org> 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 <email@example.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.On 18-Oct-2015, at 6:17 PM, Shawn Varghese <firstname.lastname@example.org> wrote:<image.png>