Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
10727 Widoki

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')

Awatar
Odrzuć
Najlepsza odpowiedź

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


Awatar
Odrzuć
Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
2
sty 22
13627
2
lip 25
4491
2
gru 24
7668
2
lis 24
28431
2
maj 24
7404