[IMP]:hr_evaluation:Set domain in Phase for particular plan and also improved the...
authorapa-tiny <apa@tinyerp.com>
Thu, 21 Jan 2010 06:00:41 +0000 (11:30 +0530)
committerapa-tiny <apa@tinyerp.com>
Thu, 21 Jan 2010 06:00:41 +0000 (11:30 +0530)
bzr revid: apa@tinyerp.com-20100121060041-k7131au9ve6l6ocp

addons/hr_evaluation/hr_evaluation.py
addons/hr_evaluation/hr_evaluation_view.xml

index df24164..41056d7 100644 (file)
@@ -52,7 +52,7 @@ class hr_evaluation_plan_phase(osv.osv):
             ('bottom-up','Bottom-Up Appraisal Requests'),
             ('self','Self Appraisal Requests'),
             ('final','Final Interview')], 'Action', required=True),
-        'survey_id': fields.many2one('survey','Appraisal Form'),
+        'survey_id': fields.many2one('survey','Appraisal Form',required=True),
         'send_answer_manager': fields.boolean('All Answers',
             help="Send all answers to the manager"),
         'send_answer_employee': fields.boolean('All Answers',
index 451763f..58aa5f4 100644 (file)
@@ -54,6 +54,7 @@
                        <field name="type">form</field>
                        <field name="arch" type="xml">
                                <form string="Evaluation Plan Phase">
+                                       <field name="plan_id" invisible="1"/>
                                        <group col="6" colspan="4">
                                                <field name="name"/>
                                                <field name="wait"/>
                                                <field name="employee_id" select="1"/>
                                                <field name="manager_id" select="1"/>
                                                <field name="plan_id"/>
-                                               <field name="phase_id"/>
+                                               <field name="phase_id" domain="[('plan_id', '=', plan_id)]"/>
                                        </group>
                                        <notebook colspan="4">
                                    <page string="Appraisal">