1 <?xml version="1.0" encoding="utf-8"?>
8 Remove information on Account data => because they move on analysis sheet
9 create a page with invoicing informations
11 <record id="account_analytic_account_invoice_stat_form" model="ir.ui.view">
12 <field name="name">account.analytic.account.invoice.stat.form.inherit</field>
13 <field name="model">account.analytic.account</field>
14 <field name="type">form</field>
15 <field name="inherit_id" ref="hr_timesheet_invoice.account_analytic_account_form_form"/>
16 <field eval="18" name="priority"/>
17 <field name="arch" type="xml">
18 <group name="invoice_stats" position="inside">
19 <field name="hours_qtt_non_invoiced" attrs="{'invisible': [('to_invoice','=',0)]}"/>
20 <field name="ca_to_invoice" attrs="{'invisible': [('to_invoice','=',0)]}"/>
21 <label string="" colspan="1"/>
23 name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
24 string="Create Invoice"
26 attrs="{'readonly':[('ca_to_invoice','=',0.0)], 'invisible': [('to_invoice','=',0)]}"
27 icon="gtk-go-forward"/>
32 id="action_sales_order_line"
33 name="Sales Order Lines"
34 res_model="sale.order.line"
35 src_model="account.analytic.account"
38 id="action_timesheet_lines_tree"
39 name="Timesheet Lines"
40 res_model="account.analytic.line"
41 src_model="account.analytic.account"
44 <record id="hr_timesheet.account_analytic_account_form_form" model="ir.ui.view">
45 <field name="name">account.analytic.account.invoice.form.inherit</field>
46 <field name="model">account.analytic.account</field>
47 <field name="type">form</field>
48 <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
49 <field eval="18" name="priority"/>
50 <field name="arch" type="xml">
51 <xpath expr='//field[@name="parent_id"]' position='after'>
52 <field name="template_id" on_change="on_change_template(template_id)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
54 <xpath expr='//group[@name="project"]' position="after">
55 <group col="6" colspan="3" class="oe_form_group_label_border">
56 <field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/>
59 <xpath expr='//separator[@name="description"]' position='before'>
60 <separator colspan="4" string="Invoicing" name="invoicing"/>
61 <group col="1" colspan="4">
64 <th class="oe_th_137px" height="20px"></th>
65 <th width="10px"></th>
66 <th class="oe_th_110px">Est.Tot</th>
67 <th class="oe_th_110px">Invoiced</th>
68 <th class="oe_th_110px">Remaining</th>
69 <th class="oe_th_110px">Ready To Invoice</th>
70 <th width="10px"></th>
71 <th class="oe_th_150px"></th>
72 <th class="oe_th_150px"></th>
75 <th class="oe_border_right">Fix Price Invoices</th>
76 <td><field name="fix_price_invoices" nolabel="1"/></td>
77 <td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
78 <td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
79 <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
80 <td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
81 <td width="10px"></td>
82 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
83 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(sale.action_order_line_tree2)d" string="Lines To Invoice" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
86 <th class="oe_border_right">Inv. On Timesheets</th>
87 <td><field name="invoice_on_timesheets" nolabel="1"/></td>
88 <td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
89 <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
90 <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
91 <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
92 <td width="10px"></td>
93 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_timesheet_lines_tree)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
94 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
97 <th class="oe_border_right">Charge Expenses</th>
98 <td><field name="charge_expenses" nolabel="1"/></td>
99 <td class="oe_amount_center oe_th_110px"><field name="expense_max" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
100 <td class="oe_amount_center oe_th_110px"><field name="expense_invoiced" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
101 <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_expense" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
102 <td class="oe_amount_center oe_th_110px"><field name="expense_to_invoice" nolabel="1" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
103 <td width="10px"></td>
104 <td class="oe_th_150px"><button class= "oe_btn_width" name="open_hr_expense" string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
105 <td class="oe_th_150px"><button class= "oe_btn_width" name="hr_to_invoiced_expense" string="Invoice Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',0)]}"/></td>
108 <th class="oe_border_right">Total</th>
109 <td width="10px"></td>
110 <td class="oe_amount_center oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td>
111 <td class="oe_amount_center oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td>
112 <td class="oe_amount_center oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td>
113 <td class="oe_amount_center oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td>
117 <group colspan="4" class="oe_form_group_label_border">
118 <field name="pricelist_id" />
119 <field name="to_invoice" widget="selection" />
125 <record id="project_account_analytic_account_form" model="ir.ui.view">
126 <field name="name">project.account.analytic.account.form.inherit</field>
127 <field name="model">project.project</field>
128 <field name="type">form</field>
129 <field name="inherit_id" ref="project.edit_project"/>
130 <field eval="18" name="priority"/>
131 <field name="arch" type="xml">
132 <xpath expr='//page[@name="team"]' position='after'>
133 <page string="Contract Data" name="contract_page">
134 <group colspan="2" col= "2" name="contract" class="oe_form_group_label_border">
135 <separator colspan="2" string="Validity"/>
136 <field name="date_start"/>
138 <group col="6" colspan="3" class="oe_form_group_label_border">
139 <field name="quantity_max"/><field name="company_uom_id" nolabel="1"/><field name="remaining_hours" string="/ Remaining"/>
142 <group colspan="2" col= "2" name="invoice_rate" class="oe_form_group_label_border">
143 <separator colspan="2" string="Invoice Rate"/>
144 <field name="pricelist_id" />
145 <field name="to_invoice" widget="selection" />
147 <separator colspan="4" string="Invoicing" name="invoicing"/>
148 <group col="1" colspan="4">
151 <th class="oe_th_150px" height="20px"></th>
152 <th width="10px"></th>
153 <th class="oe_th_110px">Est.Tot</th>
154 <th class="oe_th_110px">Invoiced</th>
155 <th class="oe_th_110px">Remaining</th>
156 <th class="oe_th_110px">Ready To Invoice</th>
157 <th width="10px"></th>
158 <th class="oe_th_150px"></th>
159 <th class="oe_th_150px"></th>
162 <th class="oe_border_right">Fix Price Invoices</th>
163 <td><field name="fix_price_invoices" nolabel="1"/></td>
164 <td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
165 <td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
166 <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
167 <td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
168 <td width="10px"></td>
169 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
170 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(sale.action_order_line_tree2)d" string="Lines To Invoice" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
173 <th class="oe_border_right">Invoice On Timesheets</th>
174 <td><field name="invoice_on_timesheets" nolabel="1"/></td>
175 <td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
176 <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
177 <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
178 <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
179 <td width="10px"></td>
180 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_timesheet_lines_tree)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
181 <td class="oe_th_150px"><button class= "oe_btn_width" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
184 <th class="oe_border_right">Charge Expenses</th>
185 <td><field name="charge_expenses" nolabel="1"/></td>
186 <td class="oe_amount_center oe_th_110px">todo</td>
187 <td class="oe_amount_center oe_th_110px">todo</td>
188 <td class="oe_amount_center oe_th_110px oe_border_right">todo</td>
189 <td class="oe_amount_center oe_th_110px">todo</td>
190 <td width="10px"></td>
191 <td class="oe_th_150px">todo</td>
192 <td class="oe_th_150px">todo</td>
195 <th class="oe_border_right">Total</th>
196 <td width="10px"></td>
197 <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
198 <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
199 <td class="oe_amount_center oe_th_110px oe_border_right oe_border_top">todo</td>
200 <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
204 <separator string="Terms and Condition" colspan="4" name="description"/>
205 <field colspan="4" name="description" nolabel="1"/>
211 <!-- Add information on Account analytic list for the project management -->
212 <record id="view_account_analytic_account_tree_c2c_2" model="ir.ui.view">
213 <field name="name">account.analytic.account.tree</field>
214 <field name="model">account.analytic.account</field>
215 <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
216 <field name="type">tree</field>
217 <field name="arch" type="xml">
218 <field name="quantity" position="replace">
219 <field name="hours_quantity"/>
220 <field name="hours_qtt_non_invoiced"/>
221 <field name="remaining_hours"/>
222 <field name="quantity_max"/>
227 <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
228 <field name="name">account.analytic.account.tree</field>
229 <field name="model">account.analytic.account</field>
230 <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
231 <field name="type">tree</field>
232 <field name="arch" type="xml">
233 <field name="date" position="before">
234 <field name="last_invoice_date"/>
235 <field name="ca_to_invoice"/>
240 <record id="template_of_contract_action" model="ir.actions.act_window">
241 <field name="name">Template Of Contract</field>
242 <field name="type">ir.actions.act_window</field>
243 <field name="res_model">account.analytic.account</field>
244 <field name="view_type">form</field>
245 <field name="view_mode">tree,form</field>
246 <field name="domain">[('type','=','template')]</field>
247 <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
249 <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config" />