Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3659 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 19
5143
2
thg 11 24
2580
2
thg 6 20
11402
2
thg 11 18
6102
0
thg 3 23
2129