aee5ab0f1120a6c49e2a12e350c65f870643ce90
[odoo/odoo.git] / addons / sale / sale_view.xml
1 <openerp>
2     <data>
3         <menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="1" groups="base.group_sale_salesman,base.group_sale_manager"/>
4         <menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
5
6
7         <record id="view_shop_form" model="ir.ui.view">
8             <field name="name">sale.shop</field>
9             <field name="model">sale.shop</field>
10             <field name="type">form</field>
11             <field name="arch" type="xml">
12                 <form string="Sales Shop" version="7.0">
13                     <label for="name" class="oe_edit_only"/>
14                     <h1><field name="name"/></h1>
15                     <group>
16                         <group>
17                             <field name="warehouse_id" required="1" widget="selection"/>
18                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
19                         </group>
20                         <group>
21                             <field name="payment_default_id"/>
22                             <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist"/>
23                             <field name="project_id" groups="analytic.group_analytic_accounting"/>
24                         </group>
25                     </group>
26                 </form>
27             </field>
28         </record>
29         <record id="view_shop_tree" model="ir.ui.view">
30             <field name="name">sale.shop</field>
31             <field name="model">sale.shop</field>
32             <field name="type">tree</field>
33             <field name="arch" type="xml">
34                 <tree string="Sales Shop">
35                     <field name="name"/>
36                     <field name="warehouse_id"/>
37                     <field name="pricelist_id" groups="product.group_sale_pricelist"/>
38                     <field name="project_id" groups="analytic.group_analytic_accounting"/>
39                 </tree>
40             </field>
41         </record>
42
43         <record id="action_shop_form" model="ir.actions.act_window">
44             <field name="name">Shop</field>
45             <field name="type">ir.actions.act_window</field>
46             <field name="res_model">sale.shop</field>
47             <field name="view_type">form</field>
48             <field name="view_mode">tree,form</field>
49             <field name="view_id" ref="view_shop_tree"/>
50             <field name="help">If you have more than one shop reselling your company products, you can create and manage that from here. Whenever you will record a new quotation or sales order, it has to be linked to a shop. The shop also defines the warehouse from which the products will be delivered for each particular sales.</field>
51         </record>
52
53         <menuitem action="action_shop_form" id="menu_action_shop_form" parent="base.menu_base_config" sequence="35"
54             groups="stock.group_locations"/>
55
56         <record id="view_sale_order_calendar" model="ir.ui.view">
57             <field name="name">sale.order.calendar</field>
58             <field name="model">sale.order</field>
59             <field name="type">calendar</field>
60             <field name="arch" type="xml">
61                 <calendar string="Sales Orders" color="state" date_start="date_order">
62                     <field name="partner_id"/>
63                     <field name="amount_total"/>
64                 </calendar>
65             </field>
66         </record>
67         <record model="ir.ui.view" id="view_sale_order_graph">
68             <field name="name">sale.order.graph</field>
69             <field name="model">sale.order</field>
70             <field name="type">graph</field>
71             <field name="arch" type="xml">
72                 <graph string="Sales Orders" type="bar">
73                     <field name="partner_id"/>
74                     <field name="amount_total" operator="+"/>
75                 </graph>
76             </field>
77         </record>
78
79         <record id="view_order_tree" model="ir.ui.view">
80             <field name="name">sale.order.tree</field>
81             <field name="model">sale.order</field>
82             <field name="type">tree</field>
83             <field name="priority">2</field>
84             <field name="arch" type="xml">
85                 <tree string="Sales Orders" fonts="bold:needaction_pending==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
86                     <field name="needaction_pending" invisible="1"/>
87                     <field name="name"/>
88                     <field name="date_order"/>
89                     <field name="partner_id"/>
90                     <field name="user_id"/>
91                     <field name="picked_rate" widget="progressbar"/>
92                     <field name="invoiced_rate" widget="progressbar"/>
93                     <field name="amount_total" sum="Total Tax Included"/>
94                     <field name="state"/>
95                 </tree>
96             </field>
97         </record>
98
99         <record id="view_order_form" model="ir.ui.view">
100             <field name="name">sale.order.form</field>
101             <field name="model">sale.order</field>
102             <field name="type">form</field>
103             <field name="arch" type="xml">
104                 <form string="Sales Order" version="7.0">
105                     <header>
106                         <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
107                         <button name="invoice_corrected" states="invoice_except" string="Ignore Exception"/>
108                         <button name="ship_recreate" states="shipping_except" string="Recreate Delivery Order"/>
109                         <button name="ship_corrected" states="shipping_except" string="Ignore Exception"/>
110                         <button name="action_quotation_send" string="Send by Mail" type="object" states="draft" class="oe_highlight"/>
111                         <button name="action_quotation_send" string="Send by Mail" type="object" states="sent"/>
112                         <button name="manual_invoice" states="manual" string="Create Final Invoice" type="object" class="oe_highlight"/>
113                         <button name="print_quotation" string="Send by Post" type="object" states="draft" class="oe_highlight"/>
114                         <button name="print_quotation" string="Send by Post" type="object" states="sent"/>
115                         <button name="action_button_confirm" states="draft" string="Confirm" type="object"/>
116                         <button name="action_button_confirm" states="sent" string="Confirm" class="oe_highlight" type="object"/>
117                         <button name="action_view_invoice" string="Open Invoice" type="object" 
118                           attrs="{'invisible': ['|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking')]}"/>
119                         <button name="action_view_delivery" string="Open Delivery Order" type="object" 
120                           attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/>
121                         <button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" states="manual"/>
122                         <button name="cancel" states="draft,sent" string="Cancel"/>
123                         <button name="action_cancel" states="manual,progress" string="Cancel" type="object"/>
124                         <button name="ship_cancel" states="shipping_except" string="Cancel"/>
125                         <button name="invoice_cancel" states="invoice_except" string="Cancel"/>
126                         <field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,invoiced,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
127                 </header>
128                 <sheet>
129                     <h1>
130                         <label string="Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
131                         <label string="Sale Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
132                         <field name="name" class="oe_inline" readonly="1"/>
133                     </h1>
134                     <group>
135                         <group>
136                             <field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" />
137                             <field domain="[('parent_id','=',partner_id)]" name="partner_invoice_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
138                             <field domain="[('parent_id','=',partner_id)]" name="partner_shipping_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
139                             <field name="project_id" context="{'partner_id':partner_id, 'pricelist_id':pricelist_id, 'default_name':name}" groups="sale.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
140                         </group><group>
141                             <field name="date_order"/>
142                             <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection" groups="stock.group_locations"/>
143                             <field name="client_order_ref"/>
144                             <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
145                         </group>
146                     </group>
147                     <notebook>
148                         <page string="Order Lines">
149                             <field name="order_line">
150                                 <form string="Sales Order Lines" version="7.0">
151                                     <header>
152                                         <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
153                                     </header>
154                                     <group col="4" colspan="4">
155                                         <group>
156                                             <field name="product_id"
157                                                 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
158                                                 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, product_packaging, parent.fiscal_position, False, context)"/>
159                                             <field name="name" placeholder="Product/Service characteristics"/>
160                                         </group>
161                                         <group>
162                                             <label for="product_uom_qty"/>
163                                             <div>
164                                                 <field
165                                                     context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
166                                                     name="product_uom_qty" class="oe_inline"
167                                                     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, product_packaging, parent.fiscal_position, True, context)"/>
168                                                 <field name="product_uom" groups="product.group_uom" class="oe_inline"
169                                                     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)"/>
170
171                                             </div>
172                                             <label for="product_uos_qty"/>
173                                             <div>
174                                                 <field groups="product.group_uos" name="product_uos_qty" class="oe_inline"/>
175                                                 <field groups="product.group_uos" name="product_uos" class="oe_inline"/>
176                                             </div>
177                                             <field name="price_unit"/>
178                                             <field name="discount" groups="sale.group_discount_per_so_line"/>
179                                         </group>
180                                     </group>
181                                     <group>
182                                         <group>
183                                             <field name="product_packaging"
184                                                 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}" on_change="product_packaging_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, parent.partner_id, product_packaging, True, context)"
185                                                 domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"
186                                                 colspan="3"/>
187                                             <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
188                                             <field name="invoiced"/>
189                                             <button name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoices" type="action" icon="terp-document-new"/>
190                                         </group>
191                                         <group col="4">
192                                             <field name="type"/>
193                                             <field name="delay"/>
194                                             <field name="th_weight"/>
195                                             <field name="address_allotment_id"/>
196                                         </group>
197                                         <separator string="Properties" colspan="2"/>
198                                         <field name="property_ids" colspan="4" nolabel="1" />
199                                         <field name="notes" groups="base.group_sale_notes_subtotal" placeholder="Add a note on order line..."/>
200                                         <div groups="base.group_no_one">
201                                             <separator colspan="4" string="Invoice Lines"/>
202                                             <field colspan="4" name="invoice_lines" nolabel="1"/>
203                                             <separator colspan="4" string="Stock Moves"/>
204                                             <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
205                                         </div>
206                                     </group>
207                                 </form>
208                                 <tree string="Sales Order Lines">
209                                     <field name="sequence" />
210                                     <field name="name"/>
211                                     <field name="product_uom_qty" string="Quantity"/>
212                                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
213                                     <field groups="product.group_uos" name="product_uos_qty" string="Quantity (UoS)"/>
214                                     <field groups="product.group_uos" name="product_uos" string="UoS"/>
215                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
216                                     <field name="price_unit"/>
217                                     <field name="price_subtotal" groups="base.group_sale_notes_subtotal"/>
218                                 </tree>
219                             </field>
220                             <group class="oe_subtotal_footer" colspan="2" name="sale_total">
221                                 <field name="amount_untaxed"/>
222                                 <field name="amount_tax"/>
223                                 <field name="amount_total" class="oe_subtotal_footer_separator"/>
224                             </group>
225                             <separator string="Notes"/>
226                             <field name="note" placeholder="Add a global note on the sale order..."/>
227                         </page>
228                         <page string="Other Information">
229                             <group>
230                                 <group name="logistics">
231                                     <field name="incoterm" widget="selection"/>
232                                     <field name="picking_policy" required="True"/>
233                                     <field name="order_policy" on_change="shipping_policy_change(order_policy)"/>
234                                     <field name="invoice_quantity" invisible="True"/>
235                                 </group>
236                                 <group>
237                                     <field name="user_id"/>
238                                     <field groups="base.group_no_one" name="origin"/>
239                                 </group>
240                                 <group name="sale_pay">
241                                     <field name="payment_term" widget="selection"/>
242                                     <field name="fiscal_position" widget="selection"/>
243                                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
244                                 </group>
245                                 <group>
246                                     <field name="invoiced"/>
247                                     <field name="shipped"/>
248                                 </group>
249                             </group>
250                         </page>
251                         <page string="History">
252                             <separator string="Invoices"/>
253                             <field name="invoice_ids" context="{'form_view_ref':'account.invoice_form'}">
254                                 <tree string="Invoices" colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'">
255                                     <field name="date_invoice" />
256                                     <field name="number" />
257                                     <field name="partner_id" />
258                                     <field name="user_id" />
259                                     <field name="date_due" />
260                                     <field name="amount_total" />
261                                     <field name="state" />
262                                 </tree>
263                             </field>
264                             <separator string="Delivery Orders"/>
265                             <field name="picking_ids" context="{'default_type': 'out'}">
266                                 <tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Delivery Orders">
267                                     <field name="name"/>
268                                     <field name="partner_id" string="Customer" />
269                                     <field name="min_date"/>
270                                     <field name="state"/>
271                                     <button name="action_process" states="assigned" string="Deliver" type="object" icon="gtk-go-forward" context="{'default_type': 'out'}"/>
272                                 </tree>
273                             </field>
274                         </page>
275                     </notebook>
276                 </sheet>
277                 <footer>
278                     <field name="message_ids" widget="ThreadView"/>
279                 </footer>
280                 </form>
281             </field>
282         </record>
283
284         <record id="view_sales_order_filter" model="ir.ui.view">
285             <field name="name">sale.order.list.select</field>
286             <field name="model">sale.order</field>
287             <field name="type">search</field>
288             <field name="arch" type="xml">
289                 <search string="Search Sales Order">
290                     <filter icon="terp-document-new" string="Quotations" name="draft" domain="[('state','in',('draft','sent'))]" help="Sales Order that haven't yet been confirmed"/>
291                     <filter icon="terp-check" string="Sales" name="sales" domain="[('state','in',('manual','progress'))]"/>
292                     <separator orientation="vertical"/>
293                     <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
294                     <separator orientation="vertical"/>
295                     <field name="name"
296                         filter_domain="['|', ('name','ilike',self),('client_order_ref','ilike',self)]"/>
297                     <field name="partner_id"/>
298                     <field name="user_id">
299                         <filter domain="[('user_id','=',uid)]" help="My Sale Orders" icon="terp-personal"/>
300                     </field>
301                     <newline/>
302                     <group expand="0" string="Group By...">
303                         <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
304                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
305                         <separator orientation="vertical"/>
306                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
307                         <separator orientation="vertical"/>
308                         <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
309                     </group>
310                </search>
311             </field>
312         </record>
313
314         <record id="action_order_form" model="ir.actions.act_window">
315             <field name="name">Sales Orders</field>
316             <field name="type">ir.actions.act_window</field>
317             <field name="res_model">sale.order</field>
318             <field name="view_type">form</field>
319             <field name="view_mode">tree,form,calendar,graph</field>
320             <field name="search_view_id" ref="view_sales_order_filter"/>
321             <field name="context">{"search_default_sales":1}</field>
322             <field name="help">Sales Orders help you manage quotations and orders from your customers. OpenERP suggests that you start by creating a quotation. Once it is confirmed, the quotation will be converted into a Sales Order. OpenERP can handle several types of products so that a sales order may trigger tasks, delivery orders, manufacturing orders, purchases and so on. Based on the configuration of the sales order, a draft invoice will be generated so that you just have to confirm it when you want to bill your customer.</field>
323         </record>
324         <menuitem action="action_order_form" id="menu_sale_order" parent="base.menu_sales" sequence="4" groups="base.group_sale_salesman,base.group_sale_manager"/>
325
326         <record id="action_order_tree2" model="ir.actions.act_window">
327             <field name="name">Sales in Exception</field>
328             <field name="type">ir.actions.act_window</field>
329             <field name="res_model">sale.order</field>
330             <field name="view_type">form</field>
331             <field name="view_mode">tree,form,calendar,graph</field>
332             <field name="domain">[('state','in',('shipping_except','invoice_except'))]</field>
333             <field name="filter" eval="True"/>
334             <field name="search_view_id" ref="view_sales_order_filter"/>
335         </record>
336
337         <record id="action_order_tree4" model="ir.actions.act_window">
338             <field name="name">Sales Order in Progress</field>
339             <field name="type">ir.actions.act_window</field>
340             <field name="res_model">sale.order</field>
341             <field name="view_type">form</field>
342             <field name="view_mode">tree,form,calendar,graph</field>
343             <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
344             <field name="search_view_id" ref="view_sales_order_filter"/>
345         </record>
346
347
348         <record id="action_order_tree5" model="ir.actions.act_window">
349             <field name="name">Quotations</field>
350             <field name="type">ir.actions.act_window</field>
351             <field name="res_model">sale.order</field>
352             <field name="view_type">form</field>
353             <field name="view_mode">tree,form,calendar,graph</field>
354             <field name="context">{"search_default_draft":1}</field>
355             <field name="search_view_id" ref="view_sales_order_filter"/>
356             <field name="help">
357                 Click here to create a new quotation.
358                 &lt;p&gt;
359                 The "Quotation" is the first step of the Sales flow.  Manage your sales from quotation to invoice.
360                 &lt;p&gt;
361                 You will be able to sell products (manage deliveries) as well as services (create projects).
362             </field>
363         </record>
364
365         <menuitem id="menu_sale_quotations"
366         action="action_order_tree5" parent="base.menu_sales"
367         sequence="3" />
368
369         <record id="action_order_tree" model="ir.actions.act_window">
370             <field name="name">Old Quotations</field>
371             <field name="type">ir.actions.act_window</field>
372             <field name="res_model">sale.order</field>
373             <field name="view_type">form</field>
374             <field name="view_mode">tree,form,calendar,graph</field>
375             <field name="domain">[('state','=','draft'),('date_order','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
376             <field name="filter" eval="True"/>
377             <field name="search_view_id" ref="view_sales_order_filter"/>
378         </record>
379
380         <record id="view_order_line_graph" model="ir.ui.view">
381             <field name="name">sale.order.line.graph</field>
382             <field name="model">sale.order.line</field>
383             <field name="type">graph</field>
384             <field name="arch" type="xml">
385                 <graph string="Sales Order Lines">
386                     <field name="product_id"/>
387                     <field name="price_subtotal" operator="+"/>
388                 </graph>
389             </field>
390         </record>
391
392         <record id="view_order_line_tree" model="ir.ui.view">
393             <field name="name">sale.order.line.tree</field>
394             <field name="model">sale.order.line</field>
395             <field name="type">tree</field>
396             <field name="arch" type="xml">
397                 <tree string="Sales Order Lines">
398                     <field name="order_id"/>
399                     <field name="order_partner_id"/>
400                     <field name="product_id"/>
401                     <field name="product_uom_qty" string="Qty"/>
402                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
403                     <field name="salesman_id"/>
404                     <field name="price_subtotal" sum="Total" groups="base.group_sale_notes_subtotal"/>
405                     <field name="state"/>
406                     <field name="invoiced"/>
407                 </tree>
408             </field>
409         </record>
410         <record id="view_order_line_form2" model="ir.ui.view">
411             <field name="name">sale.order.line.form2</field>
412             <field name="model">sale.order.line</field>
413             <field name="type">form</field>
414             <field name="arch" type="xml">
415                 <form string="Sales Order Lines" version="7.0">
416                     <header>
417                         <button name="button_cancel" string="Cancel" type="object" icon="gtk-cancel" states="confirmed,exception"/>
418                         <button name="%(action_view_sale_order_line_make_invoice)d" string="Create Invoice" type="action" states="done" icon="gtk-go-forward" attrs="{'invisible': [('invoiced', '=', 1)]}"/>
419                         <button name="button_done" string="Done" type="object" states="confirmed,exception" icon="gtk-go-forward"/>
420                         <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
421                     </header>
422                     <sheet>
423                     <label for="order_id" class="oe_edit_only"/>
424                     <h1><field name="order_id"/></h1>
425                     <label for="order_partner_id" class="oe_edit_only"/>
426                     <h2><field name="order_partner_id"/></h2>
427                     <group>
428                         <group>
429                             <field name="product_id" readonly="1"/>
430                             <field name="name" groups="base.group_no_one"/>
431                             <label name="product_uom_qty"/>
432                             <div>
433                                 <field name="product_uom_qty" readonly="1" class="oe_inline"/>
434                                 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
435                             </div>
436                         </group><group>
437                             <field name="price_unit"/>
438                             <field name="discount" groups="sale.group_discount_per_so_line"/>
439                             <field name="price_subtotal" groups="base.group_sale_notes_subtotal"/>
440                             <field name="invoiced"/>
441                             <field name="company_id" groups="base.group_multi_company" readonly="1"/>
442                         </group>
443                     </group>
444                     <separator string="Notes" groups="base.group_sale_notes_subtotal"/>
445                     <field name="notes" groups="base.group_sale_notes_subtotal"/>
446                     </sheet>
447                 </form>
448             </field>
449         </record>
450
451         <record id="view_sales_order_line_filter" model="ir.ui.view">
452             <field name="name">sale.order.line.select</field>
453             <field name="model">sale.order.line</field>
454             <field name="type">search</field>
455             <field name="arch" type="xml">
456                 <search string="Search Sales Order">
457                     <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('invoiced','&lt;&gt;', 1),('state','=','done')]"  help="Sale Order Lines ready to be invoiced"/>
458                     <separator orientation="vertical"/>
459                     <field name="order_id"/>
460                     <field name="order_partner_id"/>
461                     <field name="product_id"/>
462                     <field name="salesman_id">
463                         <filter icon="terp-personnal" domain="[('salesman_id','=',uid)]" help="Sales Order Lines related to a Sales Order of mine"/>
464                     </field>
465                     <newline/>
466                     <group expand="0" string="Group By...">
467                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
468                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}"/>
469                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'salesman_id'}"/>
470                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
471                     </group>
472                 </search>
473             </field>
474         </record>
475
476         <record id="view_sales_order_uninvoiced_line_filter" model="ir.ui.view">
477             <field name="name">sale.order.uninvoiced.line</field>
478             <field name="model">sale.order.line</field>
479             <field name="type">search</field>
480             <field name="arch" type="xml">
481                 <search string="Search Uninvoiced Lines">
482                     <filter icon="terp-gtk-go-back-rtl" string="To Do" domain="[('state','=','confirmed')]" name="sale order" help="Confirmed sale order lines, not yet delivered"/>
483                     <filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]" name="sale_order_done" help="Sale order lines done"/>
484                     <separator orientation="vertical"/>
485                     <filter icon="terp-accessories-archiver" string="Shipped" domain="[('state','=','done')]" name="unshipped" help="Sale Order Lines that are in 'done' state"/>
486                     <filter icon="terp-dolar_ok!" string="Uninvoiced" name="uninvoiced" domain="[('invoiced','&lt;&gt;', 1),('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]" help="Sale Order Lines that are confirmed, done or in exception state and haven't yet been invoiced"/>
487                     <separator orientation="vertical"/>
488                     <field name="order_id"/>
489                     <field name="order_partner_id"/>
490                     <field name="product_id"/>
491                     <field name="salesman_id">
492                         <filter icon="terp-personal" domain="[('salesman_id','=',uid)]" help="My Sales Order Lines"/>
493                     </field>
494                     <newline/>
495                     <group expand="0" string="Group By...">
496                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}" help="Order reference"/>
497                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
498                         <separator orientation="vertical"/>
499                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
500                     </group>
501                 </search>
502             </field>
503         </record>
504
505         <record id="action_order_line_tree2" model="ir.actions.act_window">
506             <field name="name">Order Lines to Invoice</field>
507             <field name="type">ir.actions.act_window</field>
508             <field name="res_model">sale.order.line</field>
509             <field name="view_type">form</field>
510             <field name="view_mode">tree,form,graph</field>
511             <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/>
512             <field name="context">{"search_default_uninvoiced":1}</field>
513             <field name="filter" eval="True"/>
514             <field name="help">Here is a list of each sales order line to be invoiced. You can invoice sales orders partially, by lines of sales order. You do not need this list if you invoice from the delivery orders or if you invoice sales totally.</field>
515         </record>
516
517         <record id="action_order_line_tree3" model="ir.actions.act_window">
518             <field name="name">Uninvoiced and Delivered Lines</field>
519             <field name="type">ir.actions.act_window</field>
520             <field name="res_model">sale.order.line</field>
521             <field name="view_type">form</field>
522             <field name="view_mode">tree,form,graph</field>
523             <field name="domain">[('invoiced','&lt;&gt;', 1),('state','=','done')]</field>
524             <field name="filter" eval="True"/>
525         </record>
526
527         <act_window
528             context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
529             id="act_res_partner_2_sale_order"
530             name="Quotations and Sales"
531             groups="base.group_sale_salesman"
532             res_model="sale.order"
533             src_model="res.partner"/>
534
535         <act_window
536             context="{'search_default_product_id': active_id, 'default_product_id': active_id}"
537             id="action_order_line_product_tree"
538             name="Sales Order Lines"
539             res_model="sale.order.line"
540             src_model="product.product"
541             groups="base.group_sale_salesman"/>
542
543         <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>
544         <menuitem id="menu_invoicing_sales_order_lines" parent="base.menu_invoiced" action="action_order_line_tree2" sequence="10" groups="sale.group_invoice_so_lines"/>
545
546     </data>
547 </openerp>