While select multiple records in tree view and click button, need to download respective attachments simultaneously. I'm working in Odoo10.0
def generate_renewal_pdf(self):
""" Print renewal pdf"""
attachment_ids = {}
for mail in self:
attachments = mail.attachment_ids
for attach in attachments:
attachment_ids[attach.id] = str(attach.datas_fname)
download = True
return {
'type': 'ir.actions.act_url',
'url': '/web/content/%s/%s/%s' % (attach.id, # How to pass multiple id here to download multiple
attach.datas_fname,
download),
'target': 'self',
}
Anyone have solution?