Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
10758 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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


Avatar
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
2
led 22
13649
2
čvc 25
4523
2
pro 24
7691
2
lis 24
28443
2
kvě 24
7422