Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3682 Представления

I want to access all files from many2many field. I don't want to save the files in the db, thats why is store=False


assets_uploader = fields.Many2many(comodel_name='ir.attachment', string='Assets upload', attachment=True, store=False)


<button string="Upload"  type="object" name="upload_asset" context="{'assets_uploader': assets_uploader}" />

 

def upload_asset(self):      

        for file in self._context.get('assets_uploader'):

            print(file)


Is there a solution?

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
нояб. 19
5180
2
нояб. 24
2626
2
июн. 20
11418
2
нояб. 18
6127
0
мар. 23
2142