[ADD] forgot a file in previous commit
[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"/>
32                     <field name="amount_total" operator="+"/>
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" 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" 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,invoiced,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="state" invisible="1" />
126                                             <field name="product_id"
127                                                 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
128                                                 groups="base.group_user"
129                                                 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, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
130                                             <label for="product_uom_qty"/>
131                                             <div>
132                                                 <field
133                                                     context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
134                                                     name="product_uom_qty" class="oe_inline"
135                                                     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)"/>
136                                                 <field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
137
138                                                     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)"/>
139                                             </div>
140                                             <label for="product_uos_qty" groups="product.group_uos"/>
141                                             <div groups="product.group_uos">
142                                                 <field name="product_uos_qty" class="oe_inline"/>
143                                                 <field name="product_uos" options='{"no_open": True}' class="oe_inline"/>
144                                             </div>
145                                             <field name="price_unit"/>
146                                             <label for="discount" groups="sale.group_discount_per_so_line"/>
147                                             <div name="discount" groups="sale.group_discount_per_so_line">
148                                                 <field name="discount" class="oe_inline"/> %%
149                                             </div>
150                                         </group>
151                                         <group>
152                                             <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
153                                             <field name="type"/>
154                                             <field name="th_weight"/>
155                                             <!-- we should put a config wizard for these two fields -->
156                                             <field name="address_allotment_id"/>
157                                         </group>
158                                     </group>
159                                     <label for="name"/>
160                                     <field name="name"/>
161                                     <div groups="base.group_no_one">
162                                         <label for="invoice_lines"/>
163                                         <field name="invoice_lines"/>
164                                     </div>
165                                 </form>
166                                 <tree string="Sales Order Lines" editable="bottom">
167                                     <field name="sequence" widget="handle"/>
168                                     <field name="state" invisible="1"/>
169                                     <field name="th_weight" invisible="1"/>
170                                     <field name="product_id"
171                                         context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
172                                         groups="base.group_user" 
173                                         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, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
174                                     <field name="name"/>
175                                     <field name="product_uom_qty"
176                                         context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
177                                         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)"/>
178                                     <field name="product_uom"
179                                         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)"
180                                         groups="product.group_uom" options='{"no_open": True}'/>
181                                     <field name="product_uos_qty" groups="product.group_uos" invisible="1"/>
182                                     <field name="product_uos" string="UoS" groups="product.group_uos" invisible="1"/>
183                                     <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
184                                     <field name="price_unit"/>
185                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
186                                     <field name="price_subtotal"/>
187                                 </tree>
188                             </field>
189                             <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
190                                 <field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
191                                 <field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
192                                 <div class="oe_subtotal_footer_separator oe_inline">
193                                     <label for="amount_total" />
194                                     <button name="button_dummy"
195                                         states="draft,sent" string="(update)" type="object" class="oe_edit_only oe_link"/>
196                                 </div>
197                                 <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
198                             </group>
199                             <div class="oe_clear"/>
200                             <field name="note" class="oe_inline" placeholder="Terms and conditions..."/>
201                         </page>
202                         <page string="Other Information" groups="base.group_user">
203                             <group>
204                                 <group name="sales_person" groups="base.group_user">
205                                     <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']}"/>
206                                     <field groups="base.group_no_one" name="origin"/>
207                                 </group>
208                                 <group name="sale_pay">
209                                     <field name="payment_term" widget="selection"/>
210                                     <field name="fiscal_position" widget="selection"/>
211                                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
212                                 </group>
213                                 <group>
214                                     <field name="invoiced"/>
215                                     <field name="invoice_exists" invisible="1"/>
216                                 </group>
217                             </group>
218                         </page>
219                     </notebook>
220                 </sheet>
221                 <div class="oe_chatter">
222                     <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
223                     <field name="message_ids" widget="mail_thread"/>
224                 </div>
225                 </form>
226             </field>
227         </record>
228
229         <!-- inherited view to make the order lines list in the form non-editable
230              for the members of some usability groups -->
231         <record id="view_order_form_editable_list" model="ir.ui.view">
232             <field name="name">sale.order.form.editable.list</field>
233             <field name="model">sale.order</field>
234             <field name="inherit_id" ref="sale.view_order_form"/>
235             <field name="groups_id" eval="[(6, 0, [ref('product.group_uos'), ref('product.group_stock_packaging'), ref('sale.group_mrp_properties')])]"/>
236             <field name="arch" type="xml">
237                 <xpath expr="//field[@name='order_line']/tree" position="attributes">
238                     <attribute name="editable"/>
239                 </xpath>
240             </field>
241         </record>
242
243         <record id="view_sales_order_filter" model="ir.ui.view">
244             <field name="name">sale.order.list.select</field>
245             <field name="model">sale.order</field>
246             <field name="arch" type="xml">
247                 <search string="Search Sales Order">
248                     <field name="name" string="Sales Order" filter_domain="['|',('name','ilike',self),('client_order_ref','ilike',self)]"/>
249                     <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
250                     <separator/>
251                     <filter icon="terp-document-new" string="Quotations" name="draft" domain="[('state','in',('draft','sent'))]" help="Sales Order that haven't yet been confirmed"/>
252                     <filter icon="terp-check" string="Sales" name="sales" domain="[('state','in',('manual','progress'))]"/>
253                     <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
254                     <filter icon="terp-dolar_ok!" string="Done" domain="[('state','=','done')]" help="Sales Order done"/>
255                     <separator/>
256                     <filter string="My" domain="[('user_id','=',uid)]" help="My Sales Orders" icon="terp-personal" name="my_sale_orders_filter"/>
257                     <field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
258                     <field name="user_id"/>
259                     <field name="project_id"/>
260                     <group expand="0" string="Group By...">
261                         <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
262                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
263                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
264                         <filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
265                     </group>
266                </search>
267             </field>
268         </record>
269
270         <record id="action_orders" model="ir.actions.act_window">
271             <field name="name">Sales Orders</field>
272             <field name="type">ir.actions.act_window</field>
273             <field name="res_model">sale.order</field>
274             <field name="view_type">form</field>
275             <field name="view_mode">tree,form,calendar,graph</field>
276             <field name="search_view_id" ref="view_sales_order_filter"/>
277             <field name="context">{
278                     'search_default_my_sale_orders_filter': 1
279                 }
280             </field>
281             <field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
282             <field name="help" type="html">
283                 <p class="oe_view_nocontent_create">
284                     Click to create a quotation that can be converted into a sales
285                     order.
286                 </p><p>
287                     OpenERP will help you efficiently handle the complete sales flow:
288                     quotation, sales order, delivery, invoicing and payment.
289                 </p>
290             </field>
291         </record>
292
293         <menuitem action="action_orders" id="menu_sale_order" parent="base.menu_sales" sequence="6" groups="base.group_sale_salesman,base.group_sale_manager"/>
294
295         <record id="action_orders_exception" model="ir.actions.act_window">
296             <field name="name">Sales in Exception</field>
297             <field name="type">ir.actions.act_window</field>
298             <field name="res_model">sale.order</field>
299             <field name="view_type">form</field>
300             <field name="view_mode">tree,form,calendar,graph</field>
301             <field name="domain">[('state','in',('shipping_except','invoice_except'))]</field>
302             <field name="filter" eval="True"/>
303             <field name="search_view_id" ref="view_sales_order_filter"/>
304         </record>
305
306         <record id="action_orders_in_progress" model="ir.actions.act_window">
307             <field name="name">Sales Order in Progress</field>
308             <field name="type">ir.actions.act_window</field>
309             <field name="res_model">sale.order</field>
310             <field name="view_type">form</field>
311             <field name="view_mode">tree,form,calendar,graph</field>
312             <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
313             <field name="search_view_id" ref="view_sales_order_filter"/>
314         </record>
315
316
317         <record id="action_quotations" model="ir.actions.act_window">
318             <field name="name">Quotations</field>
319             <field name="type">ir.actions.act_window</field>
320             <field name="res_model">sale.order</field>
321             <field name="view_type">form</field>
322             <field name="view_id" ref="view_quotation_tree"/>
323             <field name="view_mode">tree,form,calendar,graph</field>
324             <field name="context">{'search_default_my_sale_orders_filter': 1}</field>
325             <field name="domain">[('state','in',('draft','sent','cancel'))]</field>
326             <field name="search_view_id" ref="view_sales_order_filter"/>
327             <field name="help" type="html">
328               <p class="oe_view_nocontent_create">
329                 Click to create a quotation, the first step of a new sale.
330               </p><p>
331                 OpenERP will help you handle efficiently the complete sale flow:
332                 from the quotation to the sales order, the
333                 delivery, the invoicing and the payment collection.
334               </p><p>
335                 The social feature helps you organize discussions on each sales
336                 order, and allow your customers to keep track of the evolution
337                 of the sales order.
338               </p>
339             </field>
340         </record>
341
342         <menuitem id="menu_sale_quotations"
343                 action="action_quotations" parent="base.menu_sales"
344                 sequence="5"/>
345
346         <record id="action_order_tree" model="ir.actions.act_window">
347             <field name="name">Old Quotations</field>
348             <field name="type">ir.actions.act_window</field>
349             <field name="res_model">sale.order</field>
350             <field name="view_type">form</field>
351             <field name="view_mode">tree,form,calendar,graph</field>
352             <field name="domain">[('state','=','draft'),('date_order','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
353             <field name="filter" eval="True"/>
354             <field name="search_view_id" ref="view_sales_order_filter"/>
355         </record>
356
357
358         <record id="view_order_line_tree" model="ir.ui.view">
359             <field name="name">sale.order.line.tree</field>
360             <field name="model">sale.order.line</field>
361             <field name="arch" type="xml">
362                 <tree string="Sales Order Lines">
363                     <field name="product_id" invisible="1"/>
364                     <field name="order_id"/>
365                     <field name="order_partner_id"/>
366                     <field name="name"/>
367                     <field name="product_uom_qty" string="Qty"/>
368                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
369                     <field name="salesman_id"/>
370                     <field name="price_subtotal" sum="Total"/>
371                     <field name="state"/>
372                     <field name="invoiced"/>
373                 </tree>
374             </field>
375         </record>
376         <record id="view_order_line_form2" model="ir.ui.view">
377             <field name="name">sale.order.line.form2</field>
378             <field name="model">sale.order.line</field>
379             <field name="arch" type="xml">
380                 <form string="Sales Order Lines" version="7.0">
381                     <header>
382                         <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"/>
383                         <button name="button_cancel" string="Cancel Line" type="object" states="confirmed,exception" groups="base.group_user"/>
384                         <button name="button_done" string="Done" type="object"  attrs="{'invisible': ['|',('invoiced', '=', 0), ('state', 'not in', ('confirmed', 'exception'))]}" class="oe_highlight" groups="base.group_user"/>
385                         <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
386                     </header>
387                     <sheet>
388                     <label for="order_id" class="oe_edit_only"/>
389                     <h1><field name="order_id" domain="[('state','!=','done')]"/></h1>
390                     <label for="order_partner_id" class="oe_edit_only"/>
391                     <h2><field name="order_partner_id"/></h2>
392                     <group>
393                         <group>
394                             <field name="product_id"/>
395                             <label for="product_uom_qty"/>
396                             <div>
397                                 <field name="product_uom_qty" readonly="1" class="oe_inline"/>
398                                 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
399                             </div>
400                         </group>
401                         <group>
402                             <field name="price_unit"/>
403                             <field name="discount" groups="sale.group_discount_per_so_line"/>
404                             <field name="price_subtotal"/>
405                             <field name="invoiced"/>
406                             <field name="company_id" groups="base.group_multi_company" readonly="1"/>
407                         </group>
408                     </group>
409                     <label for="name"/>
410                     <field name="name"/>
411                     </sheet>
412                 </form>
413             </field>
414         </record>
415
416         <record id="view_sales_order_line_filter" model="ir.ui.view">
417             <field name="name">sale.order.line.select</field>
418             <field name="model">sale.order.line</field>
419             <field name="arch" type="xml">
420                 <search string="Search Sales Order">
421                     <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('invoiced','&lt;&gt;', 1),('state','=','done')]"  help="Sales Order Lines ready to be invoiced"/>
422                     <separator/>
423                     <filter string="My Sales Order Lines" icon="terp-personnal" domain="[('salesman_id','=',uid)]" help="Sales Order Lines related to a Sales Order of mine"/>
424                     <field name="order_id"/>
425                     <field name="order_partner_id" filter_domain="[('order_partner_id', 'child_of', self)]"/>
426                     <field name="product_id"/>
427                     <field name="salesman_id"/>
428                     <group expand="0" string="Group By...">
429                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
430                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}"/>
431                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'salesman_id'}"/>
432                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
433                     </group>
434                 </search>
435             </field>
436         </record>
437
438         <record id="view_sales_order_uninvoiced_line_filter" model="ir.ui.view">
439             <field name="name">sale.order.uninvoiced.line</field>
440             <field name="model">sale.order.line</field>
441             <field name="arch" type="xml">
442                 <search string="Search Uninvoiced Lines">
443                     <filter icon="terp-gtk-go-back-rtl" string="To Do" domain="[('state','=','confirmed')]" name="sale order" help="Confirmed sales order lines, not yet delivered"/>
444                     <filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]" name="sale_order_done" help="Sales order lines done"/>
445                     <filter icon="terp-accessories-archiver" string="Shipped" domain="[('state','=','done')]" name="unshipped" help="Sales Order Lines that are in 'done' state"/>
446                     <separator/>
447                     <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"/>
448                     <separator/>
449                     <filter string="My Sales Order Lines" icon="terp-personal" domain="[('salesman_id','=',uid)]" help="My Sales Order Lines"/>
450                     <field name="order_id"/>
451                     <field name="order_partner_id" filter_domain="[('order_partner_id', 'child_of', self)]"/>
452                     <field name="product_id"/>
453                     <field name="salesman_id"/>
454                     <group expand="0" string="Group By...">
455                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}" help="Order reference"/>
456                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
457                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
458                     </group>
459                 </search>
460             </field>
461         </record>
462
463         <record id="action_order_line_tree2" model="ir.actions.act_window">
464             <field name="name">Order Lines to Invoice</field>
465             <field name="type">ir.actions.act_window</field>
466             <field name="res_model">sale.order.line</field>
467             <field name="view_type">form</field>
468             <field name="view_mode">tree,form</field>
469             <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/>
470             <field name="context">{"search_default_uninvoiced":1}</field>
471             <field name="filter" eval="True"/>
472             <field name="help" type="html">
473               <p>
474                 Here is a list of each sales order line to be invoiced. You can
475                 invoice sales orders partially, by lines of sales order. You do
476                 not need this list if you invoice from the delivery orders or
477                 if you invoice sales totally.
478               </p>
479             </field>
480         </record>
481
482         <record id="action_order_line_tree3" model="ir.actions.act_window">
483             <field name="name">Uninvoiced and Delivered Lines</field>
484             <field name="type">ir.actions.act_window</field>
485             <field name="res_model">sale.order.line</field>
486             <field name="view_type">form</field>
487             <field name="view_mode">tree,form</field>
488             <field name="domain">[('invoiced','&lt;&gt;', 1),('state','=','done')]</field>
489             <field name="filter" eval="True"/>
490         </record>
491         <record id="action_order_line_product_tree" model="ir.actions.act_window">
492             <field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
493             <field name="name">Sales Order Lines</field>
494             <field name="res_model">sale.order.line</field>
495             <field name="view_id" ref="view_order_line_tree"/>
496         </record>
497         <record model="ir.ui.view" id="product_form_view_sale_order_button">
498             <field name="name">product.product.sale.order</field>
499             <field name="model">product.product</field>
500             <field name="inherit_id" ref="product.product_normal_form_view"/>
501             <field name="arch" type="xml">
502                 <xpath expr="//div[@name='buttons']" position="inside">
503                     <button string="Sales" name="%(action_order_line_product_tree)d" type="action" groups="base.group_sale_salesman"/>
504                 </xpath>
505             </field>
506         </record>
507         <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>
508         <menuitem id="menu_invoicing_sales_order_lines" parent="base.menu_invoiced" action="action_order_line_tree2" sequence="10" groups="sale.group_invoice_so_lines"/>
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>