Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
14906 Представления

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
дек. 24
4418
1
нояб. 24
3195
2
апр. 23
18218
1
мар. 23
2459
4
авг. 24
24315