Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-hr_appraisal_wkf-mma into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-hr_appraisal_wkf-mma/+merge/96062

Hello,

I have improved the following things:

Hr_evaluation:
1] Added Button in form and list view of interview question and set a position 
of button 
2] Removed print & set to draft button
3] Removed a progress bar field and Demo Data
4] Give access right to the employee 
5] Hide a group and notebook in related state 

Thanks.
mma
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-hr_appraisal_wkf-mma/+merge/96062
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-hr_appraisal_wkf-mma.
=== modified file 'hr_evaluation/hr_evaluation.py'
--- hr_evaluation/hr_evaluation.py	2012-02-13 15:27:55 +0000
+++ hr_evaluation/hr_evaluation.py	2012-03-06 05:59:22 +0000
@@ -167,7 +167,6 @@
             ('cancel','Cancelled'),
         ], 'State', required=True, readonly=True),
         'date_close': fields.date('Ending Date', select=True),
-        'progress': fields.float("Progress"),
     }
     _defaults = {
         'date': lambda *a: (parser.parse(datetime.now().strftime('%Y-%m-%d')) + relativedelta(months =+ 1)).strftime('%Y-%m-%d'),
@@ -245,7 +244,6 @@
         return True
 
     def button_done(self,cr, uid, ids, context=None):
-        self.write(cr, uid, ids,{'progress': 1 * 100}, context=context)
         self.write(cr, uid, ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
         return True
 
@@ -312,7 +310,6 @@
         for id in self.browse(cr, uid, ids, context=context):
             flag = False
             wating_id = 0
-            tot_done_req = 1
             if not id.evaluation_id.id:
                 raise osv.except_osv(_('Warning !'),_("You cannot start evaluation without Appraisal."))
             records = hr_eval_obj.browse(cr, uid, [id.evaluation_id.id], context=context)[0].survey_request_ids
@@ -322,11 +319,8 @@
                     continue
                 if child.state != "done":
                     flag = True
-                else:
-                    tot_done_req += 1
             if not flag and wating_id:
                 self.survey_req_waiting_answer(cr, uid, [wating_id], context=context)
-            hr_eval_obj.write(cr, uid, [id.evaluation_id.id], {'progress': tot_done_req * 100 / len(records)}, context=context)
         self.write(cr, uid, ids, { 'state': 'done'}, context=context)
         return True
 

=== modified file 'hr_evaluation/hr_evaluation_data.xml'
--- hr_evaluation/hr_evaluation_data.xml	2011-12-19 16:54:40 +0000
+++ hr_evaluation/hr_evaluation_data.xml	2012-03-06 05:59:22 +0000
@@ -2,7 +2,7 @@
 <openerp>
     <data noupdate="1">
         <record id="survey_2" model="survey">
-            <field name="title">Employee Appraisal</field>
+            <field name="title">Self Appraisal</field>
             <field name="max_response_limit">20</field>
             <field eval="[(6,0,[])]" name="users"/>
             <field name="type" ref="survey.survey_type1"/>
@@ -1157,37 +1157,11 @@
     </data>
 
     <data noupdate="1">
-        <record id="hr_evaluation_plan_phase_sendtosubordinates0" model="hr_evaluation.plan.phase">
-            <field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
-            <field name="name">Send to Subordinates</field>
-            <field eval="0" name="send_anonymous_manager"/>
-            <field eval="1" name="sequence"/>
-            <field name="company_id" ref="base.main_company"/>
-            <field name="action">bottom-up</field>
-            <field eval="0" name="send_anonymous_employee"/>
-            <field eval="0" name="send_answer_employee"/>
-            <field name="survey_id" ref="hr_evaluation.survey_2"/>
-            <field eval="0" name="send_answer_manager"/>
-            <field eval="0" name="wait"/>
-        </record>
-        <record id="hr_evaluation_plan_phase_sendtomanagers0" model="hr_evaluation.plan.phase">
-            <field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
-            <field name="name">Send to Managers</field>
-            <field eval="0" name="send_anonymous_manager"/>
-            <field eval="2" name="sequence"/>
-            <field name="company_id" ref="base.main_company"/>
-            <field name="action">top-down</field>
-            <field eval="0" name="send_anonymous_employee"/>
-            <field eval="0" name="send_answer_employee"/>
-            <field name="survey_id" ref="hr_evaluation.survey_2"/>
-            <field eval="0" name="send_answer_manager"/>
-            <field eval="0" name="wait"/>
-        </record>
         <record id="hr_evaluation_plan_phase_sendtoemployee0" model="hr_evaluation.plan.phase">
             <field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
             <field name="name">Send to Employee</field>
             <field eval="0" name="send_anonymous_manager"/>
-            <field eval="3" name="sequence"/>
+            <field eval="1" name="sequence"/>
             <field name="company_id" ref="base.main_company"/>
             <field name="action">self</field>
             <field eval="0" name="send_anonymous_employee"/>
@@ -1196,19 +1170,6 @@
             <field eval="0" name="send_answer_manager"/>
             <field eval="0" name="wait"/>
         </record>
-        <record id="hr_evaluation_plan_phase_finalinterviewwithmanager0" model="hr_evaluation.plan.phase">
-            <field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
-            <field name="name">Final Interview With Manager</field>
-            <field eval="0" name="send_anonymous_manager"/>
-            <field eval="4" name="sequence"/>
-            <field name="company_id" ref="base.main_company"/>
-            <field name="action">final</field>
-            <field eval="0" name="send_anonymous_employee"/>
-            <field eval="0" name="send_answer_employee"/>
-            <field name="survey_id" ref="hr_evaluation.survey_2"/>
-            <field eval="0" name="send_answer_manager"/>
-            <field eval="1" name="wait"/>
-        </record>
     </data>
 
     <data noupdate="1">

=== modified file 'hr_evaluation/hr_evaluation_view.xml'
--- hr_evaluation/hr_evaluation_view.xml	2012-01-03 09:11:18 +0000
+++ hr_evaluation/hr_evaluation_view.xml	2012-03-06 05:59:22 +0000
@@ -160,21 +160,20 @@
                         <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
                         <field name="plan_id"/>
                         <field name="date"/>
-                        <field name="progress" widget="progressbar"/>
                     </group>
-                    <group col="2" colspan="1">
+                    <group col="2" colspan="1" attrs="{'invisible':['|', ('state','=','draft'), ('state', '=', 'wait')]}">
                         <separator string="Ending Summary" colspan="2"/>
                         <field name="rating" attrs="{'readonly':[('state','&lt;&gt;','progress')],'required':[('state','=','progress')]}"/>
                         <field name="date_close" readonly="1"/>
                     </group>
                     <notebook colspan="4">
-                        <page string="Appraisal">
+                        <page string="Appraisal" attrs="{'invisible':[('state','=','draft')]}">
                             <field name="survey_request_ids" nolabel="1" colspan="4" widget="one2many">
                                 <form string="Interview Appraisal">
                                     <group col="4" colspan="4">
                                         <field name="survey_id"/>
                                         <group col="2" colspan="2">
-                                            <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
+                                            <button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
                                             <button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
                                         </group>
                                         <field name="date_deadline"/>
@@ -190,19 +189,17 @@
                                 </form>
                             </field>
                         </page>
-                        <page string="Internal Notes">
+                        <page string="Internal Notes" attrs="{'invisible':[('state','=','draft')]}">
                             <field name="note_action" colspan="4" nolabel="1"
                                 groups="base.group_hr_manager"/>
                         </page>
-                        <page string="Public Notes">
+                        <page string="Public Notes" attrs="{'invisible':[('state','=','draft')]}">
                             <field name="note_summary" colspan="4" nolabel="1"/>
                         </page>
                     </notebook>
                     <newline/>
                     <group col="8" colspan="4">
                         <field name="state" widget="statusbar" statusbar_visible="draft,progress,wait,done" statusbar_colors='{"progress":"blue"}'/>
-                        <button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
-                                icon="gtk-cancel"/>
                         <button name="button_plan_in_progress" string="Start Appraisal" states="draft" type="object"
                                 icon="gtk-execute"/>
                         <button name="button_done" string="Done" states="progress" type="object"
@@ -211,6 +208,8 @@
                                 icon="terp-stock_effects-object-colorize"/>
                         <button name="button_final_validation" string="Validate Appraisal" states="wait" type="object"
                                 icon="gtk-go-forward"/>
+                        <button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
+                                icon="gtk-cancel"/>
                     </group>
               </form>
             </field>
@@ -259,6 +258,9 @@
                     <separator orientation="vertical"/>
                     <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
                         help="Appraisal that overpassed the deadline" domain="[('date','&lt;=',(datetime.date.today()).strftime('%%Y-%%m-%%d'))]" />
+                    <filter icon="terp-go-month" name="next_month" string=" Month+1" 
+                         domain="[('date','&lt;=', (datetime.date.today() + relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() + relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d')),('state','=','draft')]"
+                         help="Appraisal during next month"/>
                     <separator orientation="vertical"/>
                     <field name="employee_id" />
                     <field name="plan_id" widget="selection" />
@@ -282,6 +284,7 @@
             <field name="view_type">form</field>
             <field name="view_mode">tree,form,graph</field>
             <field name="search_view_id" ref="hr_evaluation.evaluation_search"/>
+             <field name="context">{"search_default_next_month":1}</field>
             <field name="help">Each employee may be assigned an Appraisal Plan. Such a plan defines the frequency and the way you manage your periodic personnel evaluation. You will be able to define steps and attach interviews to each step. OpenERP manages all kind of evaluations: bottom-up, top-down, self-evaluation and final evaluation by the manager.</field>
         </record>
 
@@ -298,8 +301,7 @@
                         <field name="survey_id"/>
                         <field name="evaluation_id"/>
                         <group col="2" colspan="2">
-                            <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
-                            <button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
+                            <button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
                         </group>
                         <field name="date_deadline"/>
                         <field name="response" readonly="1"/>
@@ -316,7 +318,10 @@
                     <newline/>
                     <separator string="State" colspan="4"/>
                     <group colspan="4" col="6">
-                         <field name="state"/>
+                         <field name="state" widget="statusbar" statusbar_visible="waiting_answer,done"/>
+                                <button string="Send Request" name="survey_req_waiting_answer" states="draft" type="object" icon="gtk-yes" />
+                                <button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" />
+                                <button string="Cancel" name="survey_req_cancel" states="draft,waiting_answer" type="object" icon="gtk-cancel"/>
                     </group>
                 </form>
             </field>
@@ -333,11 +338,12 @@
                     <field name="user_id" string="Interviewer"/>
                     <field name="user_to_review_id"/>
                     <field name="response" readonly="1" invisible="True"/>
-                    <button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
-                    <button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0}" attrs="{'readonly':[('response','=',False)]}" />
+                    <button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
                     <button name="action_print_survey" string="Print Survey" type="object" icon="gtk-print" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}" attrs="{'readonly':[('survey_id','=',False)]}"/>
                     <button name="%(mail.action_email_compose_message_wizard)d" string="Send Reminder Email" icon="terp-mail-message-new" type="action" colspan="2" states="waiting_answer"/>
                     <field name="state"/>
