From f2d71fc4059692d01879f33b901c71d8a5e1eb13 Mon Sep 17 00:00:00 2001 From: Valentin Chemiere Date: Mon, 16 Mar 2015 14:11:46 +0100 Subject: [PATCH] Polymorphic inherit for ir.attachment --- external_file_location/attachment.py | 4 ++-- external_file_location/attachment_view.xml | 17 ++++++++++++----- external_file_location/task.py | 2 +- ir_attachment_metadata/attachment.py | 7 +++++-- ir_attachment_metadata/attachment_view.xml | 9 ++++----- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/external_file_location/attachment.py b/external_file_location/attachment.py index 63d18b49..26925547 100644 --- a/external_file_location/attachment.py +++ b/external_file_location/attachment.py @@ -23,8 +23,8 @@ from openerp import models, fields -class IrAttachment(models.Model): - _inherit = 'ir.attachment' +class IrAttachmentMetadata(models.Model): + _inherit = 'ir.attachment.metadata' sync_date = fields.Datetime() state = fields.Selection([ diff --git a/external_file_location/attachment_view.xml b/external_file_location/attachment_view.xml index b5f5309c..de7c65f9 100644 --- a/external_file_location/attachment_view.xml +++ b/external_file_location/attachment_view.xml @@ -3,8 +3,8 @@ - ir.attachment - + ir.attachment.metadata + @@ -17,7 +17,7 @@ - ir.attachment + ir.attachment.metadata @@ -32,7 +32,7 @@ - ir.attachment + ir.attachment.metadata @@ -68,7 +68,7 @@ Attachments ir.actions.act_window - ir.attachment + ir.attachment.metadata form tree,form @@ -83,6 +83,13 @@ + + + form + + + + - ir.attachment + ir.attachment.metadata - - - + + + -