Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3646 Переглядів

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
5140
2
лист. 24
2574
2
черв. 20
11402
Problem with M2M Fields Вирішено
2
лист. 18
6090
0
бер. 23
2126