跳至内容
菜单
此问题已终结
4 回复
12513 查看

.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 ?

相关帖文 回复 查看 活动
0
11月 17
3974
0
8月 16
4344
0
4月 16
128
0
12月 15
6821
5
11月 15
5707