Launchpad automatic translations update.
[odoo/odoo.git] / addons / hr_timesheet_sheet / hr_timesheet_sheet_view.xml
index ba95a27..10ea662 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
+
        <record id="hr_timesheet_sheet_graph" model="ir.ui.view">
          <field name="name">hr.timesheet.sheet.graph</field>
          <field name="model">hr_timesheet_sheet.sheet</field>
                 </form>
             </field>
         </record>
-
+        <record id="hr_timesheet_account_filter" model="ir.ui.view">
+            <field name="name">hr.timesheet.account.filter</field>
+            <field name="model">hr_timesheet_sheet.sheet.account</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Search Account">
+                    <group col="10" colspan="4">
+                        <field name="sheet_id" />
+                        <field name="name" groups="analytic.group_analytic_accounting"/>
+                        <field name="invoice_rate"/>
+                    </group>
+                </search>
+            </field>
+        </record>
         <record id="hr_timesheet_account_tree" model="ir.ui.view">
             <field name="name">hr.timesheet.account.tree</field>
             <field name="model">hr_timesheet_sheet.sheet.account</field>
                         <field name="state"/>
                         <button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-check"/>
                         <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="Approve" type="workflow" icon="terp-camera_test"/>
+                        <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/>
+                        <button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/>
                     </group>
                 </form>
             </field>
             <field name="view_id" eval="False"/>
             <field name="context">{'search_default_my_timesheet':1, }</field>
             <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
-            <field name="help">Employees can encode their time spent on the different projects. A project is an analytic account and the time spent on a project generate costs on the analytic account.</field>
+            <field name="help">Check your timesheets for a specific period. You can also encode time spent on a project (i.e. an analytic account) thus generating costs in the analytic account concerned.</field>
         </record>
 
-        <!--Time Tracking menu in project Management-->
-        <menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
-        <menuitem
-             id="base.menu_project_management_time_tracking"
-             name="Time Tracking"
-             parent="base.menu_main_pm" sequence="5" groups="project.group_project_finance_user"/>
-        <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="2"/>
+             sequence="2" groups="base.group_hr_user,base.group_hr_manager"/>
 
         <!--
             Company inheritancy
         </record>
 
         <act_window
-        context="{'search_default_sheet_id': [active_id]}"
+        context="{'search_default_sheet_id': [active_id], 'default_sheet_id': active_id}"
         id="act_hr_timesheet_sheet_sheet_by_day"
         name="Timesheet by Account"
         res_model="hr_timesheet_sheet.sheet.account"
         src_model="hr_timesheet_sheet.sheet"/>
 
         <act_window
-        context="{'search_default_sheet_id': [active_id]}"
+        context="{'search_default_sheet_id': [active_id], 'default_sheet_id': active_id}"
         id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet"
         name="Timesheet Lines"
         res_model="hr.analytic.timesheet"
 
 
         <act_window
-        context="{'search_default_sheet_id': [active_id]}"
+        context="{'search_default_sheet_id': [active_id], 'default_sheet_id': active_id}"
         id="act_hr_timesheet_sheet_sheet_2_hr_attendance"
         name="Attendances"
         res_model="hr.attendance"
         </record>
   <!-- Timesheet Button on Employee Form -->
   <act_window
-           context="{'search_default_employee_id': [active_id]}"
+           context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
            id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>
 
     </data>