Skip to Content
Menu
This question has been flagged
2577 Views
attachment_id = self.env['ir.attachment'].create({
'name': self.name or ' ',
'res_model': 'model name',
'res_id': self.id,
'datas': file name,
'datas_fname': self.name,
'description': 'report file',
'type': 'binary'
})
Avatar
Discard
Related Posts Replies Views Activity
6
May 24
45712
1
Feb 23
697
0
Feb 23
724
2
Sep 20
16681
1
Jul 19
2848