[WIP] Pop breadcrumb on mode switch != form
[odoo/odoo.git] / addons / analytic_contract_project / analytic_contract_project_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <record id="project_account_analytic_account_form" model="ir.ui.view">
6             <field name="name">project.project.form.inherit</field>
7             <field name="model">project.project</field>
8             <field name="type">form</field>
9             <field name="inherit_id" ref="project.edit_project"/>
10             <field eval="18" name="priority"/>
11             <field name="arch" type="xml">
12                 <xpath expr='//page[@name="team"]' position='after'>
13                     <page string="Contract Data">
14                         <group>
15                             <group string="Validity">
16                                 <label for="date_start" string="Duration"/>
17                                 <div name="duration">
18                                     <field name="date_start" class="oe_inline"/> - <field name="date" class="oe_inline"/>
19                                 </div>
20                                 <label for="quantity_max"/>
21                                 <div>
22                                     <field name="quantity_max" class="oe_inline"/>
23                                     <field name="company_uom_id" readonly="1" class="oe_inline"/> / Remaining: 
24                                     <field name="remaining_hours" class="oe_inline"/> 
25                                     <field name="company_uom_id" readonly="1" class="oe_inline"/>
26                                 </div>
27                             </group>
28                             <group string="Invoice Options">
29                                 <field name="manager_id" />
30                                 <field name="pricelist_id" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
31                                 <field name="to_invoice" widget="selection" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
32                             </group>
33                         </group>
34                     <separator name="toinvoice" string="Invoicing"/>
35                     <table width="100%%">
36                         <tr>
37                             <th></th>
38                             <th></th>
39                             <th><label string="Est.Tot"/></th>
40                             <th><label string="Invoiced"/></th>
41                             <th><label string="Remaining"/></th>
42                             <th><label string="To Invoice"/></th>
43                             <th></th>
44                         </tr><tr>
45                             <td>
46                                 <label for="fix_price_invoices"/>
47                             </td><td>
48                                 <field name="fix_price_invoices" class="oe_inline"/>
49                             </td><td>
50                                 <field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
51                             </td><td>
52                                 <field class="oe_inline" name="ca_invoiced" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
53                             </td><td>
54                                 <field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
55                             </td><td>
56                                 <field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
57                             </td><td>
58                                 <button name="%(account_analytic_analysis.action_sales_order)d" string="All Sales" type="action" context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id], 'default_project_id': analytic_account_id, 'search_default_project_id': analytic_account_id}" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
59                                 <button name="open_sale_order_lines" string="Lines To Invoice" type="object" context="{'default_partner_id': [partner_id],'default_project_id': analytic_account_id,'search_default_uninvoiced': 1,'search_default_project_id': analytic_account_id,'search_default_partner_id': [partner_id]}" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/></td>
60                         </tr><tr attrs="{'invisible':[('use_timesheets','=',False)]}">
61                             <td>
62                                 <label for="invoice_on_timesheets"/>
63                             </td><td>
64                                 <field name="invoice_on_timesheets"/>
65                             </td><td>
66                                 <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
67                             </td><td>
68                                 <field class="oe_inline" name="timesheet_ca_invoiced" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
69                             </td><td>
70                                 <field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
71                             </td><td>
72                                 <field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
73                             </td><td>
74                                 <button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="All Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}" context="{'default_account_id': analytic_account_id,'search_default_account_id': analytic_account_id}"/>
75                                 <button name="open_timesheets_to_invoice" string="Timesheets to Invoice" type="object" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
76                             </td>
77                         </tr><tr name="total">
78                             <th>
79                                 <label string="Total"/>
80                             </th><td>
81                             </td><td>
82                                 <field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
83                             </td><td>
84                                 <field name="invoiced_total" class="oe_inline"/>
85                             </td><td>
86                                 <field name="remaining_total" class="oe_inline"/>
87                             </td><td>
88                                 <field name="toinvoice_total" class="oe_inline"/>
89                             </td><td>
90                             </td>
91                         </tr>
92                     </table>
93                     <separator string="Terms and Conditions" name="description"/>
94                     <field name="description"/>
95                     </page>
96                 </xpath>
97             </field>
98         </record>
99
100         <record id="project_invoice_form" model="ir.ui.view">
101             <field name="name">Inherit project form : Invoicing Data</field>
102             <field name="model">project.project</field>
103             <field name="type">form</field>
104             <field name="inherit_id" ref="project.edit_project"/>
105             <field name="arch" type="xml">
106                 <xpath expr='//tr[@name="use_tasks_row"]' position='after'>
107                     <tr>
108                         <td><group><field name="use_timesheets"/></group></td>
109                         <td><button icon="terp-gtk-go-back-rtl" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/></td>
110                     </tr>
111                 </xpath>
112             </field>
113         </record>
114
115         <record id="contract_inherited_form" model="ir.ui.view">
116             <field name="name">Inherit contract form : adding UoM</field>
117             <field name="model">account.analytic.account</field>
118             <field name="type">form</field>
119             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
120             <field name="priority">50</field>
121             <field name="arch" type="xml">
122                 <xpath expr='//field[@name="remaining_hours"]' position='after'>
123                     <field name="company_uom_id" readonly="1" class="oe_inline"/>
124                 </xpath>
125             </field>
126         </record>
127     </data>
128 </openerp>