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"/>
15 id= "base.menu_sales_config"
16 parent= "base.menu_base_config"
19 groups= "base.group_sale_manager,base.group_sale_salesman,account.group_account_manager,account.group_account_user"/>
21 <menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
23 <record id="view_sale_order_calendar" model="ir.ui.view">
24 <field name="name">sale.order.calendar</field>
25 <field name="model">sale.order</field>
26 <field name="arch" type="xml">
27 <calendar string="Sales Orders" color="state" date_start="date_order">
28 <field name="partner_id"/>
29 <field name="amount_total"/>
33 <record model="ir.ui.view" id="view_sale_order_graph">
34 <field name="name">sale.order.graph</field>
35 <field name="model">sale.order</field>
36 <field name="arch" type="xml">
37 <graph string="Sales Orders" type="bar">
38 <field name="partner_id" type="row"/>
39 <field name="amount_total" type="measure"/>
44 <record id="view_order_tree" model="ir.ui.view">
45 <field name="name">sale.order.tree</field>
46 <field name="model">sale.order</field>
47 <field name="priority">2</field>
48 <field name="arch" type="xml">
49 <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')">
50 <field name="message_unread" invisible="1"/>
51 <field name="name" string="Order Number"/>
52 <field name="date_order"/>
53 <field name="partner_id"/>
54 <field name="user_id"/>
55 <field name="amount_total" sum="Total Tax Included"/>
61 <record id="view_quotation_tree" model="ir.ui.view">
62 <field name="name">sale.order.tree</field>
63 <field name="model">sale.order</field>
64 <field name="priority">4</field>
65 <field name="arch" type="xml">
66 <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')">
67 <field name="message_unread" invisible="1"/>
68 <field name="name" string="Quotation Number"/>
69 <field name="date_order"/>
70 <field name="partner_id"/>
71 <field name="user_id"/>
72 <field name="amount_total" sum="Total Tax Included"/>
78 <record id="view_order_form" model="ir.ui.view">
79 <field name="name">sale.order.form</field>
80 <field name="model">sale.order</field>
81 <field name="arch" type="xml">
82 <form string="Sales Order">
84 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" groups="base.group_user"/>
85 <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" groups="base.group_user"/>
86 <button name="action_button_confirm" states="sent" string="Confirm Sale" class="oe_highlight" type="object" groups="base.group_user"/>
87 <button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
88 <button name="action_quotation_send" string="Send by Email" type="object" states="sent,progress,manual" groups="base.group_user"/>
89 <button name="print_quotation" string="Print" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
90 <button name="print_quotation" string="Print" type="object" states="sent,progress,manual" groups="base.group_user"/>
91 <button name="action_button_confirm" states="draft" string="Confirm Sale" type="object" groups="base.group_user"/>
92 <button name="action_view_invoice" string="View Invoice" type="object" class="oe_highlight"
93 attrs="{'invisible': [('invoice_exists', '=', False)]}" groups="base.group_user"/>
94 <button name="%(action_view_sale_advance_payment_inv)d" string="Create Invoice"
95 type="action" states="manual" class="oe_highlight" groups="base.group_user"/>
96 <button name="copy_quotation" states="cancel" string="New Copy of Quotation" type="object"/>
97 <button name="cancel" states="draft,sent" string="Cancel" groups="base.group_user"/>
98 <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" groups="base.group_user"/>
99 <button name="invoice_cancel" states="invoice_except" string="Cancel Order" groups="base.group_user"/>
100 <field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,done" statusbar_colors='{"invoice_except":"red","waiting_date":"blue"}'/>
104 <label string="Quotation " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
105 <label string="Sales Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
106 <field name="name" class="oe_inline" readonly="1"/>
110 <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}'/>
111 <field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}"/>
112 <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'}"/>
113 <field name="project_id" context="{'partner_id':partner_invoice_id, 'manager_id': user_id, 'default_pricelist_id':pricelist_id, 'default_name':name, 'default_type': 'contract'}" groups="sale.group_analytic_accounting" domain="[('type','in',['view','normal','contract'])]"/>
116 <field name="date_order"/>
117 <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
118 <field name="currency_id" invisible="1"/>
119 <field name="validity_date"/>
120 <field name="payment_term" options="{'no_create': True}"/>
124 <page string="Order Lines">
125 <field name="order_line">
126 <form string="Sales Order Lines">
127 <header groups="base.group_user">
128 <button name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Invoice" type="action" icon="terp-document-new"/>
129 <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
133 <field name="product_id"
134 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
135 groups="base.group_user"
136 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)"/>
137 <label for="product_uom_qty"/>
140 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
141 name="product_uom_qty" class="oe_inline"
142 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)"/>
143 <field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
145 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)"/>
147 <label for="product_uos_qty" groups="product.group_uos"/>
148 <div groups="product.group_uos">
149 <field name="product_uos_qty" class="oe_inline"/>
150 <field name="product_uos" options='{"no_open": True}' class="oe_inline"/>
152 <field name="price_unit"/>
153 <label for="discount" groups="sale.group_discount_per_so_line"/>
154 <div name="discount" groups="sale.group_discount_per_so_line">
155 <field name="discount" class="oe_inline"/> %%
159 <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
160 <field name="th_weight"/>
161 <!-- we should put a config wizard for these two fields -->
162 <field name="address_allotment_id"/>
167 <div groups="base.group_no_one">
168 <label for="invoice_lines"/>
169 <field name="invoice_lines"/>
172 <tree string="Sales Order Lines" editable="bottom">
173 <field name="sequence" widget="handle"/>
174 <field name="state" invisible="1"/>
175 <field name="th_weight" invisible="1"/>
176 <field name="product_id"
177 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
178 groups="base.group_user"
179 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)"/>
181 <field name="product_uom_qty"
182 context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
183 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)"/>
184 <field name="product_uom"
185 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)"
186 groups="product.group_uom" options='{"no_open": True}'/>
187 <field name="product_uos_qty" groups="product.group_uos" invisible="1"/>
188 <field name="product_uos" string="UoS" groups="product.group_uos" invisible="1"/>
189 <field name="price_unit"/>
190 <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
191 <field name="discount" groups="sale.group_discount_per_so_line"/>
192 <field name="price_subtotal"/>
195 <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
196 <field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
197 <field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
198 <div class="oe_subtotal_footer_separator oe_inline">
199 <label for="amount_total" />
200 <button name="button_dummy"
201 states="draft,sent" string="(update)" type="object" class="oe_edit_only oe_link"/>
203 <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
205 <div class="oe_clear"/>
206 <field name="note" class="oe_inline" placeholder="Terms and conditions..."/>
208 <page string="Other Information" groups="base.group_user">
210 <group string="Sales Information" name="sales_person" groups="base.group_user">
211 <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']}"/>
212 <field name="team_id" options="{'no_create': True}" groups="base.group_multi_salesteams"/>
213 <field name="client_order_ref"/>
214 <field name="invoice_exists" invisible="1"/>
215 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
217 <group name="sale_pay" string="Invoicing">
218 <field name="fiscal_position" options="{'no_create': True}"
219 on_change="onchange_fiscal_position(fiscal_position, order_line, context)"/>
221 <group string="Reporting" name="technical" groups="base.group_no_one">
222 <field groups="base.group_no_one" name="origin"/>
223 <field groups="base.group_no_one" name="invoiced"/>
229 <div class="oe_chatter">
230 <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
231 <field name="message_ids" widget="mail_thread"/>
237 <!-- inherited view to make the order lines list in the form non-editable
238 for the members of some usability groups -->
239 <record id="view_order_form_editable_list" model="ir.ui.view">
240 <field name="name">sale.order.form.editable.list</field>
241 <field name="model">sale.order</field>
242 <field name="inherit_id" ref="sale.view_order_form"/>
243 <field name="groups_id" eval="[(4, ref('product.group_uos')), (4, ref('product.group_stock_packaging')), (4, ref('sale.group_mrp_properties'))]"/>
244 <field name="arch" type="xml">
245 <xpath expr="//field[@name='order_line']/tree" position="attributes">
246 <attribute name="editable"/>
251 <record id="view_sales_order_filter" model="ir.ui.view">
252 <field name="name">sale.order.list.select</field>
253 <field name="model">sale.order</field>
254 <field name="arch" type="xml">
255 <search string="Search Sales Order">
256 <field name="name" string="Sales Order" filter_domain="['|',('name','ilike',self),('client_order_ref','ilike',self)]"/>
257 <field name="partner_id" operator="child_of"/>
258 <field name="user_id"/>
259 <field name="team_id" string="Sales Team" groups="base.group_multi_salesteams"/>
260 <field name="project_id"/>
261 <field name="product_id"/>
262 <filter string="My" domain="[('user_id','=',uid)]" name="my_sale_orders_filter"/>
264 <filter string="Quotations" name="draft" domain="[('state','in',('draft','sent'))]" help="Sales Order that haven't yet been confirmed"/>
265 <filter string="Sales" name="sales" domain="[('state','in',('manual','progress'))]"/>
266 <filter string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
267 <filter string="Done" domain="[('state','=','done')]" help="Sales Order done"/>
269 <filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/>
270 <group expand="0" string="Group By">
271 <filter string="Salesperson" domain="[]" context="{'group_by':'user_id'}"/>
272 <filter string="Customer" domain="[]" context="{'group_by':'partner_id'}"/>
273 <filter string="Order Month" domain="[]" context="{'group_by':'date_order'}"/>
279 <record id="action_orders" model="ir.actions.act_window">
280 <field name="name">Sales Orders</field>
281 <field name="type">ir.actions.act_window</field>
282 <field name="res_model">sale.order</field>
283 <field name="view_type">form</field>
284 <field name="view_mode">tree,form,calendar,graph</field>
285 <field name="search_view_id" ref="view_sales_order_filter"/>
286 <field name="context">{}</field>
287 <field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
288 <field name="help" type="html">
289 <p class="oe_view_nocontent_create">
290 Click to create a quotation that can be converted into a sales
293 Odoo will help you efficiently handle the complete sales flow:
294 quotation, sales order, delivery, invoicing and payment.
299 <menuitem action="action_orders" id="menu_sale_order" parent="base.menu_sales" sequence="6" groups="base.group_sale_salesman,base.group_sale_manager"/>
301 <record id="action_orders_exception" model="ir.actions.act_window">
302 <field name="name">Sales in Exception</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="domain">[('state','in',('shipping_except','invoice_except'))]</field>
308 <field name="filter" eval="True"/>
309 <field name="search_view_id" ref="view_sales_order_filter"/>
312 <record id="action_orders_in_progress" model="ir.actions.act_window">
313 <field name="name">Sales Order in Progress</field>
314 <field name="type">ir.actions.act_window</field>
315 <field name="res_model">sale.order</field>
316 <field name="view_type">form</field>
317 <field name="view_mode">tree,form,calendar,graph</field>
318 <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
319 <field name="search_view_id" ref="view_sales_order_filter"/>
323 <record id="action_quotations" model="ir.actions.act_window">
324 <field name="name">Quotations</field>
325 <field name="type">ir.actions.act_window</field>
326 <field name="res_model">sale.order</field>
327 <field name="view_type">form</field>
328 <field name="view_id" ref="view_quotation_tree"/>
329 <field name="view_mode">tree,form,calendar,graph</field>
330 <field name="context">{}</field>
331 <field name="domain">[('state','in',('draft','sent','cancel'))]</field>
332 <field name="search_view_id" ref="view_sales_order_filter"/>
333 <field name="help" type="html">
334 <p class="oe_view_nocontent_create">
335 Click to create a quotation, the first step of a new sale.
337 Odoo will help you handling efficiently the complete sale flow:
338 from the quotation to the sales order, the
339 delivery, the invoicing and the payment collection.
341 The social feature helps you organizing discussions on each sales
342 order, and allows your customers to keep track of the sales orders' evolution.
347 <menuitem id="menu_sale_quotations"
348 action="action_quotations" parent="base.menu_sales"
351 <record id="action_order_tree" model="ir.actions.act_window">
352 <field name="name">Old Quotations</field>
353 <field name="type">ir.actions.act_window</field>
354 <field name="res_model">sale.order</field>
355 <field name="view_type">form</field>
356 <field name="view_mode">tree,form,calendar,graph</field>
357 <field name="domain">[('state','=','draft'),('date_order','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
358 <field name="filter" eval="True"/>
359 <field name="search_view_id" ref="view_sales_order_filter"/>
363 <record id="view_order_line_tree" model="ir.ui.view">
364 <field name="name">sale.order.line.tree</field>
365 <field name="model">sale.order.line</field>
366 <field name="arch" type="xml">
367 <tree string="Sales Order Lines" create="false">
368 <field name="product_id" invisible="1"/>
369 <field name="order_id"/>
370 <field name="order_partner_id"/>
372 <field name="product_uom_qty" string="Qty"/>
373 <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
374 <field name="salesman_id"/>
375 <field name="price_subtotal" sum="Total"/>
376 <field name="state"/>
377 <field name="invoiced"/>
381 <record id="view_order_line_form2" model="ir.ui.view">
382 <field name="name">sale.order.line.form2</field>
383 <field name="model">sale.order.line</field>
384 <field name="arch" type="xml">
385 <form string="Sales Order Lines" create="false">
387 <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"/>
388 <button name="button_cancel" string="Cancel Line" type="object" states="confirmed,exception" groups="base.group_user"/>
389 <button name="button_done" string="Done" type="object" attrs="{'invisible': ['|',('invoiced', '=', 0), ('state', 'not in', ('confirmed', 'exception'))]}" class="oe_highlight" groups="base.group_user"/>
390 <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
393 <label for="order_id" class="oe_edit_only"/>
394 <h1><field name="order_id" domain="[('state','!=','done')]"/></h1>
395 <label for="order_partner_id" class="oe_edit_only"/>
396 <h2><field name="order_partner_id"/></h2>
399 <field name="product_id"/>
400 <label for="product_uom_qty"/>
402 <field name="product_uom_qty" readonly="1" class="oe_inline"/>
403 <field name="product_uom" groups="product.group_uom" class="oe_inline"/>
407 <field name="price_unit"/>
408 <field name="discount" groups="sale.group_discount_per_so_line"/>
409 <field name="price_subtotal"/>
410 <field name="invoiced"/>
411 <field name="company_id" groups="base.group_multi_company" readonly="1"/>
421 <record id="view_sales_order_line_filter" model="ir.ui.view">
422 <field name="name">sale.order.line.select</field>
423 <field name="model">sale.order.line</field>
424 <field name="arch" type="xml">
425 <search string="Search Sales Order">
426 <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('invoiced','<>', 1),('state','=','done')]" help="Sales Order Lines ready to be invoiced"/>
428 <filter string="My Sales Order Lines" icon="terp-personnal" domain="[('salesman_id','=',uid)]" help="Sales Order Lines related to a Sales Order of mine"/>
429 <field name="order_id"/>
430 <field name="order_partner_id" operator="child_of"/>
431 <field name="product_id"/>
432 <field name="salesman_id"/>
433 <group expand="0" string="Group By">
434 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
435 <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}"/>
436 <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'salesman_id'}"/>
437 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
443 <record id="view_sales_order_uninvoiced_line_filter" model="ir.ui.view">
444 <field name="name">sale.order.uninvoiced.line</field>
445 <field name="model">sale.order.line</field>
446 <field name="arch" type="xml">
447 <search string="Search Uninvoiced Lines">
448 <filter icon="terp-gtk-go-back-rtl" string="To Do" domain="[('state','=','confirmed')]" name="sale order" help="Confirmed sales order lines, not yet delivered"/>
449 <filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]" name="sale_order_done" help="Sales order lines done"/>
450 <filter icon="terp-accessories-archiver" string="Shipped" domain="[('state','=','done')]" name="unshipped" help="Sales Order Lines that are in 'done' state"/>
452 <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"/>
454 <filter string="My Sales Order Lines" icon="terp-personal" domain="[('salesman_id','=',uid)]" help="My Sales Order Lines"/>
455 <field name="order_id"/>
456 <field name="order_partner_id" operator="child_of"/>
457 <field name="product_id"/>
458 <field name="salesman_id"/>
459 <group expand="0" string="Group By">
460 <filter string="Order" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'order_id'}" help="Order reference"/>
461 <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
462 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
468 <record id="action_order_line_tree2" model="ir.actions.act_window">
469 <field name="name">Order Lines to Invoice</field>
470 <field name="type">ir.actions.act_window</field>
471 <field name="res_model">sale.order.line</field>
472 <field name="view_type">form</field>
473 <field name="view_mode">tree,form</field>
474 <field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter"/>
475 <field name="context">{"search_default_uninvoiced":1}</field>
476 <field name="filter" eval="True"/>
477 <field name="help" type="html">
479 Here is a list of each sales order line to be invoiced. You can
480 invoice sales orders partially, by lines of sales order. You do
481 not need this list if you invoice from the delivery orders or
482 if you invoice sales totally.
487 <record id="action_order_line_tree3" model="ir.actions.act_window">
488 <field name="name">Uninvoiced and Delivered Lines</field>
489 <field name="type">ir.actions.act_window</field>
490 <field name="res_model">sale.order.line</field>
491 <field name="view_type">form</field>
492 <field name="view_mode">tree,form</field>
493 <field name="domain">[('invoiced','<>', 1),('state','=','done')]</field>
494 <field name="filter" eval="True"/>
496 <record id="action_order_line_product_tree" model="ir.actions.act_window">
497 <field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
498 <field name="name">Sales Order Lines</field>
499 <field name="res_model">sale.order.line</field>
500 <field name="view_id" ref="view_order_line_tree"/>
502 <record model="ir.ui.view" id="product_form_view_sale_order_button">
503 <field name="name">product.product.sale.order</field>
504 <field name="model">product.product</field>
505 <field name="inherit_id" ref="product.product_normal_form_view"/>
506 <field name="groups_id" eval="[(4, ref('base.group_sale_salesman'))]"/>
507 <field name="arch" type="xml">
508 <xpath expr="//div[@name='buttons']" position="inside">
509 <button class="oe_inline oe_stat_button" name="%(action_order_line_product_tree)d"
510 type="action" icon="fa-strikethrough">
511 <field string="Sales" name="sales_count" widget="statinfo" />
517 <record model="ir.ui.view" id="product_template_form_view_sale_order_button">
518 <field name="name">product.template.sale.order.button</field>
519 <field name="model">product.template</field>
520 <field name="inherit_id" ref="product.product_template_only_form_view"/>
521 <field name="groups_id" eval="[(4, ref('base.group_sale_salesman'))]"/>
522 <field name="arch" type="xml">
523 <xpath expr="//div[@name='buttons']" position="inside">
524 <button class="oe_inline oe_stat_button" name="action_view_sales"
525 type="object" icon="fa-strikethrough">
526 <field string="Sales" name="sales_count" widget="statinfo" />
533 <record model="ir.ui.view" id="view_company_inherit_form2">
534 <field name="name">res.company.form.inherit</field>
535 <field name="inherit_id" ref="base.view_company_form"/>
536 <field name="model">res.company</field>
537 <field name="arch" type="xml">
538 <xpath expr="//group[@name='account_grp']" position="after">
539 <group name="sale_grp" string="Sales">
540 <field name="sale_note" nolabel="1" placeholder="Default terms & conditions..."/>
546 <!-- Update account invoice list view!-->
547 <record model="ir.ui.view" id="account_invoice_tree">
548 <field name="name">Account Invoice</field>
549 <field name="model">account.invoice</field>
550 <field name="inherit_id" ref="account.invoice_tree"/>
551 <field name="arch" type="xml">
553 <xpath expr="//field[@name='user_id']" position="after">
554 <field name="team_id" string="Sales Team" groups="base.group_multi_salesteams"/>
560 <!-- Update account invoice search view!-->
561 <record id="account_invoice_groupby_inherit" model="ir.ui.view">
562 <field name="name">account.invoice.groupby</field>
563 <field name="model">account.invoice</field>
564 <field name="inherit_id" ref="account.view_account_invoice_filter"/>
565 <field name="arch" type="xml">
566 <xpath expr="//field[@name='user_id']" position="after">
567 <field name="team_id" groups="base.group_multi_salesteams"/>
569 <xpath expr="//group/filter[@string='Status']" position="after">
570 <filter string="Sales Team" domain="[]" context="{'group_by':'team_id'}" groups="base.group_multi_salesteams"/>
575 <!-- Update account invoice !-->
576 <record model="ir.ui.view" id="account_invoice_form">
577 <field name="name">Account Invoice</field>
578 <field name="model">account.invoice</field>
579 <field name="inherit_id" ref="account.invoice_form"/>
580 <field name="arch" type="xml">
582 <xpath expr="//field[@name='user_id']" position="after">
583 <field name="team_id" groups="base.group_multi_salesteams"/>
589 <!-- search by Salesteams -->
590 <record id="action_orders_salesteams" model="ir.actions.act_window">
591 <field name="name">Sales Orders</field>
592 <field name="type">ir.actions.act_window</field>
593 <field name="res_model">sale.order</field>
594 <field name="view_type">form</field>
595 <field name="view_mode">tree,form,calendar,graph</field>
596 <field name="search_view_id" ref="sale.view_sales_order_filter"/>
597 <field name="domain">[('state','not in',('draft','sent','cancel'))]</field>
598 <field name="context">{
599 'search_default_team_id': [active_id],
600 'default_team_id': active_id,
603 <field name="help" type="html">
604 <p class="oe_view_nocontent_create">
605 Click to create a quotation that can be converted into a sales
608 Odoo will help you efficiently handle the complete sales flow:
609 quotation, sales order, delivery, invoicing and payment.
614 <record id="action_quotations_salesteams" model="ir.actions.act_window">
615 <field name="name">Quotations</field>
616 <field name="type">ir.actions.act_window</field>
617 <field name="res_model">sale.order</field>
618 <field name="view_type">form</field>
619 <field name="view_id" ref="sale.view_quotation_tree"/>
620 <field name="view_mode">tree,form,calendar,graph</field>
621 <field name="context">{
622 'search_default_team_id': [active_id],
623 'default_team_id': active_id,
627 <field name="domain">[('state','in',('draft','sent','cancel'))]</field>
628 <field name="search_view_id" ref="sale.view_sales_order_filter"/>
629 <field name="help" type="html">
630 <p class="oe_view_nocontent_create">
631 Click to create a quotation, the first step of a new sale.
633 Odoo will help you handling efficiently the complete sale flow:
634 from the quotation to the sales order, the
635 delivery, the invoicing and the payment collection.
637 The social feature helps you organizing discussions on each sales
638 order, and allows your customers to keep track of the sales orders' evolution.
643 <record id="action_invoice_salesteams" model="ir.actions.act_window">
644 <field name="name">Invoices</field>
645 <field name="res_model">account.invoice</field>
646 <field name="view_type">form</field>
647 <field name="view_mode">tree,form,calendar,graph</field>
648 <field name="view_id" ref="account.invoice_tree"/>
649 <field name="domain">[
650 ('state', 'not in', ['draft', 'cancel']),
651 ('type', '=', 'out_invoice')]</field>
652 <field name="context">{
653 'search_default_team_id': [active_id],
654 'default_team_id': active_id,
655 'default_type':'out_invoice',
656 'type':'out_invoice',
657 'journal_type': 'sale',
660 <field name="search_view_id" ref="account.view_account_invoice_filter"/>
663 <record id="action_invoice_salesteams_view_tree" model="ir.actions.act_window.view">
664 <field name="sequence">1</field>
665 <field name="view_mode">tree</field>
666 <field name="act_window_id" ref="sale.action_invoice_salesteams"/>
669 <record id="action_invoice_salesteams_view_form" model="ir.actions.act_window.view">
670 <field name="sequence">2</field>
671 <field name="view_mode">form</field>
672 <field name="view_id" ref="account.invoice_form"/>
673 <field name="act_window_id" ref="sale.action_invoice_salesteams"/>
676 <record id="action_order_report_quotation_salesteam" model="ir.actions.act_window">
677 <field name="name">Quotations Analysis</field>
678 <field name="res_model">sale.report</field>
679 <field name="view_mode">graph</field>
680 <field name="domain">[('state','=','draft'),('team_id', '=', active_id)]</field>
681 <field name="context">{'search_default_order_month':1}</field>
682 <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>
685 <record id="action_order_report_so_salesteam" model="ir.actions.act_window">
686 <field name="name">Sales Analysis</field>
687 <field name="res_model">sale.report</field>
688 <field name="view_mode">graph</field>
689 <field name="domain">[('state','not in',('draft','sent','cancel')),('team_id', '=', active_id)]</field>
690 <field name="context">{'search_default_order_month':1}</field>
691 <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>
694 <record id="action_account_invoice_report_salesteam" model="ir.actions.act_window">
695 <field name="name">Invoices Analysis</field>
696 <field name="res_model">account.invoice.report</field>
697 <field name="view_mode">graph</field>
698 <field name="domain">[('team_id', '=', active_id),('state', 'not in', ['draft', 'cancel'])]</field>
699 <field name="context">{'search_default_month':1}</field>
700 <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>