From b3c7cc90350353b85f7defe12f6e1aafbfbed851 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Wed, 26 May 2010 19:07:20 +0530 Subject: [PATCH] [IMP]: document: Improvement for view and add group by ,filter bzr revid: ksa@tinyerp.co.in-20100526133720-bito6krfl60a6zud --- addons/document/document.py | 6 +++ addons/document/document_view.xml | 63 +++++++++++++++++++++++-------- 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/addons/document/document.py b/addons/document/document.py index 2b2ac2f7587..be9087f246c 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -91,8 +91,14 @@ class document_file(osv.osv): 'store_fname': fields.char('Stored Filename', size=200), 'res_model': fields.char('Attached Model', size=64), #res_model 'res_id': fields.integer('Attached ID'), #res_id + # 'res_name': fields.function(_name_get_resname, type='char', string='Resource Name', method=True), 'partner_id':fields.many2one('res.partner', 'Partner', select=1), 'title': fields.char('Resource Title', size=64), + 'type':fields.selection([ + ('url','URL'), + ('binary','Binary'), + + ],'Type', help="Type is used to separate URL and binary File"), } def __get_def_directory(self, cr, uid, context=None): diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml index 720ab6de69f..e796523f0af 100644 --- a/addons/document/document_view.xml +++ b/addons/document/document_view.xml @@ -118,7 +118,7 @@ document.directory document.directory - tree + tree @@ -196,6 +196,20 @@ + + + + + + + + + + + + + + - - - + + - - - - - - - - - - - + - + + + + IR Attachment + ir.attachment + search + + + + + + + + + + + + + + + + + + ir.attachment ir.attachment