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

I have a one2many field to ir.attachment, 

i want to get file from my computer and upload it to the filed thank you 

attachment = fields.One2many('ir.attachment', 'res_partner_id', string='Attachment', compute='_get_file')

Imagine profil
Abandonează
Cel mai bun răspuns

Just Add
Field:
attachment_ids
Type: many2many
Widget: many2many_binary

Widget logic: odoo-13.0\addons\web\static\src\js\widgets\attach_document.js


Example:


model.py

attachment_ids = fields.Many2many("Add Attachments")

view.xml

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


Imagine profil
Abandonează
Autor

i want a computed one2many attachment field and that attachments will upload them automatically, if you have any ideas. Thanks

Related Posts Răspunsuri Vizualizări Activitate
2
ian. 22
13687
2
iul. 25
4604
2
dec. 24
7762
2
nov. 24
28521
2
mai 24
7468