Skip to content

Commit

Permalink
[IMP] first_databank: Upgrade fdb.img integration
Browse files Browse the repository at this point in the history
* Polymorphic inherits on `fdb.img` w/ `ir_attachment`
  • Loading branch information
lasley committed Sep 1, 2016
1 parent 0282b14 commit de62acd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions first_databank/models/fdb_img.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@

class FdbImg(models.Model):
_name = 'fdb.img'
_inherits = {'ir.attachment': 'attachment_id'}
_description = 'Fdb Img'
file_name = fields.Char()
data = fields.Binary(
attachment=True,
attachment_id = fields.Many2one(
string='Attachment',
comodel_name='ir.attachment',
required=True,
ondelete='cascade',
)

0 comments on commit de62acd

Please sign in to comment.