1 <?xml version="1.0" encoding="utf-8"?>
9 <record model="ir.actions.act_window" id="action_sales_order">
10 <field name="name">Sales Orders</field>
11 <field name="res_model">sale.order</field>
12 <field name="src_model">account.analytic.account</field>
15 <record id="account_analytic_account_form_form" model="ir.ui.view">
16 <field name="name">account.analytic.account.invoice.form.inherit</field>
17 <field name="model">account.analytic.account</field>
18 <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
19 <field eval="40" name="priority"/>
20 <field name="arch" type="xml">
21 <xpath expr='//div[@name="duration"]' position="after" version="7.0">
22 <label for="quantity_max"/>
24 <field name="quantity_max"/>
25 <div attrs="{'invisible': [('quantity','=',0)]}" class="oe_grey">
26 <field name="quantity" class="oe_inline"/> Units Done
28 <div attrs="{'invisible': [('quantity_max','=',0)]}" class="oe_grey">
29 <field name="remaining_hours" class="oe_inline"/> Units Remaining
33 <xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
35 <xpath expr='//separator[@name="description"]' position='before'>
36 <separator name="toinvoice" string="Invoicing"/>
37 <table class="oe_form_analytic_account">
39 <th class="oe_timesheet_grey" width="160px"></th>
40 <th class="oe_timesheet_grey" width="25px"></th>
41 <th class="oe_timesheet_grey" width="100px"><label string="Expected"/></th>
42 <th class="oe_timesheet_grey" width="100px"><label string="Invoiced"/></th>
43 <th class="oe_timesheet_grey" width="100px"><label string="Remaining"/></th>
44 <th class="oe_timesheet_grey" width="100px"><label string="To Invoice"/></th>
45 <th width="30px"></th>
48 <td class="oe_timesheet_grey">
49 <label for="fix_price_invoices"/>
50 </td><td class="oe_timesheet_grey">
51 <field name="fix_price_invoices" class="oe_inline"/>
53 <field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
55 <field class="oe_inline" name="ca_invoiced" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
57 <field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
59 <field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
60 </td><td attrs="{'invisible': [('fix_price_invoices','=',False)]}" class="oe_timesheet_action">
61 <span attrs="{'invisible': [('fix_price_to_invoice','=',0.0)]}" class="oe_grey">
62 <button name="open_sale_order_lines"
64 string="⇒ Invoice" type="object"
65 context="{'default_partner_id': [partner_id],'default_project_id': active_id,'search_default_uninvoiced': 1,'search_default_project_id': active_id,'search_default_partner_id': [partner_id]}"/>
69 <span attrs="{'invisible': ['|',('fix_price_to_invoice','<>',0.0 ),('partner_id','=',False)]}" class="oe_grey">
70 No order to invoice, create
72 <button name="%(action_sales_order)d" string="Sale Orders"
75 context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}"
79 <td class="oe_timesheet_grey">
80 <label for="invoice_on_timesheets"/>
81 </td><td class="oe_timesheet_grey">
82 <field name="invoice_on_timesheets"/>
84 <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
86 <field class="oe_inline" name="timesheet_ca_invoiced" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
88 <field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
90 <field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
91 </td><td class="oe_timesheet_action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
92 <span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
93 <button name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
99 <span attrs="{'invisible': [('ca_to_invoice','<>',0.0)]}" class="oe_grey">
100 Nothing to invoice, create
103 <button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d"
104 string="Timesheets" type="action"
106 context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
108 </tr><tr name='total'>
109 <th class="oe_timesheet_grey">
110 <label string="Total"/>
111 </th><td class="oe_timesheet_grey">
112 </td><td class="oe_timesheet_grey">
113 <field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
114 </td><td class="oe_timesheet_grey">
115 <field name="invoiced_total" class="oe_inline"/>
116 </td><td class="oe_timesheet_grey">
117 <field name="remaining_total" class="oe_inline"/>
118 </td><td class="oe_timesheet_grey">
119 <field name="toinvoice_total" class="oe_inline"/>
124 <group name='invoice_on_timesheets' attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
125 <p class="oe_grey oe_edit_only" colspan="2">
126 When invoicing on timesheet, OpenERP uses the
127 pricelist of the contract which uses the price
128 defined on the product related to each employee to
129 define the customer invoice price rate.
132 <field name="pricelist_id"
134 attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
135 <field name="to_invoice"
138 attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
145 <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
146 <field name="name">account.analytic.account.tree</field>
147 <field name="model">account.analytic.account</field>
148 <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
149 <field name="arch" type="xml">
150 <field name="date" position="before">
151 <field name="last_invoice_date"/>
152 <field name="toinvoice_total"/>
153 <field name="remaining_hours"/>
158 <record id="view_account_analytic_account_template_required" model="ir.ui.view">
159 <field name="name">account.analytic.account.form.template.required</field>
160 <field name="model">account.analytic.account</field>
161 <field name="groups_id" eval="[(6, 0, [ref('group_template_required')])]"/>
162 <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
163 <field name="arch" type="xml">
164 <field name="template_id" position="attributes">
165 <attribute name="attrs">{'required': [('type','=','contract')], 'invisible': [('type','in',['view', 'normal','template'])]}</attribute>
170 <record id="template_of_contract_action" model="ir.actions.act_window">
171 <field name="name">Contract Template</field>
172 <field name="type">ir.actions.act_window</field>
173 <field name="res_model">account.analytic.account</field>
174 <field name="view_type">form</field>
175 <field name="view_mode">tree,form</field>
176 <field name="domain">[('type','=','template')]</field>
177 <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
178 <field name="help" type="html">
179 <p class="oe_view_nocontent_create">
180 Click here to create a template of contract.
182 Templates are used to prefigure contract/project that
183 can be selected by the salespeople to quickly configure the
184 terms and conditions of the contract.
189 <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/>