← Back to team overview

savoirfairelinux-openerp team mailing list archive

[Merge] lp:~savoirfairelinux-openerp/openerp-program/program-evaluator-improvements into lp:~savoirfairelinux-openerp/openerp-program/program

 

David Cormier (Savoir-faire Linux) has proposed merging lp:~savoirfairelinux-openerp/openerp-program/program-evaluator-improvements into lp:~savoirfairelinux-openerp/openerp-program/program.

Requested reviews:
  Savoir-faire Linux' OpenERP (savoirfairelinux-openerp)

For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-program/program-evaluator-improvements/+merge/208165

Various improements

1. Evaluation code is not required
2. It is not necessary to select a target action for an evaluation when the evaluation is added from the action form.
3. If a res_partner has child res_partners, do not show them in the evaluator form
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-program/program-evaluator-improvements/+merge/208165
Your team Savoir-faire Linux' OpenERP is requested to review the proposed merge of lp:~savoirfairelinux-openerp/openerp-program/program-evaluator-improvements into lp:~savoirfairelinux-openerp/openerp-program/program.
=== modified file 'program_evaluation/program.py'
--- program_evaluation/program.py	2014-02-17 16:01:28 +0000
+++ program_evaluation/program.py	2014-02-25 15:42:45 +0000
@@ -32,7 +32,6 @@
         'code': fields.char(
             'Code',
             size=32,
-            required=True,
         ),
 
         'name': fields.char(

=== modified file 'program_evaluation/program_action_evaluation_view.xml'
--- program_evaluation/program_action_evaluation_view.xml	2014-02-17 16:01:28 +0000
+++ program_evaluation/program_action_evaluation_view.xml	2014-02-25 15:42:45 +0000
@@ -6,11 +6,10 @@
       <field name="model">program.action</field>
       <field name="inherit_id" ref="program.view_program_action_form" />
       <field name="arch" type="xml">
-        <xpath expr="//notebook/page[@name='children']" position="before">
-          <page name="team" string="Evaluation">
+        <xpath expr="//notebook/page[@name='children']" position="after">
+          <page name="evaluation" string="Evaluation">
             <group colspan="4" col="2">
-              <field name="evaluation">
-
+              <field name="evaluation" nolabel="1" context="{'from_action': True }"> 
               </field>
             </group>
           </page>

=== modified file 'program_evaluation/program_evaluation_view.xml'
--- program_evaluation/program_evaluation_view.xml	2014-02-17 16:01:28 +0000
+++ program_evaluation/program_evaluation_view.xml	2014-02-25 15:42:45 +0000
@@ -87,7 +87,9 @@
 	    </group>
 
 	    <group>
-	      <field name="action_id" />
+	      <field name="action_id"
+		     required="not context.get('from_action', False)"
+		     invisible="context.get('from_action', False)"/>
 	    </group>
 
 	    <group col="2">
@@ -101,7 +103,7 @@
 
 	    <notebook>
 	      <page name="evaluators" string="Evaluators">
-		<field name="evaluator_id" domain="[('is_company', '=', False)]"/>
+		<field name="evaluator_id" domain="[('is_company', '=', False), ('contact_id', '=', False)]"/>
 	      </page>
 	      <page name="recommendations" string="Recommendations">
 		<field name="recommendation_id" context="{ 'default_evaluation_id': active_id }"/>
@@ -119,7 +121,6 @@
       <field name="arch" type="xml">
         <tree string="Evaluation" version="7.0">
           <field name="name" />
-	  <field name="action_id" />
 	  <field name="date_start" />
 	  <field name="date_end" />
         </tree>


Follow ups