[IMP] employee view
bzr revid: fp@fp-laptop-20111222221031-6vcsojhlxj48yan0
This commit is contained in:
parent
25599f2093
commit
8e66fe7f89
|
@ -174,6 +174,7 @@ class hr_employee(osv.osv):
|
|||
'passport_id':fields.char('Passport No', size=64),
|
||||
'color': fields.integer('Color Index'),
|
||||
'city': fields.related('address_id', 'city', type='char', string='City'),
|
||||
'login': fields.related('user_id', 'login', type='char', string='Login', readonly=1),
|
||||
}
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
<a type="edit"><img t-att-src="kanban_image('hr.employee', 'photo', record.id.value)" class="oe_employee_picture"/></a>
|
||||
</div>
|
||||
<div class="oe_employee_details">
|
||||
<h4><a type="edit"><field name="name"/> (<field name="user_id"/>)</a></h4>
|
||||
<h4><a type="edit"><field name="name"/> (<field name="login"/>)</a></h4>
|
||||
<ul>
|
||||
<li t-if="record.department_id.raw_value"><field name="department_id"/></li>
|
||||
<li t-if="record.job_id.raw_value"><field name="job_id"/></li>
|
||||
|
|
|
@ -417,7 +417,8 @@ class hr_employee(osv.osv):
|
|||
'current_leave_state': fields.function(_get_leave_status, multi="leave_status", string="Current Leave Status", type="selection",
|
||||
selection=[('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
|
||||
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')]),
|
||||
'current_leave_id': fields.function(_get_leave_status, multi="leave_status", string="Current Leave Type",type='many2one', relation='hr.holidays.status')
|
||||
'current_leave_id': fields.function(_get_leave_status, multi="leave_status", string="Current Leave Type",type='many2one', relation='hr.holidays.status'),
|
||||
'last_login': fields.related('user_id', 'date', type='datetime', string='Latest Connection', readonly=1)
|
||||
}
|
||||
|
||||
hr_employee()
|
||||
|
|
|
@ -494,7 +494,7 @@
|
|||
<field name="coach_id" position="after">
|
||||
<field name="remaining_leaves"/>
|
||||
<field name="current_leave_id"/>
|
||||
<field name="current_leave_state"/>
|
||||
<field name="current_leave_state" attrs="{'invisible':[('current_leave_id','=',False)]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue