Launchpad automatic translations update.
[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_form_readonly_hidden"/>
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_untaxed" sum="Total Tax Excluded"/>
94                     <field name="amount_total" sum="Total Tax Included"/>
95                     <field name="state"/>
96                 </tree>
97             </field>
98         </record>
99
100         <record id="view_order_form" model="ir.ui.view">
101             <field name="name">sale.order.form</field>
102             <field name="model">sale.order</field>
103             <field name="type">form</field>
104             <field name="arch" type="xml">
105                 <form string="Sales Order" version="7.0">
106                     <header>
107                         <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
108                         <button name="invoice_corrected" states="invoice_except" string="Ignore Exception"/>
109                         <button name="ship_recreate" states="shipping_except" string="Recreate Delivery Order"/>
110                         <button name="ship_corrected" states="shipping_except" string="Ignore Exception"/>
111                         <button name="action_quotation_send" string="Send by Mail" type="object" states="draft" class="oe_form_button_hi"/>
112                         <button name="action_quotation_send" string="Send by Mail" type="object" states="sent"/>
113                         <button name="manual_invoice" states="manual" string="Create Final Invoice" type="object"/>
114                         <button name="print_quotation" string="Send by Post" type="object" states="draft" class="oe_form_button_hi"/>
115                         <button name="print_quotation" string="Send by Post" type="object" states="sent"/>
116                         <button name="action_button_confirm" states="draft" string="Confirm" type="object"/>
117                         <button name="action_button_confirm" states="sent" string="Confirm" class="oe_form_button_hi" type="object"/>
118                         <button name="action_view_invoice" string="Open Invoice" type="object" 
119                           attrs="{'invisible': ['|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking')]}"/>
120                         <button name="action_view_delivery" string="Open Delivery Order" type="object" 
121                           attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/>
122                         <button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" states="manual"/>
123                         <button name="cancel" states="draft,sent" string="Cancel"/>
124                         <button name="action_cancel" states="manual,progress" string="Cancel" type="object"/>
125                         <button name="ship_cancel" states="shipping_except" string="Cancel"/>
126                         <button name="invoice_cancel" states="invoice_except" string="Cancel"/>
127                         <field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,invoiced,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
128                 </header>
129                 <sheet>
130                     <h1>
131                         <label string="Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
132                         <label string="Sale Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
133                         <field name="name" class="oe_form_inline" readonly="1"/>
134                     </h1>
135                     <group>
136                         <group>
137                             <field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" />
138                             <field domain="[('parent_id','=',partner_id)]" name="partner_invoice_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
139                             <field domain="[('parent_id','=',partner_id)]" name="partner_shipping_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
140                             <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
141                             <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)]"/>
142                         </group><group>
143                             <field name="date_order"/>
144                             <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection" groups="stock.group_locations"/>
145                             <field name="client_order_ref"/>
146                         </group>
147                     </group>
148                     <notebook>
149                         <page string="Order Lines">
150                             <field name="order_line">
151                                 <form string="Sales Order Lines" version="7.0">
152                                     <field name="product_id"
153                                         context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
154                                         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)"/>
155                                     <field name="name" placeholder="Porduct/Service characteristics"/>
156                                     <group>
157                                         <group>
158                                             <label for="product_uom_qty"/>
159                                             <div>
160                                                 <field
161                                                     context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
162                                                     name="product_uom_qty" class="oe_form_inline"
163                                                     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)"/>
164                                                 <field name="product_uom" groups="product.group_uom" class="oe_form_inline"
165                                                     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)"/>
166
167                                             </div>
168                                             <label for="product_uos_qty"/>
169                                             <div>
170                                                 <field groups="product.group_uos" name="product_uos_qty" class="oe_form_inline"/>
171                                                 <field groups="product.group_uos" name="product_uos" class="oe_form_inline"/>
172                                             </div>
173                                             <field name="price_unit"/>
174                                             <field name="discount" groups="sale.group_discount_per_so_line"/>
175                                         </group><group>
176                                             <field name="product_packaging"
177                                                 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)"
178                                                 domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"
179                                                 colspan="3"/>
180                                             <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
181                                             <field name="invoiced"/>
182                                             <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
183                                             <button name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoices" type="action" icon="terp-document-new"/>
184                                         </group>
185                                         <group col="4">
186                                             <field name="type"/>
187                                             <field name="delay"/>
188                                             <field name="th_weight"/>
189                                             <field name="address_allotment_id"/>
190                                         </group>
191                                         <separator string="Properties" colspan="2"/>
192                                         <field name="property_ids"/>
193                                         <separator string="Notes" groups="base.group_sale_notes_subtotal"/>
194                                         <field name="notes" groups="base.group_sale_notes_subtotal"/>
195                                         <div groups="base.group_no_one">
196                                             <separator colspan="4" string="Invoice Lines"/>
197                                             <field colspan="4" name="invoice_lines" nolabel="1"/>
198                                             <separator colspan="4" string="Stock Moves"/>
199                                             <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
200                                         </div>
201                                     </group>
202                                 </form>
203                                 <tree string="Sales Order Lines">
204                                     <field name="name"/>
205                                     <field name="product_uom_qty" string="Quantity"/>
206                                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
207                                     <field groups="product.group_uos" name="product_uos_qty" string="Quantity (UoS)"/>
208                                     <field groups="product.group_uos" name="product_uos" string="UoS"/>
209                                     <field name="discount" groups="sale.group_discount_per_so_line"/>
210                                     <field name="price_unit"/>
211                                     <field name="price_subtotal" groups="base.group_sale_notes_subtotal"/>
212                                 </tree>
213                             </field>
214                             <group class="oe_form_subtotal_footer" colspan="2" name="sale_total">
215                                 <field name="amount_untaxed"/>
216                                 <field name="amount_tax"/>
217                                 <field name="amount_total" class="oe_form_subtotal_footer_separator"/>
218                             </group>
219                             <separator string="Notes"/>
220                             <field name="note" placeholder="Our quotation is valid for 30 days..."/>
221                         </page>
222                         <page string="Other Information">
223                             <group>
224                                 <group name="logistics">
225                                     <field name="incoterm" widget="selection"/>
226                                     <field name="picking_policy" required="True"/>
227                                     <field name="order_policy" on_change="shipping_policy_change(order_policy)"/>
228                                     <field name="invoice_quantity" invisible="True"/>
229                                 </group>
230                                 <group>
231                                     <field name="user_id"/>
232                                     <field groups="base.group_no_one" name="origin"/>
233                                     <field name="invoiced"/>
234                                     <field name="shipped"/>
235                                 </group>
236                                 <group name="sale_pay">
237                                     <field name="payment_term" widget="selection"/>
238                                     <field name="fiscal_position" widget="selection"/>
239                                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
240                                 </group>
241                             </group>
242                         </page>
243                         <page string="History">
244                             <separator string="Invoices"/>
245                             <field name="invoice_ids" context="{'form_view_ref':'account.invoice_form'}"/>
246                             <separator string="Delivery Orders"/>
247                             <field name="picking_ids" 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                 <footer>
265                     <field name="message_ids" widget="ThreadView"/>
266                 </footer>
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','in',('draft','sent'))]" 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="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
292                         <separator orientation="vertical"/>
293                         <filter string="Status" 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             <field name="help">
344                 Click here to create a new quotation.
345                 &lt;p&gt;
346                 The "Quotation" is the first step of the Sales flow.  Manage your sales from quotation to invoice.
347                 &lt;p&gt;
348                 You will be able to sell products (manage deliveries) as well as services (create projects).
349             </field>
350         </record>
351
352         <menuitem id="menu_sale_quotations"
353         action="action_order_tree5" parent="base.menu_sales"
354         sequence="3" />
355
356         <record id="action_order_tree" model="ir.actions.act_window">
357             <field name="name">Old Quotations</field>
358             <field name="type">ir.actions.act_window</field>
359             <field name="res_model">sale.order</field>
360             <field name="view_type">form</field>
361             <field name="view_mode">tree,form,calendar,graph</field>
362             <field name="domain">[('state','=','draft'),('date_order','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
363             <field name="filter" eval="True"/>
364             <field name="search_view_id" ref="view_sales_order_filter"/>
365         </record>
366
367         <record id="view_order_line_graph" model="ir.ui.view">
368             <field name="name">sale.order.line.graph</field>
369             <field name="model">sale.order.line</field>
370             <field name="type">graph</field>
371             <field name="arch" type="xml">
372                 <graph string="Sales Order Lines">
373                     <field name="product_id"/>
374                     <field name="price_subtotal" operator="+"/>
375                 </graph>
376             </field>
377         </record>
378
379         <record id="view_order_line_tree" model="ir.ui.view">
380             <field name="name">sale.order.line.tree</field>
381             <field name="model">sale.order.line</field>
382             <field name="type">tree</field>
383             <field name="arch" type="xml">
384                 <tree string="Sales Order Lines">
385                     <field name="order_id"/>
386                     <field name="order_partner_id"/>
387                     <field name="product_id"/>
388                     <field name="product_uom_qty" string="Qty"/>
389                     <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
390                     <field name="salesman_id"/>
391                     <field name="price_subtotal" sum="Total" groups="base.group_sale_notes_subtotal"/>
392                     <field name="state"/>
393                     <field name="invoiced"/>
394                 </tree>
395             </field>
396         </record>
397         <record id="view_order_line_form2" model="ir.ui.view">
398             <field name="name">sale.order.line.form2</field>
399             <field name="model">sale.order.line</field>
400             <field name="type">form</field>
401             <field name="arch" type="xml">
402                 <form string="Sales Order Lines" version="7.0">
403                     <header>
404                         <button name="button_cancel" string="Cancel" type="object" icon="gtk-cancel" states="confirmed,exception"/>
405                         <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)]}"/>
406                         <button name="button_done" string="Done" type="object" states="confirmed,exception" icon="gtk-go-forward"/>
407                         <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
408                     </header>
409                     <label for="order_id" class="oe_form_readonly_hidden"/>
410                     <h1><field name="order_id"/></h1>
411                     <label for="order_partner_id" class="oe_form_readonly_hidden"/>
412                     <h2><field name="order_partner_id"/></h2>
413                     <group>
414                         <group>
415                             <field name="product_id" readonly="1"/>
416                             <field name="name" groups="base.group_no_one"/>
417                             <label name="product_uom_qty"/>
418                             <div>
419                                 <field name="product_uom_qty" readonly="1" class="oe_form_inline"/>
420                                 <field name="product_uom" groups="product.group_uom" class="oe_form_inline"/>
421                             </div>
422                         </group><group>
423                             <field name="price_unit"/>
424                             <field name="discount" groups="sale.group_discount_per_so_line"/>
425                             <field name="price_subtotal" groups="base.group_sale_notes_subtotal"/>
426                             <field name="invoiced"/>
427                             <field name="company_id" groups="base.group_multi_company" readonly="1"/>
428                         </group>
429                     </group>
430                     <separator string="Notes" groups="base.group_sale_notes_subtotal"/>
431                     <field name="notes" groups="base.group_sale_notes_subtotal"/>
432                 </form>
433             </field>
434         </record>
435
436         <record id="view_sales_order_line_filter" model="ir.ui.view">
437             <field name="name">sale.order.line.select</field>
438             <field name="model">sale.order.line</field>
439             <field name="type">search</field>
440             <field name="arch" type="xml">
441                 <search string="Search Sales Order">
442                     <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('invoiced','&lt;&gt;', 1),('state','=','done')]"  help="Sale Order Lines ready to be invoiced"/>
443                     <separator orientation="vertical"/>
444                     <field name="order_id"/>
445                     <field name="order_partner_id"/>
446                     <field name="product_id"/>
447                     <field name="salesman_id">
448                         <filter icon="terp-personnal" domain="[('salesman_id','=',uid)]" help="Sales Order Lines related to a Sales Order of mine"/>
449                     </field>
450                     <newline/>
451                     <group expand="0" string="Group By...">
452                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
453                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}"/>
454                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'salesman_id'}"/>
455                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
456                     </group>
457                 </search>
458             </field>
459         </record>
460
461         <record id="view_sales_order_uninvoiced_line_filter" model="ir.ui.view">
462             <field name="name">sale.order.uninvoiced.line</field>
463             <field name="model">sale.order.line</field>
464             <field name="type">search</field>
465             <field name="arch" type="xml">
466                 <search string="Search Uninvoiced Lines">
467                     <filter icon="terp-gtk-go-back-rtl" string="To Do" domain="[('state','=','confirmed')]" name="sale order" help="Confirmed sale order lines, not yet delivered"/>
468                     <filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]" name="sale_order_done" help="Sale order lines done"/>
469                     <separator orientation="vertical"/>
470                     <filter icon="terp-accessories-archiver" string="Shipped" domain="[('state','=','done')]" name="unshipped" help="Sale Order Lines that are in 'done' state"/>
471                     <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"/>
472                     <separator orientation="vertical"/>
473                     <field name="order_id"/>
474                     <field name="order_partner_id"/>
475                     <field name="product_id"/>
476                     <field name="salesman_id">
477                         <filter icon="terp-personal" domain="[('salesman_id','=',uid)]" help="My Sales Order Lines"/>
478                     </field>
479                     <newline/>
480                     <group expand="0" string="Group By...">
481                         <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}" help="Order reference"/>
482                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
483                         <separator orientation="vertical"/>
484                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
485                     </group>
486                 </search>
487             </field>
488         </record>
489
490         <record id="action_order_line_tree2" model="ir.actions.act_window">
491             <field name="name">Order Lines to Invoice</field>
492             <field name="type">ir.actions.act_window</field>
493             <field name="res_model">sale.order.line</field>
494             <field name="view_type">form</field>
495             <field name="view_mode">tree,form,graph</field>
496             <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/>
497             <field name="context">{"search_default_uninvoiced":1}</field>
498             <field name="filter" eval="True"/>
499             <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>
500         </record>
501
502         <record id="action_order_line_tree3" model="ir.actions.act_window">
503             <field name="name">Uninvoiced and Delivered Lines</field>
504             <field name="type">ir.actions.act_window</field>
505             <field name="res_model">sale.order.line</field>
506             <field name="view_type">form</field>
507             <field name="view_mode">tree,form,graph</field>
508             <field name="domain">[('invoiced','&lt;&gt;', 1),('state','=','done')]</field>
509             <field name="filter" eval="True"/>
510         </record>
511
512         <act_window
513             context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
514             id="act_res_partner_2_sale_order"
515             name="Quotations and Sales"
516             groups="base.group_sale_salesman"
517             res_model="sale.order"
518             src_model="res.partner"/>
519
520         <act_window
521             context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
522             id="action_order_line_product_tree"
523             name="Sales Order Lines"
524             res_model="sale.order.line"
525             src_model="product.product"
526             groups="base.group_sale_salesman"/>
527
528         <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>
529         <menuitem id="menu_invoicing_sales_order_lines" parent="base.menu_invoiced" action="action_order_line_tree2" sequence="10" groups="sale.group_invoice_so_lines"/>
530
531     </data>
532 </openerp>