[ADD/MOD] hr_timesheet_sheet : Current timesheet menu added for user, improvemetns...
authorVir (Open ERP) <vir@tinyerp.com>
Thu, 16 Sep 2010 05:59:56 +0000 (11:29 +0530)
committerVir (Open ERP) <vir@tinyerp.com>
Thu, 16 Sep 2010 05:59:56 +0000 (11:29 +0530)
bzr revid: vir@tinyerp.com-20100916055956-zkrajl66gv7y50b7

addons/hr_timesheet_sheet/__openerp__.py
addons/hr_timesheet_sheet/hr_timesheet_sheet.py
addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
addons/hr_timesheet_sheet/security/ir.model.access.csv
addons/hr_timesheet_sheet/wizard/hr_timesheet_current_view.xml [new file with mode: 0644]

index 73bb496..1b554a6 100644 (file)
@@ -56,6 +56,7 @@ The validation can be configured in the company:
         'report/timesheet_report_view.xml',
         'board_hr_timesheet_view.xml',
         'report/hr_timesheet_report_view.xml',
+        'wizard/hr_timesheet_current_view.xml',
     ],
     'demo_xml': ['hr_timesheet_sheet_demo.xml',
 
index acbe668..624ce72 100644 (file)
@@ -754,7 +754,7 @@ class res_company(osv.osv):
                  "computation for one sheet. Set this to 0 if you do not want any control."),
     }
     _defaults = {
-        'timesheet_range': lambda *args: 'month',
+        'timesheet_range': lambda *args: 'week',
         'timesheet_max_difference': lambda *args: 0.0
     }
 
index e4c4fde..d9b666c 100644 (file)
                     </notebook>
                     <field name="state"/>
                     <group col="4" colspan="2">
-                        <button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-gtk-jump-to-rtl"/>
+                        <button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
                         <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
                         <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel"/>
-                        <button name="done" states="confirm" string="Accept" type="workflow" icon="terp-camera_test"/>
+                        <button name="done" states="confirm" string="Approve" type="workflow" icon="gtk-jump-to"/>
                     </group>
                 </form>
             </field>
                 <search string="Search Timesheet">
                     <group col="10" colspan="4">
                         <filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
-                        <filter icon="terp-gtk-go-back-rtl" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
+                        <filter icon="terp-camera_test" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
                         <separator orientation="vertical"/>
                         <field name="user_id" select="1"/>
                         <field name="date_from"/>
         <menuitem action="hr_timesheet_sheet.act_hr_timesheet_sheet_form" id="menu_act_project_management_timesheet_sheet_form" parent="base.menu_project_management_time_tracking"
               sequence="5"/>
         <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
-             sequence="1"/>
+             sequence="2"/>
 
         <!--
             Company inheritancy
index 9c47743..3ca4d96 100644 (file)
@@ -3,6 +3,11 @@
 "access_hr_timesheet_sheet_sheet_day","hr_timesheet_sheet.sheet.day","model_hr_timesheet_sheet_sheet_day","base.group_hr_user",1,1,1,1
 "access_hr_timesheet_sheet_sheet_account","hr_timesheet_sheet.sheet.account","model_hr_timesheet_sheet_sheet_account","base.group_hr_user",1,1,1,1
 "access_hr_timesheet_report","hr.timesheet.report","model_hr_timesheet_report","base.group_hr_manager",1,1,1,1
-"access_hr_timesheet_sheet_sheet_manager","hr_timesheet_sheet.sheet.manager","model_hr_timesheet_sheet_sheet","base.group_hr_manager",1,0,0,0
+"access_hr_timesheet_sheet_sheet_manager","hr_timesheet_sheet.sheet.manager","model_hr_timesheet_sheet_sheet","base.group_hr_manager",1,1,1,1
 "access_hr_timesheet_sheet_sheet_system","hr_timesheet_sheet.sheet.system","model_hr_timesheet_sheet_sheet","base.group_system",1,0,0,0
 "access_timesheet_report_manager","timesheet.report.manager","model_timesheet_report","base.group_hr_manager",1,1,1,1
+"access_hr_timesheet_sheet_sheet_employee","hr_timesheet_sheet.sheet.employee","model_hr_timesheet_sheet_sheet","base.group_user",1,0,0,0
+"access_hr_timesheet_sheet_sheet_day_manager","hr_timesheet_sheet.sheet.day.manager","model_hr_timesheet_sheet_sheet_day","base.group_hr_manager",1,1,1,1
+"access_hr_timesheet_sheet_sheet_account_manager","hr_timesheet_sheet.sheet.account.manager","model_hr_timesheet_sheet_sheet_account","base.group_hr_manager",1,1,1,1
+"access_hr_timesheet_sheet_sheet_day_employee","hr_timesheet_sheet.sheet.day.employee","model_hr_timesheet_sheet_sheet_day","base.group_user",1,0,0,0
+"access_hr_timesheet_sheet_sheet_account_employee","hr_timesheet_sheet.sheet.account.employee","model_hr_timesheet_sheet_sheet_account","base.group_user",1,0,0,0
diff --git a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current_view.xml b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current_view.xml
new file mode 100644 (file)
index 0000000..19eacda
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+      <record id="view_hr_timesheet_current_open" model="ir.ui.view">
+        <field name="name">hr_timesheet_current_open.form</field>
+        <field name="model">hr.timesheet.current.open</field>
+        <field name="type">form</field>
+        <field name="arch" type="xml">
+            <form string="Current Timesheet">
+               <separator string="It will open the your current timesheet" colspan="4" />
+               <group colspan="4" col="6">
+                    <button  icon="gtk-cancel" special="cancel" string="Cancel"/>
+                    <button  icon="terp-camera_test" name="open_timesheet" string="Open" type="object"/>
+               </group>
+           </form>
+        </field>
+    </record>
+
+    <record id="action_hr_timesheet_current_open" model="ir.actions.act_window">
+        <field name="name">Current Timesheet</field>
+        <field name="res_model">hr.timesheet.current.open</field>
+        <field name="view_type">form</field>
+        <field name="view_mode">tree,form</field>
+        <field name="view_id" ref="view_hr_timesheet_current_open"/>
+        <field name="target">new</field>
+    </record>
+
+    <menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="Current Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
+
+    </data>
+</openerp>