[IMP]Project timesheet and report intrasat : applying group multi currency to currenc...
[odoo/odoo.git] / addons / project_timesheet / project_timesheet_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <record id="view_project_kanban_inherited" model="ir.ui.view">
6             <field name="name">project.project.kanban.inherited</field>
7             <field name="model">project.project</field>
8             <field name="inherit_id" ref="project.view_project_kanban"/>
9             <field name="arch" type="xml">
10                 <field name="use_tasks" position="after">
11                     <field name="use_timesheets"/>
12                     <field name="timesheet_count"/>
13                     <field name="currency_id" groups="base.group_multi_currency"/>
14                     <field name="partner_id"/>
15                 </field>
16                 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
17                     <a t-if="record.use_timesheets.raw_value"
18                         name="open_timesheets" type="object">Timesheets(<field name="timesheet_count"/>)</a>
19                 </xpath>
20                 <xpath expr="//div[contains(@class, 'oe_kanban_project_deadline')]" position="before">
21                     <div class="oe_kanban_project_fields oe_kanban_project_invoice" t-if="record.partner_id.raw_value">
22                         <div>Amount to invoice</div>
23                         <div><field name="amount_to_invoice"/> <t t-esc="record.currency_id.raw_value[1].split(' ')[1][1]"/></div>
24                         <div>Time to Invoice</div>
25                         <div><field name="time_to_invoice"/> <field name="company_uom_id"/></div>
26                     </div>
27                 </xpath>
28             </field>
29         </record>
30
31         <record id="project_invoice_form_cutomer" model="ir.ui.view">
32             <field name="name">Inherit project form : Customer</field>
33             <field name="model">project.project</field>
34             <field name="inherit_id" ref="analytic_contract_project.project_invoice_form"/>
35             <field name="arch" type="xml">
36                 <field name="partner_id" position="replace">
37                     <field name="partner_id" on_change="onchange_partner_id(partner_id)" string="Contact"  attrs="{'required':[('to_invoice','!=',False)]}"/>
38                 </field>
39             </field>
40         </record>
41
42         <record id="project_invoice_search" model="ir.ui.view">
43             <field name="name">Inherit project search view : Invoicing Data</field>
44             <field name="model">project.project</field>
45             <field name="inherit_id" ref="project.view_project_project_filter"/>
46             <field name="arch" type="xml">
47                 <xpath expr='//filter[@string="Project(s) Manager"]' position='after'>
48                     <separator/>
49                     <filter icon="terp-camera_test" string="Billable" domain="[('to_invoice','!=', False)]" help="Billable Project"/>
50                 </xpath>
51             </field>
52         </record>
53         <record id="view_account_analytic_line_search_account_inherit" model="ir.ui.view">
54             <field name="name">account.analytic.line.search.account_id</field>
55             <field name="model">account.analytic.line</field>
56             <field name="inherit_id" ref="account.view_account_analytic_line_filter"/>
57             <field name="arch" type="xml">
58                  <field name="account_id" position="replace">
59                      <field name="account_id" string="Analytic account/project"/>
60                  </field>
61             </field>
62          </record>
63         <record id="view_account_analytic_line_form_inherit_account_id" model="ir.ui.view">
64             <field name="name">account.analytic.line.form.account_id</field>
65             <field name="model">account.analytic.line</field>
66             <field name="inherit_id" ref="account.view_account_analytic_line_form"/>
67             <field name="arch" type="xml">
68                 <field name="account_id"  position="replace">
69                    <field name="account_id" string="Analytic Account/Project" on_change="on_change_account_id(account_id)"/>
70                 </field>
71             </field>
72         </record>
73        <record id="view_account_analytic_line_tree_inherit_account_id" model="ir.ui.view">
74             <field name="name">account.analytic.line.tree.account_id</field>
75             <field name="model">account.analytic.line</field>
76             <field name="inherit_id" ref="account.view_account_analytic_line_tree"/>
77             <field name="arch" type="xml">
78                 <field name="account_id"  position="replace">
79                     <field name="account_id" string="Analytic account/project"/>
80                 </field>
81             </field>
82         </record>
83
84         <!-- Menus -->
85         <record id="action_project_timesheet_bill_task" model="ir.actions.act_window">
86             <field name="name">Invoice Tasks Work</field>
87             <field name="res_model">account.analytic.line</field>
88             <field name="view_type">form</field>
89             <field name="view_mode">tree,form</field>
90             <field name="domain">[]</field>
91             <field name="context">{'search_default_to_invoice': 1}</field>
92             <field name="view_id" ref="view_account_analytic_line_tree_inherit_account_id"/>
93             <field name="help" type="html">
94               <p class="oe_view_nocontent_create">
95                 Click to add a work to invoice.
96               </p><p>
97                 You will find here all works made on tasks that you can
98                 invoice.   
99               </p>
100             </field>
101         </record>
102         <menuitem action="hr_timesheet.action_hr_timesheet_sign_in"
103             id="menu_hr_timesheet_sign_in"
104             parent="hr_attendance.menu_hr_attendance"
105             sequence="5" />
106
107         <menuitem id="menu_project_billing" name="Invoicing"
108                   parent="base.menu_main_pm" sequence="5"/>
109         <menuitem id="menu_project_billing_line" name="Invoice Tasks Work"
110             parent="menu_project_billing" action="action_project_timesheet_bill_task"/>
111
112         <!--
113             Time Tracking menu in project Management
114         -->
115 <!--        <menuitem id="menu_project_working_hours" parent="base.menu_project_management_time_tracking" action="hr_timesheet.act_hr_timesheet_line_evry1_all_form"/> -->
116
117         <record id="action_account_analytic_overdue" model="ir.actions.act_window">
118             <field name="name">Customer Projects</field>
119             <field name="res_model">account.analytic.account</field>
120             <field name="view_type">form</field>
121             <field name="view_mode">tree,form,graph</field>
122             <field name="context">{}</field>
123             <field name="domain">[('type','=','normal')]</field>
124             <field name="search_view_id" ref="account_analytic_analysis.view_account_analytic_account_overdue_search"/>
125             <field name="help" type="html">
126               <p class="oe_view_nocontent_create">
127                 Click to add a customer contract.
128               </p><p>
129                 You will find here the contracts related to your customer
130                 projects in order to track the invoicing progress.
131               </p>
132             </field>
133         </record>
134         <menuitem id="menu_invoicing_contracts" parent="menu_project_billing" sequence="4"
135             action="account_analytic_analysis.action_account_analytic_overdue"/>
136
137     </data>
138 </openerp>