2008-07-01 15:58:58 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2008-09-10 17:56:00 +00:00
|
|
|
<openerp>
|
2008-06-29 08:26:07 +00:00
|
|
|
<data>
|
2010-01-11 11:48:35 +00:00
|
|
|
|
2008-06-29 08:26:07 +00:00
|
|
|
<!-- Expenses -->
|
2010-01-11 11:48:35 +00:00
|
|
|
|
2008-07-01 15:58:58 +00:00
|
|
|
<record id="view_expenses_line_tree" model="ir.ui.view">
|
|
|
|
<field name="name">hr.expense.line.tree</field>
|
|
|
|
<field name="model">hr.expense.line</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree string="Expense Lines">
|
2011-12-15 11:50:28 +00:00
|
|
|
<field name="sequence" invisible="1"/>
|
2008-07-01 15:58:58 +00:00
|
|
|
<field name="date_value"/>
|
|
|
|
<field name="name"/>
|
|
|
|
<field name="ref"/>
|
2012-05-30 12:56:41 +00:00
|
|
|
<field domain="[('type','in',['normal','contract']), ('parent_id','!=',False)]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
|
2008-07-01 15:58:58 +00:00
|
|
|
<field name="unit_amount"/>
|
|
|
|
<field name="unit_quantity"/>
|
2010-10-17 22:08:23 +00:00
|
|
|
<field name="total_amount" sum="Total"/>
|
2008-06-29 08:26:07 +00:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
2010-01-11 11:48:35 +00:00
|
|
|
|
2008-07-01 15:58:58 +00:00
|
|
|
<record id="view_expenses_tree" model="ir.ui.view">
|
|
|
|
<field name="name">hr.expense.expense.tree</field>
|
|
|
|
<field name="model">hr.expense.expense</field>
|
|
|
|
<field name="arch" type="xml">
|
2010-04-16 09:16:25 +00:00
|
|
|
<tree string="Expenses" colors="blue:state=='draft'">
|
2008-07-01 15:58:58 +00:00
|
|
|
<field name="employee_id"/>
|
2012-06-15 12:57:50 +00:00
|
|
|
<field name="department_id" invisible="1"/>
|
2010-12-22 05:34:49 +00:00
|
|
|
<field name="date"/>
|
2010-08-09 10:40:10 +00:00
|
|
|
<field name="user_id" invisible="1"/>
|
2010-12-22 05:34:49 +00:00
|
|
|
<field name="name"/>
|
2012-07-30 11:16:47 +00:00
|
|
|
<field name="currency_id" groups="base.group_multi_currency"/>
|
2013-04-18 13:53:56 +00:00
|
|
|
<field name="amount" sum="Total Amount"/>
|
2008-07-01 15:58:58 +00:00
|
|
|
<field name="state"/>
|
2008-06-29 08:26:07 +00:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
2010-01-11 11:48:35 +00:00
|
|
|
|
2010-02-01 11:09:48 +00:00
|
|
|
<record id="view_editable_expenses_tree" model="ir.ui.view">
|
|
|
|
<field name="name">hr.expense.expense.tree</field>
|
|
|
|
<field name="model">hr.expense.expense</field>
|
|
|
|
<field name="arch" type="xml">
|
2012-07-17 10:42:14 +00:00
|
|
|
<tree colors="blue:state == 'draft';black:state in ('confirm','accepted','done');gray:state == 'cancelled'" string="Expenses" editable="top">
|
2010-02-01 11:09:48 +00:00
|
|
|
<field name="employee_id"/>
|
2010-10-08 17:18:37 +00:00
|
|
|
<field name="date"/>
|
2012-04-25 14:11:35 +00:00
|
|
|
<field name="department_id"/>
|
2010-05-10 12:59:15 +00:00
|
|
|
<field name="name"/>
|
2010-02-01 11:09:48 +00:00
|
|
|
<field name="amount"/>
|
|
|
|
<field name="state"/>
|
2010-12-30 12:24:28 +00:00
|
|
|
<button name="confirm" states="draft" string="Confirm" type="workflow" icon="gtk-apply"/>
|
2010-12-30 15:53:48 +00:00
|
|
|
<button name="refuse" states="confirm,draft,accepted" string="Refuse" type="workflow" icon="gtk-no" groups="base.group_hr_user"/>
|
2010-02-01 11:09:48 +00:00
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
2010-01-11 11:48:35 +00:00
|
|
|
|
2008-07-01 15:58:58 +00:00
|
|
|
<record id="view_expenses_form" model="ir.ui.view">
|
|
|
|
<field name="name">hr.expense.form</field>
|
|
|
|
<field name="model">hr.expense.expense</field>
|
2012-11-30 11:03:32 +00:00
|
|
|
<field eval="25" name="priority"/>
|
2008-07-01 15:58:58 +00:00
|
|
|
<field name="arch" type="xml">
|
2014-06-12 07:09:59 +00:00
|
|
|
<form string="Expenses Sheet">
|
2012-06-04 12:11:39 +00:00
|
|
|
<header>
|
2012-06-20 10:12:05 +00:00
|
|
|
<button name="confirm" states="draft" string="Submit to Manager" type="workflow" class="oe_highlight"/>
|
|
|
|
<button name="validate" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
|
2012-11-30 11:03:32 +00:00
|
|
|
<button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" groups="base.group_hr_user" />
|
2012-06-21 07:09:59 +00:00
|
|
|
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user" />
|
2012-08-10 15:11:08 +00:00
|
|
|
<button name="done" states="accepted" string="Generate Accounting Entries" type="workflow" groups="account.group_account_invoice" class="oe_highlight"/>
|
2013-03-14 11:27:40 +00:00
|
|
|
<button name="action_view_move" states="done" string="Open Accounting Entries" type="object" groups="account.group_account_invoice"/>
|
2013-05-22 17:49:45 +00:00
|
|
|
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,done,paid" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
|
2012-06-04 12:11:39 +00:00
|
|
|
</header>
|
2012-06-07 17:30:07 +00:00
|
|
|
<sheet>
|
2012-07-05 09:29:21 +00:00
|
|
|
<group>
|
|
|
|
<group>
|
|
|
|
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
|
|
|
|
<field name="date"/>
|
|
|
|
<field name="department_id"/>
|
|
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="name"/>
|
2013-09-04 14:11:22 +00:00
|
|
|
<field name="user_valid" attrs="{'invisible': [('state','=','draft')]}" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_hr_user']}"/>
|
2012-08-14 11:33:20 +00:00
|
|
|
<field name="currency_id" groups="base.group_multi_currency" on_change="onchange_currency_id(currency_id, company_id)"/>
|
2012-07-05 09:29:21 +00:00
|
|
|
</group>
|
2009-01-26 18:28:07 +00:00
|
|
|
</group>
|
2012-06-07 17:30:07 +00:00
|
|
|
<notebook>
|
2010-09-22 05:39:37 +00:00
|
|
|
<page string="Description">
|
2013-07-02 13:14:56 +00:00
|
|
|
<field name="line_ids" context="{'currency_id': currency_id, 'default_analytic_account': context.get('analytic_account', '')}">
|
2014-06-12 07:09:59 +00:00
|
|
|
<form string="Expense Lines">
|
2012-06-25 08:55:27 +00:00
|
|
|
<group>
|
|
|
|
<group>
|
2012-08-09 08:44:30 +00:00
|
|
|
<field name="product_id" on_change="onchange_product_id(product_id, context)" context="{'default_hr_expense_ok':1}"/>
|
2012-06-25 08:55:27 +00:00
|
|
|
<field name="name"/>
|
|
|
|
<field name="ref"/>
|
2014-09-26 16:01:19 +00:00
|
|
|
<field domain="[('type','in',['normal','contract'])]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
|
2012-06-25 08:55:27 +00:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="unit_amount"/>
|
|
|
|
<label for="unit_quantity"/>
|
|
|
|
<div>
|
|
|
|
<field name="unit_quantity" class="oe_inline"/>
|
2012-08-09 08:44:30 +00:00
|
|
|
<field name="uom_id" on_change="onchange_uom(product_id, uom_id, context)" class="oe_inline"/>
|
2012-06-25 08:55:27 +00:00
|
|
|
</div>
|
|
|
|
<field name="date_value" />
|
2012-06-21 09:06:02 +00:00
|
|
|
</group>
|
2010-10-17 22:08:23 +00:00
|
|
|
</group>
|
2008-06-29 08:26:07 +00:00
|
|
|
</form>
|
2012-08-09 08:44:30 +00:00
|
|
|
<tree string="Expense Lines" editable="bottom">
|
|
|
|
<field name="sequence" invisible="1"/>
|
|
|
|
<field name="product_id" on_change="onchange_product_id(product_id, context)" context="{'default_hr_expense_ok':1}"/>
|
|
|
|
<field name="date_value" string="Expense Date"/>
|
2012-08-17 08:42:42 +00:00
|
|
|
<field name="name"/>
|
2012-08-09 08:44:30 +00:00
|
|
|
<field name="ref"/>
|
2013-03-21 16:29:39 +00:00
|
|
|
<field domain="[('type','in',['normal','contract'])]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
|
2012-08-09 08:44:30 +00:00
|
|
|
<field name="uom_id" on_change="onchange_uom(product_id, uom_id, context)"/>
|
|
|
|
<field name="unit_amount"/>
|
|
|
|
<field name="unit_quantity"/>
|
|
|
|
<field name="total_amount" sum="Total"/>
|
|
|
|
</tree>
|
2008-06-29 08:26:07 +00:00
|
|
|
</field>
|
2012-07-12 08:44:07 +00:00
|
|
|
<group>
|
|
|
|
<div>
|
|
|
|
<separator string="Notes"/>
|
|
|
|
<field name="note" placeholder="Free Notes"/>
|
|
|
|
</div>
|
2012-10-29 06:26:15 +00:00
|
|
|
<group class="oe_subtotal_footer oe_right">
|
|
|
|
<field name="amount" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_subtotal_footer_separator"/>
|
2012-07-12 08:44:07 +00:00
|
|
|
</group>
|
|
|
|
</group>
|
2008-06-29 08:26:07 +00:00
|
|
|
</page>
|
2012-10-25 15:10:13 +00:00
|
|
|
<page string="Accounting" groups="account.group_account_user">
|
2012-06-07 17:30:07 +00:00
|
|
|
<group>
|
2012-10-25 15:10:13 +00:00
|
|
|
<group string="Accounting Data">
|
2012-08-10 15:11:08 +00:00
|
|
|
<field name="journal_id" widget="selection" domain="[('type', '=', 'purchase')]"/>
|
2013-03-06 14:05:54 +00:00
|
|
|
<field name="account_move_id"/>
|
2012-06-07 17:30:07 +00:00
|
|
|
</group>
|
2010-08-17 11:13:35 +00:00
|
|
|
</group>
|
2008-06-29 08:26:07 +00:00
|
|
|
</page>
|
|
|
|
</notebook>
|
2012-04-25 13:27:01 +00:00
|
|
|
</sheet>
|
2012-07-13 09:53:41 +00:00
|
|
|
<div class="oe_chatter">
|
2012-08-15 22:30:38 +00:00
|
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
2012-10-26 09:58:21 +00:00
|
|
|
<field name="message_ids" widget="mail_thread"/>
|
2012-07-13 09:53:41 +00:00
|
|
|
</div>
|
2008-06-29 08:26:07 +00:00
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
2010-01-11 11:48:35 +00:00
|
|
|
|
|
|
|
|
2009-09-24 10:46:21 +00:00
|
|
|
<record id="view_hr_expense_filter" model="ir.ui.view">
|
|
|
|
<field name="name">hr.expense.expense.filter</field>
|
|
|
|
<field name="model">hr.expense.expense</field>
|
|
|
|
<field name="arch" type="xml">
|
2010-02-16 06:48:51 +00:00
|
|
|
<search string="Expense">
|
2012-07-20 10:37:21 +00:00
|
|
|
<field name="name" string="Expenses"/>
|
|
|
|
<field name="date"/>
|
|
|
|
<filter icon="terp-document-new" domain="[('state','=','draft')]" string="New" help="New Expense"/>
|
2012-10-08 10:11:31 +00:00
|
|
|
<filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve" help="Confirmed Expenses"/>
|
2013-08-29 13:28:02 +00:00
|
|
|
<filter icon="terp-dolar" domain="['|',('state','=','accepted'),('state','=','done')]" string="To Pay" help="Expenses to Invoice"/>
|
2012-10-08 10:11:31 +00:00
|
|
|
<separator/>
|
2012-10-08 13:08:31 +00:00
|
|
|
<filter domain="[('user_id', '=', uid)]" string="My Expenses"/>
|
2012-07-31 11:28:04 +00:00
|
|
|
<field name="employee_id"/>
|
|
|
|
<field name="department_id" string="Department" context="{'invisible_department': False}"/>
|
2014-05-22 09:44:35 +00:00
|
|
|
<group expand="0" string="Group By">
|
2012-07-20 10:37:21 +00:00
|
|
|
<filter string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
|
|
|
|
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
|
2013-09-04 14:10:53 +00:00
|
|
|
<filter string="Expenses Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Expenses by Month"/>
|
2012-07-20 10:37:21 +00:00
|
|
|
</group>
|
2010-03-18 17:39:33 +00:00
|
|
|
</search>
|
2009-09-24 10:46:21 +00:00
|
|
|
</field>
|
|
|
|
</record>
|
2010-01-11 11:48:35 +00:00
|
|
|
|
2008-07-01 15:58:58 +00:00
|
|
|
<record id="expense_all" model="ir.actions.act_window">
|
2010-02-16 06:48:51 +00:00
|
|
|
<field name="name">Expenses</field>
|
2008-07-01 15:58:58 +00:00
|
|
|
<field name="res_model">hr.expense.expense</field>
|
|
|
|
<field name="view_type">form</field>
|
2009-09-24 10:46:21 +00:00
|
|
|
<field name="search_view_id" ref="view_hr_expense_filter"/>
|
2010-12-22 05:34:49 +00:00
|
|
|
<field name="view_id" ref="view_expenses_tree"/>
|
2012-08-04 14:35:56 +00:00
|
|
|
<field name="help" type="html">
|
2012-08-04 13:56:31 +00:00
|
|
|
<p class="oe_view_nocontent_create">
|
2012-08-04 13:21:36 +00:00
|
|
|
Click to register new expenses.
|
|
|
|
</p><p>
|
2014-07-09 11:39:38 +00:00
|
|
|
Odoo will ensure the whole process is followed; the expense
|
2012-08-04 13:21:36 +00:00
|
|
|
sheet is validated by manager(s), the employee is reimbursed
|
|
|
|
from his expenses, some expenses must be re-invoiced to the
|
|
|
|
customers.
|
|
|
|
</p>
|
2012-07-02 06:15:08 +00:00
|
|
|
</field>
|
2008-06-29 08:26:07 +00:00
|
|
|
</record>
|
2010-01-11 11:48:35 +00:00
|
|
|
|
|
|
|
|
2009-04-02 09:44:17 +00:00
|
|
|
<record id="view_product_hr_expense_form" model="ir.ui.view">
|
2014-05-27 07:42:52 +00:00
|
|
|
<field name="name">product.template.expense.form</field>
|
|
|
|
<field name="model">product.template</field>
|
|
|
|
<field name="inherit_id" ref="product.product_template_form_view"/>
|
2010-07-03 10:21:52 +00:00
|
|
|
<field name="arch" type="xml">
|
2012-10-03 06:48:40 +00:00
|
|
|
<div name="options" position="inside">
|
2014-05-27 07:42:52 +00:00
|
|
|
<div>
|
|
|
|
<field name="hr_expense_ok"/>
|
|
|
|
<label for="hr_expense_ok"/>
|
|
|
|
</div>
|
2012-10-03 06:48:40 +00:00
|
|
|
</div>
|
2010-07-03 10:21:52 +00:00
|
|
|
</field>
|
|
|
|
</record>
|
2010-01-09 14:30:02 +00:00
|
|
|
|
2012-10-18 07:24:40 +00:00
|
|
|
<record id="hr_expense_product" model="ir.actions.act_window">
|
2014-04-11 13:18:42 +00:00
|
|
|
<field name="name">Expense Categories</field>
|
2012-10-18 07:24:40 +00:00
|
|
|
<field name="res_model">product.product</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
|
|
<field name="context">{"default_hr_expense_ok":1}</field>
|
|
|
|
<field name="domain">[('hr_expense_ok','=',True)]</field>
|
|
|
|
<field name="search_view_id" ref="product.product_search_form_view"/>
|
2013-03-22 09:16:25 +00:00
|
|
|
<field name="help" type="html">
|
|
|
|
<p class="oe_view_nocontent_create">
|
2013-06-07 16:09:27 +00:00
|
|
|
Click to create a new expense category.
|
2013-03-22 09:16:25 +00:00
|
|
|
</p>
|
|
|
|
</field>
|
2012-10-18 07:24:40 +00:00
|
|
|
</record>
|
|
|
|
|
2012-12-19 06:50:41 +00:00
|
|
|
<menuitem id="menu_hr_product" name="Expense Categories" parent="hr.menu_hr_configuration" action="hr_expense_product"/>
|
2012-10-18 07:24:40 +00:00
|
|
|
<menuitem id="next_id_49" name="Expenses" sequence="15" parent="hr.menu_hr_root"/>
|
|
|
|
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49"/>
|
|
|
|
|
2008-06-29 08:26:07 +00:00
|
|
|
</data>
|
2008-09-10 17:56:00 +00:00
|
|
|
</openerp>
|