[IMP] base,project: project attachments views

- Add nocontent tip in kanban view of project documents and remove create button.
- Hide a lot of noisy fields from attachment form view in technical group.
This commit is contained in:
Jay Patel
2015-08-13 10:43:31 +02:00
committed by David Monjoie
parent 7a9f4ad991
commit c9dbc73faf
3 changed files with 13 additions and 8 deletions
+5
View File
@@ -134,6 +134,11 @@ class project(osv.osv):
'view_id': False,
'view_mode': 'kanban,tree,form',
'view_type': 'form',
'help': _('''<p class="oe_view_nocontent_create">
Documents are attached to the tasks and issues of your project.</p><p>
Send messages or log internal notes with attachments to link
documents to your project.
</p>'''),
'limit': 80,
'context': "{'default_res_model': '%s','default_res_id': %d}" % (self._name, res_id)
}
+2 -2
View File
@@ -279,8 +279,8 @@ class ir_attachment(osv.osv):
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Owner', readonly=True),
'company_id': fields.many2one('res.company', 'Company', change_default=True),
'type': fields.selection( [ ('url','URL'), ('binary','Binary'), ],
'Type', help="Binary File or URL", required=True, change_default=True),
'type': fields.selection( [ ('url','URL'), ('binary','File'), ],
'Type', help="You can either upload a file from your computer or copy/paste an internet link to your file", required=True, change_default=True),
'url': fields.char('Url', size=1024),
# al: We keep shitty field names for backward compatibility with document
'datas': fields.function(_data_get, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True),
@@ -12,30 +12,30 @@
<field name="name"/>
</h1>
<group>
<group string="Data">
<group>
<field name="type"/>
<field name="datas" filename="datas_fname" attrs="{'invisible':[('type','=','url')]}"/>
<field name="datas_fname" invisible="1" attrs="{'invisible':[('type','=','url')]}" class="oe_inline oe_right"/>
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
<field name="mimetype"/>
<field name="mimetype" groups="base.group_no_one"/>
</group>
<group string="Attached To">
<group string="Attached To" groups="base.group_no_one">
<field name="res_model"/>
<field name="res_id"/>
<field name="res_name"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
</group>
<group groups="base.group_no_one" string="History">
<group string="History" groups="base.group_no_one">
<label for="create_uid" string="Creation"/>
<div name="creation_div">
<field name="create_uid" readonly="1" class="oe_inline"/> on
<field name="create_date" readonly="1" class="oe_inline"/>
</div>
</group>
<group name="description_group" string="Description" colspan="4">
<group name="description_group" string="Description" groups="base.group_no_one" colspan="4">
<field name="description" nolabel="1"/>
</group>
<group string="Indexed Content" colspan="4">
<group groups="base.group_no_one" string="Indexed Content" colspan="4">
<field name="index_content" nolabel="1"/>
</group>
</group>