Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3642 Vizualizări

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?

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
nov. 19
5139
2
nov. 24
2571
2
iun. 20
11401
2
nov. 18
6088
0
mar. 23
2124