Skip to Content

Contributors

Re: Multiple files (images) upload

Hi Peter,

You can look into https://github.com/OCA/storage to manage images the way you want.

And you can review this https://github.com/OCA/storage/pull/48 that allows to handle multi image upload.


Best regards,

On Tue, Nov 17, 2020 at 11:22 AM Peter Hahn <peter.hahn@initos.com> wrote:
Dear Contributors,

on a custom model we needed to have multiple images attached in a
separate notebook page.
We solved this using a kanban widget on a simple model, that contains
the image as binary field.
The drawback is, that you need to add each image one by one since you
need to create new records of the containing model used for the kanban
view to add images.
The customer is asking for the possibility to add images by a multi
select file dialog.
Afaik this isn’t possible in odoo, since there is always exactly one
binary field per image, so I would need something to create several
records in one go.

The only widget I know that is capable of doing this is the one used for
adding attachments to forms (marked red in the screenshot below).

Do you have any hints how to realize something like this?
There seams to be nothing ready made available for this on the net.

Thanks. Regards, Peter

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--
__________________________________________
Denis Roussel
Software Engineer
Acsone SA, Succursale de Liège (Val Benoît)
Tel    : +32 2 888 31 49
Fax   : +32 2 888 31 59
Gsm : +32 472 22 00 57

Acsone sa/nv
Boulevard de la Woluwe 56 Woluwedal | B-1200 Brussels  | Belgium
Quai Banning, 6 (Val Benoît) | B-4000 Liège | Belgium
Zone Industrielle 22 | L-8287 Kehlen | Luxembourg

by Denis Roussel - 11:30 - 17 Nov 2020

Reference

  • Multiple files (images) upload
    Dear Contributors,
    
    on a custom model we needed to have multiple images attached in a
    separate notebook page.
    We solved this using a kanban widget on a simple model, that contains
    the image as binary field.
    The drawback is, that you need to add each image one by one since you
    need to create new records of the containing model used for the kanban
    view to add images.
    The customer is asking for the possibility to add images by a multi
    select file dialog.
    Afaik this isn’t possible in odoo, since there is always exactly one
    binary field per image, so I would need something to create several
    records in one go.
    
    The only widget I know that is capable of doing this is the one used for
    adding attachments to forms (marked red in the screenshot below).
    
    Do you have any hints how to realize something like this?
    There seams to be nothing ready made available for this on the net.
    
    Thanks. Regards, Peter
    

    by Pete Hahn - 11:20 - 17 Nov 2020