[IMP] change in yml

bzr revid: kjo@tinyerp.com-20120608084141-yoguolq375aaz5eg
This commit is contained in:
Kuldeep Joshi (OpenERP) 2012-06-08 14:11:41 +05:30
parent ba02676837
commit f139b2d594
3 changed files with 9 additions and 5 deletions

View File

@ -135,6 +135,10 @@ class hr_job(osv.osv):
return True
def job_open(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'open', 'no_of_recruitment': 0})
return True
def job_done(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'done', 'no_of_recruitment': 0})
return True

View File

@ -347,7 +347,7 @@
<form layout="manual">
<header>
<button name="job_recruitement" string="In Recruitement" states="open" type="object"/>
<button name="job_open" string="Recruitment Done" states="recruit" type="object"/>
<button name="job_done" string="Recruitment Done" states="recruit" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
</header>
<sheet string="Job" layout="auto">

View File

@ -26,13 +26,13 @@
!python {model: hr.employee}: |
self.write(cr, uid, [ref('employee_niv')], {'job_id':ref('job_developer')})
-
Now I dont want to recruit new employee for this position. so I mark it as Old.
Now I dont want to recruit new employee for this position. so I mark it as Done.
-
!python {model: hr.job}: |
self.job_old(cr, uid, [ref('job_developer')])
self.job_done(cr, uid, [ref('job_developer')])
-
I check 'state' and number of 'Expected in Recruitment' after closing the Job position.
-
!assert {model: hr.job, id: job_developer, string: Job position is in 'old' state and no_of_recruitment = 0}:
- state == 'old'
!assert {model: hr.job, id: job_developer, string: Job position is in 'done' state and no_of_recruitment = 0}:
- state == 'done'
- no_of_recruitment == 0