[IMP] uniformisation layout views / wizards Human resourses
authornel@tinyerp.com <>
Mon, 29 Mar 2010 08:49:49 +0000 (10:49 +0200)
committernel@tinyerp.com <>
Mon, 29 Mar 2010 08:49:49 +0000 (10:49 +0200)
bzr revid: nel@tinyerp.com-20100329084949-zfqbfqrxqgqxea4n

addons/hr/hr_view.xml
addons/hr_attendance/hr_attendance_view.xml
addons/hr_attendance/wizard/print_attendance_error.py
addons/hr_attendance/wizard/print_bymonth.py
addons/hr_attendance/wizard/print_byweek.py
addons/hr_holidays/hr_view.xml
addons/hr_holidays/wizard/holidays_summary_employees.py

index f98150f..f8b7c58 100644 (file)
 
                     <group expand="1" string="Group By..." colspan="11" col="11">
                         <filter string="Manager" icon="terp-sale" domain="[]" context="{'group_by':'parent_id'}"/>
+                        <filter string="Department" icon="terp-sale" domain="[]" context="{'group_by':'department_id'}"/>
+                        <filter string="Job" icon="terp-sale" domain="[]" context="{'group_by':'job_id'}"/>
                     </group>
                 </search>
              </field>
index 0c25e6e..a97987d 100644 (file)
             <field name="inherit_id" ref="hr.view_employee_form"/>
             <field name="arch" type="xml">
                 <field name="coach_id" position="after">
+                  <group col="7" colspan="4">
                     <field name="state"/>
                     <button name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}"/>
                     <button name="attendance_action_change" states="present" string="Sign Out" type="object" icon="gtk-go-forward" context="{'type':'sign_out'}"/>
+                  </group>
                 </field>
             </field>
         </record>
index 8250331..c7c9ab1 100644 (file)
@@ -25,7 +25,7 @@ import pooler
 from tools.translate import _
 
 _date_form = '''<?xml version="1.0"?>
-<form string="Select a time span">
+<form string="Attendance Report">
     <separator string="Analysis Information" colspan="4"/>
     <field name="init_date"/>
     <field name="end_date"/>
@@ -62,7 +62,7 @@ class wiz_attendance(wizard.interface):
     states = {
         'init': {
             'actions': [],
-            'result': {'type': 'form', 'arch':_date_form, 'fields':_date_fields, 'state':[('print','Print Attendance Report'),('end','Cancel') ]}
+            'result': {'type': 'form', 'arch':_date_form, 'fields':_date_fields, 'state':[('end','Cancel', 'gtk-cancel'),('print','Print', 'gtk-ok') ]}
         },
         'print': {
             'actions': [_check_data],
index a20f525..ae2d5df 100644 (file)
@@ -23,7 +23,7 @@ import wizard
 import time
 
 _date_form = '''<?xml version="1.0"?>
-<form string="Select a month">
+<form string="Timesheets by month">
     <separator string="Select a month" colspan="4"/>
     <field name="month"/>
     <field name="year"/>
@@ -49,11 +49,11 @@ class wiz_bymonth(wizard.interface):
     states = {
         'init': {
             'actions': [],
-            'result': {'type': 'form', 'arch':_date_form, 'fields':_date_fields, 'state':[('print', 'Print Timesheet'), ('end', 'Cancel')]}
+            'result': {'type': 'form', 'arch':_date_form, 'fields':_date_fields, 'state':[ ('end', 'Cancel', 'gtk-cancel'),('print', 'Print', 'gtk-ok')] }
         },
         'print': {
             'actions': [],
-            'result': {'type': 'print', 'report': 'hr.attendance.bymonth', 'state': 'end'}
+            'result': {'type': 'print', 'report': 'hr.attendance.bymonth', 'state': 'end' }
         }
     }
 wiz_bymonth('hr.attendance.print_month')
index 8922cef..d859e81 100644 (file)
@@ -23,7 +23,7 @@ import wizard
 import time
 
 _date_form = '''<?xml version="1.0"?>
-<form string="Select a time span">
+<form string="Timesheets by week">
     <separator string="Select a starting and a end date" colspan="4"/>
     <field name="init_date"/>
     <newline/>
@@ -39,7 +39,7 @@ class wiz_byweek(wizard.interface):
     states = {
         'init': {
             'actions': [],
-            'result': {'type': 'form', 'arch':_date_form, 'fields':_date_fields, 'state':[('print','Print Timesheet'),('end','Cancel') ]}
+            'result': {'type': 'form', 'arch':_date_form, 'fields':_date_fields, 'state':[('end','Cancel', 'gtk-cancel'), ('print','Print', 'gtk-ok')]}
         },
         'print': {
             'actions': [],
index b5de7ee..e8d3d6e 100644 (file)
                                                                help="My Departments Leaves"/>
                           </field>
                       </group>
+                      <newline/>
+                    <group expand="1" string="Group By..." colspan="2" col="2">
+                        <filter string="Employee" icon="terp-sale" domain="[]" context="{'group_by':'employee_id'}"/>
+                        <filter string="Department" icon="terp-sale" domain="[]" context="{'group_by':'department_id'}"/>
+                        <filter string="Manager" icon="terp-sale" domain="[]" context="{'group_by':'manager_id'}"/>
+                    </group>
+
                  </search>
             </field>
         </record>
             parent="hr.menu_open_view_attendance_reason_config"/>
 
     <!--  Shortcuts -->
-        <act_window name="My Holiday Requests"
+        <act_window name="Holidays"
             domain="[('employee_id', '=', active_id), ('type','=','remove')]"
             res_model="hr.holidays"
             src_model="hr.employee"
index a621e6d..c4e92a1 100644 (file)
@@ -26,7 +26,7 @@ import pooler
 
 
 form='''<?xml version="1.0"?>
-<form string="Report Options">
+<form string="Employee's Holidays">
     <field name="date_from" colspan="2" />
     <field name="holiday_type" colspan="2" />
     <field name="emp" colspan="4" invisible="True"/>
@@ -67,7 +67,7 @@ class wizard_report(wizard.interface):
     states={
         'init':{
             'actions':[_check],
-            'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel'), ('checkemp', 'Print')]}
+            'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel', 'gtk-cancel'), ('checkemp', 'Print', 'gtk-ok')]}
         },
         'checkemp': {
             'actions': [],