+                    <button string="Send Request" name="survey_req_waiting_answer" states="draft" type="object" icon="gtk-yes" />
+                    <button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" />
                 </tree>
             </field>
         </record>

=== modified file 'hr_evaluation/report/hr_evaluation_report.py'
--- hr_evaluation/report/hr_evaluation_report.py	2011-01-14 00:11:01 +0000
+++ hr_evaluation/report/hr_evaluation_report.py	2012-03-06 05:59:22 +0000
@@ -31,7 +31,6 @@
         'create_date': fields.date('Create Date', readonly=True),
         'delay_date':fields.float('Delay to Start', digits=(16,2),readonly=True),
         'overpass_delay':fields.float('Overpassed Deadline', digits=(16,2), readonly=True),
-        'progress_bar' : fields.float("Progress"),
         'day': fields.char('Day', size=128, readonly=True),
         'deadline': fields.date("Deadline", readonly=True),
         'request_id': fields.many2one('survey.request', 'Request_id', readonly=True),
@@ -77,7 +76,6 @@
                      to_char(s.create_date, 'MM') as month,
                      count(l.*) as nbr,
                      s.state,
-                     s.progress as progress_bar,
                      avg(extract('epoch' from age(s.create_date,CURRENT_DATE)))/(3600*24) as  delay_date,
                      avg(extract('epoch' from age(s.date,CURRENT_DATE)))/(3600*24) as overpass_delay
                      from
