[MERGE] merged with trunk up to revision 9425. Needs to find another icon for Traceab...
[odoo/odoo.git] / addons / sale / sale_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!-- Top menu item -->
6         <!--
7             This menu item's purpose is to overwrite another one defined in
8             the base module in order to set new groups.
9         -->
10         <menuitem name="Sales"
11             id="base.menu_base_partner"
12             groups="base.group_sale_salesman,base.group_sale_manager"/>
13
14         <menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
15
16         <record id="view_sale_order_calendar" model="ir.ui.view">
17             <field name="name">sale.order.calendar</field>
18             <field name="model">sale.order</field>
19             <field name="arch" type="xml">
20                 <calendar string="Sales Orders" color="state" date_start="date_order">
21                     <field name="partner_id"/>
22                     <field name="amount_total"/>
23                 </calendar>
24             </field>
25         </record>
26         <record model="ir.ui.view" id="view_sale_order_graph">
27             <field name="name">sale.order.graph</field>
28             <field name="model">sale.order</field>
29             <field name="arch" type="xml">
30                 <graph string="Sales Orders" type="bar">
31                     <field name="partner_id" type="row"/>
32                     <field name="amount_total" type="measure"/>
33                 </graph>
34             </field>
35         </record>
36
37         <record id="view_order_tree" model="ir.ui.view">
38             <field name="name">sale.order.tree</field>
39             <field name="model">sale.order</field>
40             <field name="priority">2</field>
41             <field name="arch" type="xml">
42                 <tree string="Sales Orders" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
43                     <field name="message_unread" invisible="1"/>
44                     <field name="name" string="Order Number"/>
45                     <field name="date_order"/>
46                     <field name="partner_id"/>
47                     <field name="user_id"/>
48                     <field name="amount_total" sum="Total Tax Included"/>
49                     <field name="state"/>
50                 </tree>
51             </field>
52         </record>
53
54         <record id="view_quotation_tree" model="ir.ui.view">
55             <field name="name">sale.order.tree</field>
56             <field name="model">sale.order</field>
57             <field name="priority">4</field>
58             <field name="arch" type="xml">
59                 <tree string="Quotation" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
60                     <field name="message_unread" invisible="1"/>
61                     <field name="name" string="Quotation Number"/>
62                     <field name="date_order"/>
63                     <field name="partner_id"/>
64                     <field name="user_id"/>
65                     <field name="amount_total" sum="Total Tax Included"/>
66                     <field name="state"/>
67                 </tree>
68             </field>
69         </record>
70
71         <record id="view_order_form" model="ir.ui.view">
72             <field name="name">sale.order.form</field>
73             <field name="model">sale.order</field>
74             <field name="arch" type="xml">
75                 <form string="Sales Order" version="7.0">
76                     <header>
77                         <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" groups="base.group_user"/>
78                         <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" groups="base.group_user"/>
79                         <button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
80                         <button name="action_quotation_send" string="Send by Email" type="object" states="sent,progress,manual" groups="base.group_user"/>
81                         <button name="print_quotation" string="Print" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
82                         <button name="print_quotation" string="Print" type="object" states="sent,progress,manual" groups="base.group_user"/>
83                         <button name="action_button_confirm" states="draft" string="Confirm Sale" type="object" groups="base.group_user"/>
84                         <button name="action_button_confirm" states="sent" string="Confirm Sale" class="oe_highlight" type="object" groups="base.group_user"/>
85                         <button name="action_view_invoice" string="View Invoice" type="object" class="oe_highlight"
86                             attrs="{'invisible': [('invoice_exists', '=', False)]}" groups="base.group_user"/>
87                         <button name="%(action_view_sale_advance_payment_inv)d" string="Create Invoice"
88                             type="action" states="manual" class="oe_highlight" groups="base.group_user"/>
89                         <button name="copy_quotation" states="cancel" string="New Copy of Quotation" type="object"/>
90                         <button name="cancel" states="draft,sent" string="Cancel Quotation" groups="base.group_user"/>
91                         <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" groups="base.group_user"/>
92                         <button name="invoice_cancel" states="invoice_except" string="Cancel Order" groups="base.group_user"/>
93                         <field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,done" statusbar_colors='{"invoice_except":"red","waiting_date":"blue"}'/>
94                 </header>
95                 <sheet>
96                     <h1>
97                         <label string="Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
98                         <label string="Sales Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
99                         <field name="name" class="oe_inline" readonly="1"/>
100                     </h1>
101                     <group>
102                         <group>
103                             <field name="partner_id" on_change="onchange_partner_id(partner_id, context)" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": True}'/>
104                             <field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}"/>
105                             <field name="partner_shipping_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'delivery'}"/>
106                             <field name="project_id" context="{'partner_id':partner_invoice_id, 'default_pricelist_id':pricelist_id, 'default_name':name, 'default_type': 'contract'}" groups="sale.group_analytic_accounting" domain="[('type','in',['view','normal','contract'])]"/>
107                         </group>
108                         <group>
109                             <field name="date_order"/>
110                             <field name="client_order_ref"/>
111                             <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
112                             <field name="currency_id" invisible="1"/>
113                         </group>
114                     </group>
115                     <notebook>
116                         <page string="Order Lines">
117                             <field name="order_line">
118                                 <form string="Sales Order Lines" version="7.0">
119                                     <header groups="base.group_user">
120                                         <button name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Invoice" type="action" icon="terp-document-new"/>
121                                         <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
122                                     </header>
123                                     <group>
124                                         <group>
125                                             <field name="product_id"
126                                                 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
127                                                 groups="base.group_user"
128                                                 on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
129                                             <label for="product_uom_qty"/>
130                                             <div>
131                                                 <field
132                                                     context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
133                                                     name="product_uom_qty" class="oe_inline"
134                                                     on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
135                                                 <field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
136
137                                                     on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)"/>
138                                             </div>
139                                             <label for="product_uos_qty" groups="product.group_uos"/>
140                                             <div groups="product.group_uos">
141                                                 <field name="product_uos_qty" class="oe_inline"/>
142                                                 <field name="product_uos" options='{"no_open": True}' class="oe_inline"/>
143                                             </div>
144                                             <field name="price_unit"/>
145                                             <label for="discount" groups="sale.group_discount_per_so_line"/>
146                                             <div name="discount" groups="sale.group_discount_per_so_line">
147                                                 <field name="discount" class="oe_inline"/> %%
148                                             </div>
149                                         </group>
150                                         <group>
151                                             <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
152                                             <field name="th_weight"/>
153                                             <!-- we should put a config wizard for these two fields -->
154                                             <field name="address_allotment_id"/>
155                                         </group>
156                                     </group>
157                                     <label for="name"/>
158                                     <field name="name"/>
159                                     <div groups="base.group_no_one">
160                                         <label for="invoice_lines"/>
161                                         <field name="invoice_lines"/>
162                                     </div>
163                                 </form>
164                                 <tree string="Sales Order Lines" editable="bottom">
165                                     <field name="sequence" widget="handle"/>
166                                     <field name="state" invisible="1"/>
167                                     <field name="th_weight" invisible="1"/>
168                                     <field name="product_id"
169                                         context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
170                                         groups="base.group_user" 
171                                         on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
172                                     <field name="name"/>
173                                     <field name="product_uom_qty"
174                                         context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
175                                         on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
176                                     <field name="product_uom"
177                                         on_change="product_uom_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, context)"
178                                         groups="product.group_uom" options='{"no_open": True}'/>
179                                     <field name="product_uos_qty" groups="product.group_uos" invisible="1"/>
180                                     <field name="product_uos" string="UoS" groups="product.group_uos" invisible="1"/>
181                                     <field name="price_unit"/>
182                                     <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
183                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
184                                     <field name="price_subtotal"/>
185                                 </tree>
186                             </field>
187                             <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
188                                 <field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
189                                 <field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
190                                 <div class="oe_subtotal_footer_separator oe_inline">
191                                     <label for="amount_total" />
192                                     <button name="button_dummy"
193                                         states="draft,sent" string="(update)" type="object" class="oe_edit_only oe_link"/>
194                                 </div>
195                                 <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
196                             </group>
197                             <div class="oe_clear"/>
198                             <field name="note" class="oe_inline" placeholder="Terms and conditions..."/>
199                         </page>
200                         <page string="Other Information" groups="base.group_user">
201                             <group>
202                                 <group name="sales_person" groups="base.group_user">
203                                     <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice', 'base.group_sale_salesman_all_leads']}"/>
204                                     <field groups="base.group_no_one" name="origin"/>
205                                 </group>
206                                 <group name="sale_pay">
207                                     <field name="payment_term" options="{'no_create': True}"/>
208                                     <field name="fiscal_position" options="{'no_create': True}"
209                                         on_change="onchange_fiscal_position(fiscal_position, order_line, context)"/>
210                                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
211                                 </group>
212                                 <group>
213                                     <field name="invoiced"/>
214                                     <field name="invoice_exists" invisible="1"/>
215                                 </group>
216                             </group>
217                         </page>
218                     </notebook>
219                 </sheet>
220                 <div class="oe_chatter">
221                     <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
222                     <field name="message_ids" widget="mail_thread"/>
223                 </div>
224                 </form>
225             </field>
226         </record>
227
228         <!-- inherited view to make the order lines list in the form non-editable
229              for the members of some usability groups -->
230         <record id="view_order_form_editable_list" model="ir.ui.view">
231             <field name="name">sale.order.form.editable.list</field>
232             <field name="model">sale.order</field>
233             <field name="inherit_id" ref="sale.view_order_form"/>
234             <field name="groups_id" eval="[(4, ref('product.group_uos')), (4, ref('product.group_stock_packaging')), (4, ref('sale.group_mrp_properties'))]"/>
235             <field name="arch" type="xml">
236                 <xpath expr="//field[@name='order_line']/tree" position="attributes">
237                     <attribute name="editable"/>
238                 </xpath>
239             </field>
240         </record>
241
242         <record id="view_sales_order_filter" model="ir.ui.view">
243             <field name="name">sale.order.list.select</field>
244             <field name="model">sale.order</field>
245             <field name="arch" type="xml">
246                 <search string="Search Sales Order">
247                     <field name="name" string="Sales Order" filter_domain="['|',('name','ilike',self),('client_order_ref','ilike',self)]"/>
248                     <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
249                     <separator/>
250                     <filter icon="terp-document-new" string="Quotations" name="draft" domain="[('state','in',('draft','sent'))]" help="Sales Order that haven't yet been confirmed"/>
251                     <filter icon="terp-check" string="Sales" name="sales" domain="[('state','in',('manual','progress'))]"/>
252                     <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
253                     <filter icon="terp-dolar_ok!" string="Done" domain="[('state','=','done')]" help="Sales Order done"/>
254                     <separator/>
255                     <filter string="My" domain="[('user_id','=',uid)]" help="My Sales Orders" icon="terp-personal" name="my_sale_orders_filter"/>
256                     <field name="partner_id" operator="child_of"/>
257                     <field name="user_id"/>
258                     <field name="project_id"/>
259                     <group expand="0" string="Group By...">
260                         <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
261                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
262                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
263                         <filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
264                     </group>
265                </search>
266             </field>
267         </record>
268
269         <record id="action_orders" model="ir.actions.act_window">
270             <field name="name">Sales Orders</field>
271             <field name="type">ir.actions.act_window</field>
272             <field name="res_model">sale.order</field>
273             <field name="view_type">form</field>
274             <field name="view_mode">tree,form,calendar,graph</field>
275             <field name="search_view_id" ref="view_sales_order_filter"/>
276             <field name="context">{
277                     'search_default_my_sale_orders_filter': 1
278                 }
279             </field>
280             <field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
281             <field name="help" type="html">
282                 <p class="oe_view_nocontent_create">
283                     Click to create a quotation that can be converted into a sales
284                     order.
285                 </p><p>
286                     OpenERP will help you efficiently handle the complete sales flow:
287                     quotation, sales order, delivery, invoicing and payment.
288                 </p>
289             </field>
290         </record>
291
292         <menuitem action="action_orders" id="menu_sale_order" parent="base.menu_sales" sequence="6" groups="base.group_sale_salesman,base.group_sale_manager"/>
293
294         <record id="action_orders_exception" model="ir.actions.act_window">
295             <field name="name">Sales in Exception</field>
296             <field name="type">ir.actions.act_window</field>
297             <field name="res_model">sale.order</field>
298             <field name="view_type">form</field>
299             <field name="view_mode">tree,form,calendar,graph</field>
300             <field name="domain">[('state','in',('shipping_except','invoice_except'))]</field>
301             <field name="filter" eval="True"/>
302             <field name="search_view_id" ref="view_sales_order_filter"/>
303         </record>
304
305         <record id="action_orders_in_progress" model="ir.actions.act_window">
306             <field name="name">Sales Order in Progress</field>
307             <field name="type">ir.actions.act_window</field>
308             <field name="res_model">sale.order</field>
309             <field name="view_type">form</field>
310             <field name="view_mode">tree,form,calendar,graph</field>
311             <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
312             <field name="search_view_id" ref="view_sales_order_filter"/>
313         </record>
314
315
316         <record id="action_quotations" model="ir.actions.act_window">
317             <field name="name">Quotations</field>
318             <field name="type">ir.actions.act_window</field>
319             <field name="res_model">sale.order</field>
320             <field name="view_type">form</field>
321             <field name="view_id" ref="view_quotation_tree"/>
322             <field name="view_mode">tree,form,calendar,graph</field>
323             <field name="context">{'search_default_my_sale_orders_filter': 1}</field>
324             <field name="domain">[('state','in',('draft','sent','cancel'))]</field>
325             <field name="search_view_id" ref="view_sales_order_filter"/>
326             <field name="help" type="html">
327               <p class="oe_view_nocontent_create">
328                 Click to create a quotation, the first step of a new sale.
329               </p><p>
330                 OpenERP will help you handle efficiently the complete sale flow:
331                 from the quotation to the sales order, the
332                 delivery, the invoicing and the payment collection.
333               </p><p>
334                 The social feature helps you organize discussions on each sales
335                 order, and allow your customers to keep track of the evolution
336                 of the sales order.
337               </p>
338             </field>
339         </record>
340
341         <menuitem id="menu_sale_quotations"
342                 action="action_quotations" parent="base.menu_sales"
343                 sequence="5"/>
344
345         <record id="action_order_tree" model="ir.actions.act_window">
346             <field name="name">Old Quotations</field>
347             <field name="type">ir.actions.act_window</field>
348             <field name="res_model">sale.order</field>
349             <field name="view_type">form</field>
350             <field name="view_mode">tree,form,calendar,graph</field>
351             <field name="domain">[('state','=','draft'),('date_order','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
352             <field name="filter" eval="True"/>
353             <field name="search_view_id" ref="view_sales_order_filter"/>
354         </record>
355
356
357         <record id="view_order_line_tree" model="ir.ui.view">
358             <field name="name">sale.order.line.tree</field>
359             <field name="model">sale.order.line</field>
360             <field name="arch" type="xml">
361                 <tree string="Sales Order Lines" create="false">
362                     <field name="product_id" invisible="1"/>
363                     <field name="order_id"/>
364                     <field name="order_partner_id"/>
365                     <field name="name"/>
366                     <field name="product_uom_qty" string="Qty"/>
367                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
368                     <field name="salesman_id"/>
369                     <field name="price_subtotal" sum="Total"/>
370                     <field name="state"/>
371                     <field name="invoiced"/>
372                 </tree>
373             </field>
374         </record>
375         <record id="view_order_line_form2" model="ir.ui.view">
376             <field name="name">sale.order.line.form2</field>
377             <field name="model">sale.order.line</field>
378             <field name="arch" type="xml">
379                 <form string="Sales Order Lines" version="7.0" create="false">
380                     <header>
381                         <button name="%(action_view_sale_order_line_make_invoice)d" string="Create Invoice" type="action" attrs="{'invisible': ['|',('invoiced', '=', 1), ('state', 'not in', ('confirmed', 'draft'))]}" class="oe_highlight" groups="base.group_user"/>
382                         <button name="button_cancel" string="Cancel Line" type="object" states="confirmed,exception" groups="base.group_user"/>
383                         <button name="button_done" string="Done" type="object"  attrs="{'invisible': ['|',('invoiced', '=', 0), ('state', 'not in', ('confirmed', 'exception'))]}" class="oe_highlight" groups="base.group_user"/>
384                         <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
385                     </header>
386                     <sheet>
387                     <label for="order_id" class="oe_edit_only"/>
388                     <h1><field name="order_id" domain="[('state','!=','done')]"/></h1>
389                     <label for="order_partner_id" class="oe_edit_only"/>
390                     <h2><field name="order_partner_id"/></h2>
391                     <group>
392                         <group>
393                             <field name="product_id"/>
394                             <label for="product_uom_qty"/>
395                             <div>
396                                 <field name="product_uom_qty" readonly="1" class="oe_inline"/>
397                                 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
398                             </div>
399                         </group>
400                         <group>
401                             <field name="price_unit"/>
402                             <field name="discount" groups="sale.group_discount_per_so_line"/>
403                             <field name="price_subtotal"/>
404                             <field name="invoiced"/>
405                             <field name="company_id" groups="base.group_multi_company" readonly="1"/>
406                         </group>
407                     </group>
408                     <label for="name"/>
409                     <field name="name"/>
410                     </sheet>
411                 </form>
412             </field>
413         </record>
414
415         <record id="view_sales_order_line_filter" model="ir.ui.view">
416             <field name="name">sale.order.line.select</field>
417             <field name="model">sale.order.line</field>
418             <field name="arch" type="xml">
419                 <search string="Search Sales Order">
420                     <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('invoiced','&lt;&gt;', 1),('state','=','done')]"  help="Sales Order Lines ready to be invoiced"/>
421                     <separator/>
422                     <filter string="My Sales Order Lines" icon="terp-personnal" domain="[('salesman_id','=',uid)]" help="Sales Order Lines related to a Sales Order of mine"/>
423                     <field name="order_id"/>
424                     <field name="order_partner_id" operator="child_of"/>
425                     <field name="product_id"/>
426                     <field name="salesman_id"/>
427                     <group expand="0" string="Group By...">
428                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
429                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}"/>
430                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'salesman_id'}"/>
431                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
432                     </group>
433                 </search>
434             </field>
435         </record>
436
437         <record id="view_sales_order_uninvoiced_line_filter" model="ir.ui.view">
438             <field name="name">sale.order.uninvoiced.line</field>
439             <field name="model">sale.order.line</field>
440             <field name="arch" type="xml">
441                 <search string="Search Uninvoiced Lines">
442                     <filter icon="terp-gtk-go-back-rtl" string="To Do" domain="[('state','=','confirmed')]" name="sale order" help="Confirmed sales order lines, not yet delivered"/>
443                     <filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]" name="sale_order_done" help="Sales order lines done"/>
444                     <filter icon="terp-accessories-archiver" string="Shipped" domain="[('state','=','done')]" name="unshipped" help="Sales Order Lines that are in 'done' state"/>
445                     <separator/>
446                     <filter icon="terp-dolar_ok!" string="Uninvoiced" name="uninvoiced" domain="[('invoiced','&lt;&gt;', 1),('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]" help="Sales Order Lines that are confirmed, done or in exception state and haven't yet been invoiced"/>
447                     <separator/>
448                     <filter string="My Sales Order Lines" icon="terp-personal" domain="[('salesman_id','=',uid)]" help="My Sales Order Lines"/>
449                     <field name="order_id"/>
450                     <field name="order_partner_id" operator="child_of"/>
451                     <field name="product_id"/>
452                     <field name="salesman_id"/>
453                     <group expand="0" string="Group By...">
454                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}" help="Order reference"/>
455                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
456                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
457                     </group>
458                 </search>
459             </field>
460         </record>
461
462         <record id="action_order_line_tree2" model="ir.actions.act_window">
463             <field name="name">Order Lines to Invoice</field>
464             <field name="type">ir.actions.act_window</field>
465             <field name="res_model">sale.order.line</field>
466             <field name="view_type">form</field>
467             <field name="view_mode">tree,form</field>
468             <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/>
469             <field name="context">{"search_default_uninvoiced":1}</field>
470             <field name="filter" eval="True"/>
471             <field name="help" type="html">
472               <p>
473                 Here is a list of each sales order line to be invoiced. You can
474                 invoice sales orders partially, by lines of sales order. You do
475                 not need this list if you invoice from the delivery orders or
476                 if you invoice sales totally.
477               </p>
478             </field>
479         </record>
480
481         <record id="action_order_line_tree3" model="ir.actions.act_window">
482             <field name="name">Uninvoiced and Delivered Lines</field>
483             <field name="type">ir.actions.act_window</field>
484             <field name="res_model">sale.order.line</field>
485             <field name="view_type">form</field>
486             <field name="view_mode">tree,form</field>
487             <field name="domain">[('invoiced','&lt;&gt;', 1),('state','=','done')]</field>
488             <field name="filter" eval="True"/>
489         </record>
490         <record id="action_order_line_product_tree" model="ir.actions.act_window">
491             <field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
492             <field name="name">Sales Order Lines</field>
493             <field name="res_model">sale.order.line</field>
494             <field name="view_id" ref="view_order_line_tree"/>
495         </record>
496         <record model="ir.ui.view" id="product_form_view_sale_order_button">
497             <field name="name">product.product.sale.order</field>
498             <field name="model">product.product</field>
499             <field name="inherit_id" ref="product.product_normal_form_view"/>
500             <field name="arch" type="xml">
501                 <xpath expr="//div[@name='buttons']" position="inside">
502                     <button class="oe_inline oe_stat_button" name="%(action_order_line_product_tree)d" 
503                         type="action" groups="base.group_sale_salesman" icon="fa-strikethrough">
504                         <field string="Sales" name="sales_count" widget="statinfo" />
505                     </button>
506                 </xpath>
507             </field>
508         </record>
509
510         <record model="ir.ui.view" id="view_company_inherit_form2">
511             <field name="name">res.company.form.inherit</field>
512             <field name="inherit_id" ref="base.view_company_form"/>
513             <field name="model">res.company</field>
514             <field name="arch" type="xml">
515                 <xpath expr="//group[@name='account_grp']" position="after">
516                     <group name="sale_grp" string="Sales">
517                         <field name="sale_note" nolabel="1" placeholder="Default terms &amp; conditions..."/>
518                     </group>
519                 </xpath>
520             </field>
521         </record>
522     </data>
523 </openerp>