[IMP]: document: Improvement for view and add group by ,filter
bzr revid: ksa@tinyerp.co.in-20100526133720-bito6krfl60a6zud
This commit is contained in:
parent
d5acd5897b
commit
b3c7cc9035
|
@ -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):
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<record model="ir.ui.view" id="view_document_directory_tree">
|
||||
<field name="name">document.directory</field>
|
||||
<field name="model">document.directory</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Directories" toolbar="1">
|
||||
<field name="name"/>
|
||||
|
@ -196,6 +196,20 @@
|
|||
<field name="res_model" readonly="1"/>
|
||||
<field name="res_id" readonly="1"/>
|
||||
</group>
|
||||
<group col="4" colspan="4">
|
||||
<separator string="File Information" colspan="4"/>
|
||||
<field name="file_size" readonly="1"/>
|
||||
<newline/>
|
||||
<separator string="History" colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<field name="create_uid"/>
|
||||
<field name="create_date"/>
|
||||
</group>
|
||||
<group col="4" colspan="4">
|
||||
<field name="write_uid"/>
|
||||
<field name="write_date"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Preview" colspan="4"/>
|
||||
<field
|
||||
name="preview"
|
||||
|
@ -206,29 +220,46 @@
|
|||
img_height="400"
|
||||
img_width="800"/>
|
||||
|
||||
</page><page string="Indexed Content">
|
||||
<field name="index_content" nolabel="1" colspan="4" select="1"/>
|
||||
</page><page string="Security">
|
||||
</page>
|
||||
<page string="Security">
|
||||
<field name="group_ids" colspan="4" nolabel="1"/>
|
||||
</page><page string="Others Info">
|
||||
<group colspan="4" col="4">
|
||||
<separator string="File Information" colspan="4"/>
|
||||
<field name="file_size" readonly="1"/>
|
||||
<newline/>
|
||||
<separator string="History" colspan="4"/>
|
||||
<field name="create_uid"/>
|
||||
<field name="create_date"/>
|
||||
<field name="write_uid"/>
|
||||
<field name="write_date"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
</page><page string="Notes">
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="description" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_attach_filter" model="ir.ui.view">
|
||||
<field name="name">IR Attachment</field>
|
||||
<field name="model">ir.attachment</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="IR Attachment">
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<filter string="Directory" icon="gtk-open" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-partner"
|
||||
domain="[('user_id','=', False)]"
|
||||
help="Owner" />
|
||||
</field>
|
||||
<field name="partner_id" widget="selection">
|
||||
<filter icon="terp-partner"
|
||||
domain="[('partner_id','=', False)]"
|
||||
help="Partner"/>
|
||||
</field>
|
||||
</group>
|
||||
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_document_file_tree">
|
||||
<field name="name">ir.attachment</field>
|
||||
<field name="model">ir.attachment</field>
|
||||
|
|
Loading…
Reference in New Issue