[FIX] website_event_track: fix speaker image not displayed once logged out

bzr revid: dle@openerp.com-20140129130836-fnewn1u4r4odyzjj
This commit is contained in:
Denis Ledoux 2014-01-29 14:08:36 +01:00
parent 0306adbfe3
commit dbcdbab2ba
2 changed files with 3 additions and 2 deletions

View File

@ -84,6 +84,7 @@ class event_track(osv.osv):
'priority': fields.selection([('3','Low'),('2','Medium (*)'),('1','High (**)'),('0','Highest (***)')], 'Priority', required=True),
'website_published': fields.boolean('Available in the website'),
'website_url': fields.function(_website_url, string="Website url", type="char"),
'image': fields.related('speaker_ids', 'image', type='binary', readonly=True)
}
def set_priority(self, cr, uid, ids, priority, context={}):
return self.write(cr, uid, ids, {'priority' : priority})

View File

@ -136,8 +136,8 @@
</div>
<div class="row mb32" t-foreach="tracks" t-as="track">
<div class="col-sm-2">
<t t-if="len(track.speaker_ids)">
<span t-field="track.speaker_ids[0].image"
<t t-if="track.image">
<span t-field="track.image"
t-field-options='{"widget": "image", "class": "img-circle"}'/>
</t>
</div>