1 <?xml version="1.0" encoding="utf-8"?>
4 <record id="account_analytic_account_form_expense_form" model="ir.ui.view">
5 <field name="name">account.analytic.account.form.expense.inherit</field>
6 <field name="model">account.analytic.account</field>
7 <field eval="60" name="priority"/>
8 <field name="inherit_id" ref="account_analytic_analysis.account_analytic_account_form_form"/>
9 <field name="arch" type="xml">
10 <xpath expr='//tr[@name="total"]' position='before'>
12 <td class="oe_timesheet_grey">
13 <label for="charge_expenses"/>
14 </td><td class="oe_timesheet_grey">
15 <field name="charge_expenses"/>
17 <field class="oe_form_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
19 <field class="oe_form_inline" name="expense_invoiced" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
21 <field class="oe_form_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
23 <field class="oe_form_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
24 </td><td attrs="{'invisible': [('charge_expenses','=',False)]}" class="oe_timesheet_action">
25 <span attrs="{'invisible': [('expense_to_invoice','=',0)]}" class="oe_grey">
27 name="hr_to_invoice_expense"
29 string="⇒ Invoice" type="object"
33 <span attrs="{'invisible': [('expense_to_invoice','<>',0)]}" class="oe_grey">
34 Nothing to invoice, create
37 name="open_hr_expense"
39 string="expenses" type="object"/>
43 <xpath expr="//p[@name='invoice_on_timesheets_label']" position="attributes">
44 <attribute name="attrs">{'invisible': [('invoice_on_timesheets','=',False),('charge_expenses','=',False)]}</attribute>
46 <xpath expr="//field[@name='pricelist_id']" position="attributes">
47 <attribute name="attrs">{'required': ['|',('invoice_on_timesheets','=',True),('charge_expenses','=',True)], 'invisible':[('invoice_on_timesheets','=',False), ('charge_expenses','=',False)]}</attribute>
49 <xpath expr="//field[@name='to_invoice']" position="attributes">
50 <attribute name="attrs">{'required': ['|',('invoice_on_timesheets','=',True),('charge_expenses','=',True)]}</attribute>
51 <attribute name="string">Expenses and Timesheet Invoicing Ratio</attribute>
56 <!--<record id="project_form_expense_form" model="ir.ui.view">
57 <field name="name">project.project.form.expense.inherit</field>
58 <field name="model">project.project</field>
59 <field name="inherit_id" ref="analytic_contract_project.project_account_analytic_account_form"/>
60 <field eval="20" name="priority"/>
61 <field name="arch" type="xml">
62 <xpath expr='//div[@name="end_of_tabl_hook"]' position='before'>
64 <th class="oe_border_right">Charge Expenses</th>
65 <td><field name="charge_expenses" nolabel="1"/></td>
66 <td><field class="oe_th_110px" name="est_expenses" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
67 <td class="oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
68 <td class="oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
69 <td class="oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
70 <td width="10px"></td>
71 <td><button icon="gtk-select-all" class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
72 <td><button icon="terp-dolar" class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>