Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3675 มุมมอง

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 ตอบกลับ มุมมอง กิจกรรม
Add column to a many2many rel table แก้ไขแล้ว
1
พ.ย. 19
5167
2
พ.ย. 24
2591
how to format mapped() result แก้ไขแล้ว
2
มิ.ย. 20
11410
Problem with M2M Fields แก้ไขแล้ว
2
พ.ย. 18
6116
0
มี.ค. 23
2139