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

.py Code : 

'attachment_ids': fields.many2many('ir.attachment', 'project_issue_ir_attachments_rel', 'issue_id', 'attachment_id', 'Attachments'),


.xml Code : 

<field name="attachment_ids" widget="many2many_binary" string="File"/>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Manish Kumar Bohra,

you can use the widget, widget="many2many_kanban" for that.
but you have some extra steps in the attachment adding stage.

1. Add the attachment.



2. Create or Select one item from the wizard(ir.attachment model)


3. If you are creating, you have to give name, file in the wizard.



4. Then you will get this type of form view.




Note: In my knowledge, you can't delete an attachment you are uploaded. but you can change the name and file.

Hope this will help you.

Thank you.

อวตาร
ละทิ้ง
ผู้เขียน

but can you suggest any solution to delete these uploaded files ??

คำตอบที่ดีที่สุด

in which version this code working?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Thank  you Avinash it's working .

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

hey , I use it for odoo v11 but it does not work :(((  
Do you have a solution?

อวตาร
ละทิ้ง
ผู้เขียน

which kind of problem you are facing ?

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 17
3972
0
ส.ค. 16
4344
0
เม.ย. 16
128
0
ธ.ค. 15
6818
5
พ.ย. 15
5707