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