Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3640 Zobrazení

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?

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
lis 19
5134
2
lis 24
2554
2
čvn 20
11383
2
lis 18
6084
0
bře 23
2111