콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
10956 화면

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

아바타
취소
베스트 답변

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


아바타
취소
작성자

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

관련 게시물 답글 화면 활동
2
1월 22
13806
2
7월 25
4782
2
12월 24
7889
2
11월 24
28684
2
5월 24
7577