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

Hello Dear i want to add attachment field in exiting odoo view can you help me how i can do that.


Thanks

아바타
취소
베스트 답변

Hi,

You can try like this,

attachment_id = fields.Many2one('ir.attachment', string="Attachment", required=True)

Thanks

아바타
취소
베스트 답변

I am not sure I correctly understand your question but attachment stored in ir.attachment model.
There is an easy way to an attachment on any model by the chatter
for that you have to inherit model from mail.thread and add related fields (message_ids) on the view 

https://github.com/odoo/odoo/blob/12.0/addons/event/models/event.py#L81
https://github.com/odoo/odoo/blob/12.0/addons/event/views/event_views.xml#L273

아바타
취소
관련 게시물 답글 화면 활동
2
12월 24
4393
1
11월 24
3170
2
4월 23
18158
1
3월 23
2431
4
8월 24
24262