[merge] from trunk-state_sync_with_kanban-hr_applicant-mma

bzr revid: rlo@openerp.com-20120418084608-94m5qo50gfnwfqwx
This commit is contained in:
Roberto López López (OpenERP) 2012-04-18 10:46:08 +02:00
commit 2ec5782672
2 changed files with 24 additions and 6 deletions

View File

@ -69,10 +69,16 @@ class hr_recruitment_stage(osv.osv):
'name': fields.char('Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."),
'department_id':fields.many2one('hr.department', 'Specific to a Department', help="Stages of the recruitment process may be different per department. If this stage is common to all departments, keep tempy this field."),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'requirements': fields.text('Requirements')
}
_defaults = {
'sequence': 1,
'state': 'draft',
}
hr_recruitment_stage()
@ -144,11 +150,7 @@ class hr_applicant(crm.crm_case, osv.osv):
'create_date': fields.datetime('Creation Date', readonly=True, select=True),
'write_date': fields.datetime('Update Date', readonly=True),
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage'),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'state': fields.related('stage_id','state', type='char', selection=AVAILABLE_STATES, string="State", store=True, readonly=True),
'company_id': fields.many2one('res.company', 'Company'),
'user_id': fields.many2one('res.users', 'Responsible'),
# Applicant Columns
@ -169,7 +171,6 @@ class hr_applicant(crm.crm_case, osv.osv):
'partner_mobile': fields.char('Mobile', size=32),
'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
'department_id': fields.many2one('hr.department', 'Department'),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'survey': fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
'response': fields.integer("Response"),
'reference': fields.char('Refered By', size=128),

View File

@ -138,6 +138,22 @@
<field name="source_id"/>
<field name="reference"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Dates"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
<field name="date_open"/>
</group>
<separator colspan="4" string="Status" groups="base.group_no_one"/>
<group col="8" colspan="4" groups="base.group_no_one">
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel" />
<button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward" />
<button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause" />
<button name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/>
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Notes">
<field name="description" nolabel="1" colspan="4"/>
@ -374,6 +390,7 @@
<field name="name" select="1"/>
<field name="department_id" groups="base.group_extended"/>
<field name="sequence"/>
<field name="state"/>
</group>
<separator string="Requirements" colspan="4"/>
<field name="requirements" nolabel="1" colspan="4"/>