1 <?xml version="1.0" encoding="utf-8"?>
7 This menu item's purpose is to overwrite another one defined in
8 the base module in order to set new groups.
10 <menuitem name="Sales"
11 id="base.menu_base_partner"
12 groups="base.group_sale_salesman,base.group_sale_manager"/>
14 <menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
16 <record id="view_sale_order_calendar" model="ir.ui.view">
17 <field name="name">sale.order.calendar</field>
18 <field name="model">sale.order</field>
19 <field name="arch" type="xml">
20 <calendar string="Sales Orders" color="state" date_start="date_order">
21 <field name="partner_id"/>
22 <field name="amount_total"/>
26 <record model="ir.ui.view" id="view_sale_order_graph">
27 <field name="name">sale.order.graph</field>
28 <field name="model">sale.order</field>
29 <field name="arch" type="xml">
30 <graph string="Sales Orders" type="bar">
31 <field name="partner_id" type="row"/>
32 <field name="amount_total" type="measure"/>
37 <record id="view_order_tree" model="ir.ui.view">
38 <field name="name">sale.order.tree</field>
39 <field name="model">sale.order</field>
40 <field name="priority">2</field>
41 <field name="arch" type="xml">
42 <tree string="Sales Orders" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
43 <field name="message_unread" invisible="1"/>
44 <field name="name" string="Order Number"/>
45 <field name="date_order"/>
46 <field name="partner_id"/>
47 <field name="user_id"/>
48 <field name="amount_total" sum="Total Tax Included"/>
54 <record id="view_quotation_tree" model="ir.ui.view">
55 <field name="name">sale.order.tree</field>
56 <field name="model">sale.order</field>
57 <field name="priority">4</field>
58 <field name="arch" type="xml">
59 <tree string="Quotation" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
60 <field name="message_unread" invisible="1"/>
61 <field name="name" string="Quotation Number"/>
62 <field name="date_order"/>
63 <field name="partner_id"/>
64 <field name="user_id"/>
65 <field name="amount_total" sum="Total Tax Included"/>
71 <record id="view_order_form" model="ir.ui.view">
72 <field name="name">sale.order.form</field>
73 <field name="model">sale.order</field>
74 <field name="arch" type="xml">
75 <form string="Sales Order">
77 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" groups="base.group_user"/>
78 <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" groups="base.group_user"/>
79 <button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
80 <button name="action_quotation_send" string="Send by Email" type="object" states="sent,progress,manual" groups="base.group_user"/>
81 <button name="print_quotation" string="Print" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
82 <button name="print_quotation" string="Print" type="object" states="sent,progress,manual" groups="base.group_user"/>
83 <button name="action_button_confirm" states="draft" string="Confirm Sale" type="object" groups="base.group_user"/>
84 <button name="action_button_confirm" states="sent" string="Confirm Sale" class="oe_highlight" type="object" groups="base.group_user"/>
85 <button name="action_view_invoice" string="View Invoice" type="object" class="oe_highlight"
86 attrs="{'invisible': [('invoice_exists', '=', False)]}" groups="base.group_user"/>
87 <button name="%(action_view_sale_advance_payment_inv)d" string="Create Invoice"
88 type="action" states="manual" class="oe_highlight" groups="base.group_user"/>
89 <button name="copy_quotation" states="cancel" string="New Copy of Quotation" type="object"/>
90 <button name="cancel" states="draft,sent" string="Cancel Quotation" groups="base.group_user"/>
91 <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" groups="base.group_user"/>
92 <button name="invoice_cancel" states="invoice_except" string="Cancel Order" groups="base.group_user"/>
93 <field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,done" statusbar_colors='{"invoice_except":"red","waiting_date":"blue"}'/>
97 <label string="Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
98 <label string="Sales Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
99 <field name="name" class="oe_inline" readonly="1"/>
103 <field name="partner_id" on_change="onchange_partner_id(partner_id, context)" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": True}'/>
104 <field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}"/>
105 <field name="partner_shipping_id" on_change="onchange_delivery_id(company_id, partner_id, partner_shipping_id, fiscal_position)" groups="sale.group_delivery_invoice_address" context="{'default_type':'delivery'}"/>
106 <field name="project_id" context="{'partner_id':partner_invoice_id, 'default_pricelist_id':pricelist_id, 'default_name':name, 'default_type': 'contract'}" groups="sale.group_analytic_accounting" domain="[('type','in',['view','normal','contract'])]"/>
109 <field name="date_order"/>
110 <field name="client_order_ref"/>
111 <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
112 <field name="currency_id" invisible="1"/>
116 <page string="Order Lines">
117 <field name="order_line">
118 <form string="Sales Order Lines">
119 <header groups="base.group_user">
120 <button name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Invoice" type="action" icon="terp-document-new"/>
121 <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
125 <field name="product_id"
126 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
127 groups="base.group_user"
128 on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
129 <label for="product_uom_qty"/>
132 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
133 name="product_uom_qty" class="oe_inline"
134 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
135 <field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
137 on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)"/>
139 <label for="product_uos_qty" groups="product.group_uos"/>
140 <div groups="product.group_uos">
141 <field name="product_uos_qty" class="oe_inline"/>
142 <field name="product_uos" options='{"no_open": True}' class="oe_inline"/>
144 <field name="price_unit"/>
145 <label for="discount" groups="sale.group_discount_per_so_line"/>
146 <div name="discount" groups="sale.group_discount_per_so_line">
147 <field name="discount" class="oe_inline"/> %%
151 <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
152 <field name="th_weight"/>
153 <!-- we should put a config wizard for these two fields -->
154 <field name="address_allotment_id"/>
159 <div groups="base.group_no_one">
160 <label for="invoice_lines"/>
161 <field name="invoice_lines"/>
164 <tree string="Sales Order Lines" editable="bottom">
165 <field name="sequence" widget="handle"/>
166 <field name="state" invisible="1"/>
167 <field name="th_weight" invisible="1"/>
168 <field name="product_id"
169 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
170 groups="base.group_user"
171 on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
173 <field name="product_uom_qty"
174 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
175 on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
176 <field name="product_uom"
177 on_change="product_uom_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, context)"
178 groups="product.group_uom" options='{"no_open": True}'/>
179 <field name="product_uos_qty" groups="product.group_uos" invisible="1"/>
180 <field name="product_uos" string="UoS" groups="product.group_uos" invisible="1"/>
181 <field name="price_unit"/>
182 <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
183 <field name="discount" groups="sale.group_discount_per_so_line"/>
184 <field name="price_subtotal"/>
187 <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
188 <field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
189 <field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
190 <div class="oe_subtotal_footer_separator oe_inline">
191 <label for="amount_total" />
192 <button name="button_dummy"
193 states="draft,sent" string="(update)" type="object" class="oe_edit_only oe_link"/>
195 <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
197 <div class="oe_clear"/>
198 <field name="note" class="oe_inline" placeholder="Terms and conditions..."/>
200 <page string="Other Information" groups="base.group_user">
202 <group name="sales_person" groups="base.group_user">
203 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice', 'base.group_sale_salesman_all_leads']}"/>
204 <field name="section_id" options="{'no_create': True}" groups="base.group_multi_salesteams"/>
205 <field groups="base.group_no_one" name="origin"/>
207 <group name="sale_pay">
208 <field name="payment_term" options="{'no_create': True}"/>
209 <field name="fiscal_position" options="{'no_create': True}"
210 on_change="onchange_fiscal_position(fiscal_position, order_line, context)"/>
211 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
214 <field name="invoiced"/>
215 <field name="invoice_exists" invisible="1"/>
221 <div class="oe_chatter">
222 <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
223 <field name="message_ids" widget="mail_thread"/>
229 <!-- inherited view to make the order lines list in the form non-editable
230 for the members of some usability groups -->
231 <record id="view_order_form_editable_list" model="ir.ui.view">
232 <field name="name">sale.order.form.editable.list</field>
233 <field name="model">sale.order</field>
234 <field name="inherit_id" ref="sale.view_order_form"/>
235 <field name="groups_id" eval="[(4, ref('product.group_uos')), (4, ref('product.group_stock_packaging')), (4, ref('sale.group_mrp_properties'))]"/>
236 <field name="arch" type="xml">
237 <xpath expr="//field[@name='order_line']/tree" position="attributes">
238 <attribute name="editable"/>
243 <record id="view_sales_order_filter" model="ir.ui.view">
244 <field name="name">sale.order.list.select</field>
245 <field name="model">sale.order</field>
246 <field name="arch" type="xml">
247 <search string="Search Sales Order">
248 <field name="name" string="Sales Order" filter_domain="['|',('name','ilike',self),('client_order_ref','ilike',self)]"/>
249 <field name="partner_id" operator="child_of"/>
250 <field name="user_id"/>
251 <field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
252 <field name="project_id"/>
253 <filter string="My" domain="[('user_id','=',uid)]" name="my_sale_orders_filter"/>
255 <filter string="Quotations" name="draft" domain="[('state','in',('draft','sent'))]" help="Sales Order that haven't yet been confirmed"/>
256 <filter string="Sales" name="sales" domain="[('state','in',('manual','progress'))]"/>
257 <filter string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
258 <filter string="Done" domain="[('state','=','done')]" help="Sales Order done"/>
260 <filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/>
261 <group expand="0" string="Group By">
262 <filter string="Salesperson" domain="[]" context="{'group_by':'user_id'}"/>
263 <filter string="Customer" domain="[]" context="{'group_by':'partner_id'}"/>
264 <filter string="Order Month" domain="[]" context="{'group_by':'date_order'}"/>
270 <record id="action_orders" model="ir.actions.act_window">
271 <field name="name">Sales Orders</field>
272 <field name="type">ir.actions.act_window</field>
273 <field name="res_model">sale.order</field>
274 <field name="view_type">form</field>
275 <field name="view_mode">tree,form,calendar,graph</field>
276 <field name="search_view_id" ref="view_sales_order_filter"/>
277 <field name="context">{
278 'search_default_my_sale_orders_filter': 1
281 <field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
282 <field name="help" type="html">
283 <p class="oe_view_nocontent_create">
284 Click to create a quotation that can be converted into a sales
287 OpenERP will help you efficiently handle the complete sales flow:
288 quotation, sales order, delivery, invoicing and payment.
293 <menuitem action="action_orders" id="menu_sale_order" parent="base.menu_sales" sequence="6" groups="base.group_sale_salesman,base.group_sale_manager"/>
295 <record id="action_orders_exception" model="ir.actions.act_window">
296 <field name="name">Sales in Exception</field>
297 <field name="type">ir.actions.act_window</field>
298 <field name="res_model">sale.order</field>
299 <field name="view_type">form</field>
300 <field name="view_mode">tree,form,calendar,graph</field>
301 <field name="domain">[('state','in',('shipping_except','invoice_except'))]</field>
302 <field name="filter" eval="True"/>
303 <field name="search_view_id" ref="view_sales_order_filter"/>
306 <record id="action_orders_in_progress" model="ir.actions.act_window">
307 <field name="name">Sales Order in Progress</field>
308 <field name="type">ir.actions.act_window</field>
309 <field name="res_model">sale.order</field>
310 <field name="view_type">form</field>
311 <field name="view_mode">tree,form,calendar,graph</field>
312 <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
313 <field name="search_view_id" ref="view_sales_order_filter"/>
317 <record id="action_quotations" model="ir.actions.act_window">
318 <field name="name">Quotations</field>
319 <field name="type">ir.actions.act_window</field>
320 <field name="res_model">sale.order</field>
321 <field name="view_type">form</field>
322 <field name="view_id" ref="view_quotation_tree"/>
323 <field name="view_mode">tree,form,calendar,graph</field>
324 <field name="context">{'search_default_my_sale_orders_filter': 1}</field>
325 <field name="domain">[('state','in',('draft','sent','cancel'))]</field>
326 <field name="search_view_id" ref="view_sales_order_filter"/>
327 <field name="help" type="html">
328 <p class="oe_view_nocontent_create">
329 Click to create a quotation, the first step of a new sale.
331 OpenERP will help you handle efficiently the complete sale flow:
332 from the quotation to the sales order, the
333 delivery, the invoicing and the payment collection.
335 The social feature helps you organize discussions on each sales
336 order, and allow your customers to keep track of the evolution
342 <menuitem id="menu_sale_quotations"
343 action="action_quotations" parent="base.menu_sales"
346 <record id="action_order_tree" model="ir.actions.act_window">
347 <field name="name">Old Quotations</field>
348 <field name="type">ir.actions.act_window</field>
349 <field name="res_model">sale.order</field>
350 <field name="view_type">form</field>
351 <field name="view_mode">tree,form,calendar,graph</field>
352 <field name="domain">[('state','=','draft'),('date_order','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
353 <field name="filter" eval="True"/>
354 <field name="search_view_id" ref="view_sales_order_filter"/>
358 <record id="view_order_line_tree" model="ir.ui.view">
359 <field name="name">sale.order.line.tree</field>
360 <field name="model">sale.order.line</field>
361 <field name="arch" type="xml">
362 <tree string="Sales Order Lines" create="false">
363 <field name="product_id" invisible="1"/>
364 <field name="order_id"/>
365 <field name="order_partner_id"/>
367 <field name="product_uom_qty" string="Qty"/>
368 <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
369 <field name="salesman_id"/>
370 <field name="price_subtotal" sum="Total"/>
371 <field name="state"/>
372 <field name="invoiced"/>
376 <record id="view_order_line_form2" model="ir.ui.view">
377 <field name="name">sale.order.line.form2</field>
378 <field name="model">sale.order.line</field>
379 <field name="arch" type="xml">
380 <form string="Sales Order Lines" create="false">
382 <button name="%(action_view_sale_order_line_make_invoice)d" string="Create Invoice" type="action" attrs="{'invisible': ['|',('invoiced', '=', 1), ('state', 'not in', ('confirmed', 'draft'))]}" class="oe_highlight" groups="base.group_user"/>
383 <button name="button_cancel" string="Cancel Line" type="object" states="confirmed,exception" groups="base.group_user"/>
384 <button name="button_done" string="Done" type="object" attrs="{'invisible': ['|',('invoiced', '=', 0), ('state', 'not in', ('confirmed', 'exception'))]}" class="oe_highlight" groups="base.group_user"/>
385 <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
388 <label for="order_id" class="oe_edit_only"/>
389 <h1><field name="order_id" domain="[('state','!=','done')]"/></h1>
390 <label for="order_partner_id" class="oe_edit_only"/>
391 <h2><field name="order_partner_id"/></h2>
394 <field name="product_id"/>
395 <label for="product_uom_qty"/>
397 <field name="product_uom_qty" readonly="1" class="oe_inline"/>
398 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
402 <field name="price_unit"/>
403 <field name="discount" groups="sale.group_discount_per_so_line"/>
404 <field name="price_subtotal"/>
405 <field name="invoiced"/>
406 <field name="company_id" groups="base.group_multi_company" readonly="1"/>
416 <record id="view_sales_order_line_filter" model="ir.ui.view">
417 <field name="name">sale.order.line.select</field>
418 <field name="model">sale.order.line</field>
419 <field name="arch" type="xml">
420 <search string="Search Sales Order">
421 <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('invoiced','<>', 1),('state','=','done')]" help="Sales Order Lines ready to be invoiced"/>
423 <filter string="My Sales Order Lines" icon="terp-personnal" domain="[('salesman_id','=',uid)]" help="Sales Order Lines related to a Sales Order of mine"/>
424 <field name="order_id"/>
425 <field name="order_partner_id" operator="child_of"/>
426 <field name="product_id"/>
427 <field name="salesman_id"/>
428 <group expand="0" string="Group By">
429 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
430 <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}"/>
431 <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'salesman_id'}"/>
432 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
438 <record id="view_sales_order_uninvoiced_line_filter" model="ir.ui.view">
439 <field name="name">sale.order.uninvoiced.line</field>
440 <field name="model">sale.order.line</field>
441 <field name="arch" type="xml">
442 <search string="Search Uninvoiced Lines">
443 <filter icon="terp-gtk-go-back-rtl" string="To Do" domain="[('state','=','confirmed')]" name="sale order" help="Confirmed sales order lines, not yet delivered"/>
444 <filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]" name="sale_order_done" help="Sales order lines done"/>
445 <filter icon="terp-accessories-archiver" string="Shipped" domain="[('state','=','done')]" name="unshipped" help="Sales Order Lines that are in 'done' state"/>
447 <filter icon="terp-dolar_ok!" string="Uninvoiced" name="uninvoiced" domain="[('invoiced','<>', 1),('state','<>','draft'),('state','<>','cancel')]" help="Sales Order Lines that are confirmed, done or in exception state and haven't yet been invoiced"/>
449 <filter string="My Sales Order Lines" icon="terp-personal" domain="[('salesman_id','=',uid)]" help="My Sales Order Lines"/>
450 <field name="order_id"/>
451 <field name="order_partner_id" operator="child_of"/>
452 <field name="product_id"/>
453 <field name="salesman_id"/>
454 <group expand="0" string="Group By">
455 <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}" help="Order reference"/>
456 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
457 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
463 <record id="action_order_line_tree2" model="ir.actions.act_window">
464 <field name="name">Order Lines to Invoice</field>
465 <field name="type">ir.actions.act_window</field>
466 <field name="res_model">sale.order.line</field>
467 <field name="view_type">form</field>
468 <field name="view_mode">tree,form</field>
469 <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/>
470 <field name="context">{"search_default_uninvoiced":1}</field>
471 <field name="filter" eval="True"/>
472 <field name="help" type="html">
474 Here is a list of each sales order line to be invoiced. You can
475 invoice sales orders partially, by lines of sales order. You do
476 not need this list if you invoice from the delivery orders or
477 if you invoice sales totally.
482 <record id="action_order_line_tree3" model="ir.actions.act_window">
483 <field name="name">Uninvoiced and Delivered Lines</field>
484 <field name="type">ir.actions.act_window</field>
485 <field name="res_model">sale.order.line</field>
486 <field name="view_type">form</field>
487 <field name="view_mode">tree,form</field>
488 <field name="domain">[('invoiced','<>', 1),('state','=','done')]</field>
489 <field name="filter" eval="True"/>
491 <record id="action_order_line_product_tree" model="ir.actions.act_window">
492 <field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
493 <field name="name">Sales Order Lines</field>
494 <field name="res_model">sale.order.line</field>
495 <field name="view_id" ref="view_order_line_tree"/>
497 <record model="ir.ui.view" id="product_form_view_sale_order_button">
498 <field name="name">product.product.sale.order</field>
499 <field name="model">product.product</field>
500 <field name="inherit_id" ref="product.product_normal_form_view"/>
501 <field name="arch" type="xml">
502 <xpath expr="//div[@name='buttons']" position="inside">
503 <button class="oe_inline oe_stat_button" name="%(action_order_line_product_tree)d"
504 type="action" groups="base.group_sale_salesman" icon="fa-strikethrough">
505 <field string="Sales" name="sales_count" widget="statinfo" />
511 <record model="ir.ui.view" id="product_template_form_view_sale_order_button">
512 <field name="name">product.template.sale.order.button</field>
513 <field name="model">product.template</field>
514 <field name="inherit_id" ref="product.product_template_form_view_only"/>
515 <field name="arch" type="xml">
516 <xpath expr="//div[@name='buttons']" position="inside">
517 <button class="oe_inline oe_stat_button" name="action_view_sales"
518 type="object" groups="base.group_sale_salesman" icon="fa-strikethrough">
519 <field string="Sales" name="sales_count" widget="statinfo" />
526 <record model="ir.ui.view" id="view_company_inherit_form2">
527 <field name="name">res.company.form.inherit</field>
528 <field name="inherit_id" ref="base.view_company_form"/>
529 <field name="model">res.company</field>
530 <field name="arch" type="xml">
531 <xpath expr="//group[@name='account_grp']" position="after">
532 <group name="sale_grp" string="Sales">
533 <field name="sale_note" nolabel="1" placeholder="Default terms & conditions..."/>
539 <!-- Update account invoice list view!-->
540 <record model="ir.ui.view" id="account_invoice_tree">
541 <field name="name">Account Invoice</field>
542 <field name="model">account.invoice</field>
543 <field name="inherit_id" ref="account.invoice_tree"/>
544 <field name="arch" type="xml">
546 <xpath expr="//field[@name='user_id']" position="after">
547 <field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
553 <!-- Update account invoice search view!-->
554 <record id="account_invoice_groupby_inherit" model="ir.ui.view">
555 <field name="name">account.invoice.groupby</field>
556 <field name="model">account.invoice</field>
557 <field name="inherit_id" ref="account.view_account_invoice_filter"/>
558 <field name="arch" type="xml">
559 <xpath expr="//field[@name='user_id']" position="after">
560 <field name="section_id" groups="base.group_multi_salesteams"/>
562 <xpath expr="//group/filter[@string='Due Month']" position="after">
563 <filter string="Sales Team" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
568 <!-- Update account invoice !-->
569 <record model="ir.ui.view" id="account_invoice_form">
570 <field name="name">Account Invoice</field>
571 <field name="model">account.invoice</field>
572 <field name="inherit_id" ref="account.invoice_form"/>
573 <field name="arch" type="xml">
575 <xpath expr="//field[@name='user_id']" position="after">
576 <field name="section_id" groups="base.group_multi_salesteams"/>
582 <!-- search by Salesteams -->
583 <record id="action_orders_salesteams" model="ir.actions.act_window">
584 <field name="name">Sales Orders</field>
585 <field name="type">ir.actions.act_window</field>
586 <field name="res_model">sale.order</field>
587 <field name="view_type">form</field>
588 <field name="view_mode">tree,form,calendar,graph</field>
589 <field name="search_view_id" ref="sale.view_sales_order_filter"/>
590 <field name="domain">[('state','not in',('draft','sent','cancel'))]</field>
591 <field name="context">{
592 'search_default_section_id': [active_id],
593 'default_section_id': active_id,
596 <field name="help" type="html">
597 <p class="oe_view_nocontent_create">
598 Click to create a quotation that can be converted into a sales
601 OpenERP will help you efficiently handle the complete sales flow:
602 quotation, sales order, delivery, invoicing and payment.
607 <record id="action_quotations_salesteams" model="ir.actions.act_window">
608 <field name="name">Quotations</field>
609 <field name="type">ir.actions.act_window</field>
610 <field name="res_model">sale.order</field>
611 <field name="view_type">form</field>
612 <field name="view_id" ref="sale.view_quotation_tree"/>
613 <field name="view_mode">tree,form,calendar,graph</field>
614 <field name="context">{
615 'search_default_section_id': [active_id],
616 'default_section_id': active_id,
620 <field name="domain">[('state','in',('draft','sent','cancel'))]</field>
621 <field name="search_view_id" ref="sale.view_sales_order_filter"/>
622 <field name="help" type="html">
623 <p class="oe_view_nocontent_create">
624 Click to create a quotation, the first step of a new sale.
626 OpenERP will help you handle efficiently the complete sale flow:
627 from the quotation to the sales order, the
628 delivery, the invoicing and the payment collection.
630 The social feature helps you organize discussions on each sales
631 order, and allow your customers to keep track of the evolution
637 <record id="action_invoice_salesteams" model="ir.actions.act_window">
638 <field name="name">Invoices</field>
639 <field name="res_model">account.invoice</field>
640 <field name="view_type">form</field>
641 <field name="view_mode">tree,form,calendar,graph</field>
642 <field name="view_id" ref="account.invoice_tree"/>
643 <field name="domain">[
644 ('state', 'not in', ['draft', 'cancel']),
645 ('type', '=', 'out_invoice')]</field>
646 <field name="context">{
647 'search_default_section_id': [active_id],
648 'default_section_id': active_id,
649 'default_type':'out_invoice',
650 'type':'out_invoice',
651 'journal_type': 'sale',
654 <field name="search_view_id" ref="account.view_account_invoice_filter"/>
657 <record id="action_invoice_salesteams_view_tree" model="ir.actions.act_window.view">
658 <field name="sequence">1</field>
659 <field name="view_mode">tree</field>
660 <field name="act_window_id" ref="sale.action_invoice_salesteams"/>
663 <record id="action_invoice_salesteams_view_form" model="ir.actions.act_window.view">
664 <field name="sequence">2</field>
665 <field name="view_mode">form</field>
666 <field name="view_id" ref="account.invoice_form"/>
667 <field name="act_window_id" ref="sale.action_invoice_salesteams"/>
670 <record id="action_order_report_quotation_salesteam" model="ir.actions.act_window">
671 <field name="name">Quotations Analysis</field>
672 <field name="res_model">sale.report</field>
673 <field name="view_mode">graph</field>
674 <field name="domain">[('state','=','draft'),('section_id', '=', active_id)]</field>
675 <field name="context">{'search_default_order_month':1}</field>
676 <field name="help">This report performs analysis on your quotations. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>
679 <record id="action_order_report_so_salesteam" model="ir.actions.act_window">
680 <field name="name">Sales Analysis</field>
681 <field name="res_model">sale.report</field>
682 <field name="view_mode">graph</field>
683 <field name="domain">[('state','not in',('draft','sent','cancel')),('section_id', '=', active_id)]</field>
684 <field name="context">{'search_default_order_month':1}</field>
685 <field name="help">This report performs analysis on your sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>
688 <record id="action_account_invoice_report_salesteam" model="ir.actions.act_window">
689 <field name="name">Invoices Analysis</field>
690 <field name="res_model">account.invoice.report</field>
691 <field name="view_mode">graph</field>
692 <field name="domain">[('section_id', '=', active_id),('state', 'not in', ['draft', 'cancel'])]</field>
693 <field name="context">{'search_default_month':1}</field>
694 <field name="help">From this report, you can have an overview of the amount invoiced to your customer. The tool search can also be used to personalise your Invoices reports and so, match this analysis to your needs.</field>