[ADD] : field on view

bzr revid: aja@tinyerp.com-20140327051528-joaa06orfcffzzuj
This commit is contained in:
ajay javiya (OpenERP) 2014-03-27 10:45:28 +05:30
parent b5ffa0f83b
commit 16f7cc4e5b
2 changed files with 8 additions and 3 deletions

View File

@ -99,8 +99,8 @@ class BlogPost(osv.Model):
'res.users', 'Last Contributor',
select=True, readonly=True,
),
'visits': fields.integer('No of Views'),
'ranking': fields.float('Ranking'),
'visits': fields.integer('No of Views', readonly=True),
'ranking': fields.float('Ranking', readonly=True),
'author_image': fields.related('create_uid','partner_id', 'image_small', string='Author Photo', type='binary')
}
_defaults = {

View File

@ -56,11 +56,16 @@
<sheet>
<h1><field name="name" placeholder="Name"/></h1>
<field name="tag_ids" widget="many2many_tags"/>
<field name="sub_title"/>
<field name="sub_title" placeholder="Blog Subtitle"/>
<group>
<field name="content_image"/>
<field name="blog_id"/>
</group>
<group>
<field name="author_image"/>
<field name="visits"/>
<field name="ranking" invisible="1"/>
</group>
<field name="content" placeholder="e.g. Once upon a time..." widget="html"/>
<group string="Technical" groups="base.group_no_one">
<field name="write_uid" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_document_user']}"/>