129 lines
7.2 KiB
XML
129 lines
7.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<record id="hr_timesheet_line_tree" model="ir.ui.view">
|
|
<field name="name">hr.analytic.timesheet.tree</field>
|
|
<field name="model">hr.analytic.timesheet</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree editable="bottom" string="Timesheet Lines">
|
|
<field name="date" on_change="on_change_date(date)"/>
|
|
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
|
|
<field name="journal_id" invisible="1"/>
|
|
<field name="name"/>
|
|
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/>
|
|
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
|
|
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
|
|
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
|
|
<field name="amount" sum="Total cost" invisible="1"/>
|
|
<field name="general_account_id" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="hr_timesheet_line_form" model="ir.ui.view">
|
|
<field name="name">hr.analytic.timesheet.form</field>
|
|
<field name="model">hr.analytic.timesheet</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Timesheet Lines">
|
|
<group col="4">
|
|
<field name="name" colspan="4"/>
|
|
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
|
|
<field name="date" on_change="on_change_date(date)"/>
|
|
</group>
|
|
<notebook>
|
|
<page string="Information">
|
|
<group>
|
|
<group string="Product">
|
|
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
|
|
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
|
|
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
|
|
</group>
|
|
<group string="Accounting">
|
|
<field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id"/>
|
|
<field name="amount"/>
|
|
<field name="general_account_id"/>
|
|
<field name="journal_id"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="hr_timesheet_line_search" model="ir.ui.view">
|
|
<field name="name">hr.analytic.timesheet.search</field>
|
|
<field name="model">hr.analytic.timesheet</field>
|
|
<field name="type">search</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Timesheet">
|
|
<group>
|
|
<field name="date"/>
|
|
<separator orientation="vertical"/>
|
|
<field name="user_id"/>
|
|
<field name="account_id"/>
|
|
</group>
|
|
<newline/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
|
<separator orientation="vertical"/>
|
|
<filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
|
|
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
|
|
<separator orientation="vertical"/>
|
|
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="account_analytic_account_timesheet_form" model="ir.ui.view">
|
|
<field name="name">account.analytic.account.invoice.form</field>
|
|
<field name="model">account.analytic.account</field>
|
|
<field name="type">form</field>
|
|
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr='//separator[@name="project_sep"]' position='replace'>
|
|
<separator name="project_sep" string="Project Management" colspan="4"/> <!-- removal of invisible attribute -->
|
|
</xpath>
|
|
<xpath expr='//separator[@name="project_sep"]' position='after'>
|
|
<field name="use_timesheets"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
|
|
<field name="name">Timesheet Lines</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">hr.analytic.timesheet</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="context">{"search_default_today":1}</field>
|
|
<field name="search_view_id" ref="hr_timesheet_line_search"/>
|
|
<field name="help">Through this menu you can register and follow your workings hours by project every day.</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
|
|
|
|
<record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
|
|
<field name="name">hr.timesheet.employee.extd_form</field>
|
|
<field name="model">hr.employee</field>
|
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
|
<field name="arch" type="xml">
|
|
<page string="Categories" position="after">
|
|
<page string="Timesheets" groups="base.group_hr_user">
|
|
<field name="product_id" domain="[('type','=','service')]"/>
|
|
<field name="journal_id" widget="selection"/>
|
|
</page>
|
|
</page>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_hr_timesheet_reports" parent="hr.menu_hr_reporting" sequence="5" name="Timesheet"/>
|
|
|
|
|
|
</data>
|
|
</openerp>
|