Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma
into lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma/+merge/101073
Hello,
Hr_recruitment: I have improved state filed based on stage for kanban view
Thanks.
mma
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma/+merge/101073
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma
into lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban.
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py 2012-03-07 05:49:19 +0000
+++ hr_recruitment/hr_recruitment.py 2012-04-06 09:25:40 +0000
@@ -69,10 +69,16 @@
'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': lambda *a: 'draft',
}
hr_recruitment_stage()
@@ -144,11 +150,7 @@
'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 @@
'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),
=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml 2012-03-29 13:00:46 +0000
+++ hr_recruitment/hr_recruitment_view.xml 2012-04-06 09:25:40 +0000
@@ -61,7 +61,7 @@
<field name="availability" invisible="1"/>
<field name="department_id" invisible="context.get('invisible_department', True)"/>
<field name="user_id"/>
- <field name="state"/>
+ <field name="state" groups="base.group_no_one"/>
<button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
</tree>
@@ -130,12 +130,12 @@
<field name="date_closed"/>
<field name="date_open"/>
</group>
- <separator colspan="4" string="Status"/>
- <group col="8" colspan="4">
+ <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="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>
@@ -180,7 +180,7 @@
<graph string="Cases By Stage and Estimates" type="bar" orientation="vertical">
<field name="job_id"/>
<field name="salary_expected" operator="+"/>
- <field name="state" group="True"/>
+ <field name="state" group="True" groups="base.group_no_one"/>
</graph>
</field>
</record>
@@ -193,15 +193,15 @@
<search string="Search Jobs">
<filter icon="terp-document-new" string="New" name="filter_new"
domain="[('state','=','draft')]"
- help="All Initial Jobs"
+ help="All Initial Jobs" groups="base.group_no_one"
/>
<filter icon="terp-camera_test" string="In Progress" name="filter_inprogress"
domain="[('state','=','open')]"
- help="Open Jobs"
+ help="Open Jobs" groups="base.group_no_one"
/>
<filter icon="terp-gtk-media-pause" string="Pending"
domain="[('state','=','pending')]"
- help="Pending Jobs"
+ help="Pending Jobs" groups="base.group_no_one"
/>
<separator orientation="vertical"/>
<filter icon="terp-gtk-jump-to-ltr" string="Next Actions"
@@ -225,7 +225,7 @@
<separator orientation="vertical"/>
<filter string="Appreciation" icon="terp-face-plain" domain="[]" context="{'group_by':'priority'}"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
- <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+ <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
<filter string="Source" icon="terp-face-plain" domain="[]" context="{'group_by':'source_id'}"/>
<separator orientation="vertical" groups="base.group_no_one"/>
<filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
@@ -394,6 +394,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"/>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp