Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4 Răspunsuri
12498 Vizualizări

.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"/>

Imagine profil
Abandonează
Cel mai bun răspuns

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.

Imagine profil
Abandonează
Autor

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

Cel mai bun răspuns

in which version this code working?

Imagine profil
Abandonează
Autor Cel mai bun răspuns

Thank  you Avinash it's working .

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

which kind of problem you are facing ?

Related Posts Răspunsuri Vizualizări Activitate
0
nov. 17
3972
0
aug. 16
4343
0
apr. 16
128
0
dec. 15
6817
5
nov. 15
5707