set default photo if no photo in hr
authorAmit (OpenERP) <apa@tinyerp.com>
Wed, 21 Sep 2011 07:25:47 +0000 (12:55 +0530)
committerAmit (OpenERP) <apa@tinyerp.com>
Wed, 21 Sep 2011 07:25:47 +0000 (12:55 +0530)
bzr revid: apa@tinyerp.com-20110921072547-s52tt15emftr0lwp

addons/hr/hr_view.xml

index b5192b6..8dffd1a 100644 (file)
                                     <table class="oe_kanban_table">
                                         <tr>
                                             <td valign="top" width="22">
-                                                <img t-att-src="'data:image/png;base64,'+record.photo.raw_value" width='48' height='48'/>
+                                                <t t-if="record.photo.raw_value">
+                                                    <img t-att-src="'data:image/png;base64,'+record.photo.raw_value" width='48' height='48'/>
+                                                </t>
+                                                <t t-if="!record.photo.raw_value">
+                                                    <img src="/web/static/src/img/employee.png"/>
+                                                </t> 
                                             </td>
                                             <td>
                                                 <div class="oe_kanban_title2"><field name="job_id"/></div>