@@ -96,7 +94,6 @@
                      s.date_close,
                      l.request_id,
                      s.rating,
-                     s.progress,
                      s.plan_id
             )
         """)

=== modified file 'hr_evaluation/report/hr_evaluation_report_view.xml'
--- hr_evaluation/report/hr_evaluation_report_view.xml	2011-11-14 09:18:31 +0000
+++ hr_evaluation/report/hr_evaluation_report_view.xml	2012-03-06 05:59:22 +0000
@@ -20,7 +20,6 @@
                 <field name="rating" invisible="1"/>
                 <field name="state" invisible="1"/>
                 <field name="nbr" sum="# of Requests"/>
-                <field name="progress_bar" widget="progressbar"/>
                 <field name="delay_date"/>
                 <field name="overpass_delay"/>
             </tree>

=== modified file 'hr_evaluation/security/ir.model.access.csv'
--- hr_evaluation/security/ir.model.access.csv	2012-02-07 09:07:41 +0000
+++ hr_evaluation/security/ir.model.access.csv	2012-03-06 05:59:22 +0000
@@ -25,7 +25,7 @@
 access_survey_response_hr_user,survey.response.hr.user,survey.model_survey_response,base.group_hr_user,1,1,1,0
 access_survey_history_hr_user,survey.history.hr.user,survey.model_survey_history,base.group_hr_user,1,1,1,0
 access_survey_request_hr_user,survey.request.hr.user,survey.model_survey_request,base.group_hr_user,1,1,1,0
-access_survey_question_column_heading_hr_user,survey.question.column.heading.hr.user,survey.model_survey_question_column_heading,base.group_hr_user,1,0,0,0
+access_survey_question_column_heading_hr_user,survey.question.column.heading.hr.user,survey.model_survey_question_column_heading,base.group_hr_user,1,1,1,0
 access_survey_response_line_hr_user,survey.response.line.hr.user,survey.model_survey_response_line,base.group_hr_user,1,1,1,0
 access_survey_tbl_column_heading_hr_user,survey.tbl.column.heading.hr.user,survey.model_survey_tbl_column_heading,base.group_hr_user,1,1,1,0
 access_base_calendar_attendee_survey_user,base.calendar.calendar.attendee.survey.user,base_calendar.model_calendar_attendee,base.group_survey_user,1,1,1,0

_______________________________________________
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

Reply via email to