1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem icon="terp-sale" id="menu_sale_root" name="Sales Management"/>
6 <record id="view_shop_form" model="ir.ui.view">
7 <field name="name">sale.shop</field>
8 <field name="model">sale.shop</field>
9 <field name="type">form</field>
10 <field name="arch" type="xml">
11 <form string="Sale Shop">
12 <field name="name" select="1"/>
13 <field name="warehouse_id" required="1" select="1"/>
14 <separator colspan="4" string="Accounting"/>
15 <field name="payment_default_id"/>
16 <field domain="[('type','=','sale')]" name="pricelist_id" select="1"/>
17 <field name="project_id" select="1"/>
18 <separator colspan="4" string="Payment accounts"/>
19 <field colspan="4" name="payment_account_id" nolabel="1"/>
23 <record id="view_shop_tree" model="ir.ui.view">
24 <field name="name">sale.shop</field>
25 <field name="model">sale.shop</field>
26 <field name="type">tree</field>
27 <field name="arch" type="xml">
28 <tree string="Sale Shop">
30 <field name="pricelist_id"/>
31 <field name="project_id"/>
32 <field name="warehouse_id"/>
37 <record id="action_shop_form" model="ir.actions.act_window">
38 <field name="name">Shop</field>
39 <field name="type">ir.actions.act_window</field>
40 <field name="res_model">sale.shop</field>
41 <field name="view_type">form</field>
42 <field name="view_id" ref="view_shop_tree"/>
44 <menuitem id="menu_shop_configuration" name="Configuration" parent="sale.menu_sale_root" sequence="1"/>
45 <menuitem action="action_shop_form" id="menu_action_shop_form" parent="sale.menu_shop_configuration"/>
47 <record id="view_sale_order_calendar" model="ir.ui.view">
48 <field name="name">sale.order.calendar</field>
49 <field name="model">sale.order</field>
50 <field name="type">calendar</field>
51 <field name="arch" type="xml">
52 <calendar string="Sales orders" color="state" date_start="date_order">
53 <field name="partner_id"/>
54 <field name="amount_total"/>
58 <record model="ir.ui.view" id="view_sale_order_graph">
59 <field name="name">sale.order.graph</field>
60 <field name="model">sale.order</field>
61 <field name="type">graph</field>
62 <field name="arch" type="xml">
63 <graph string="Sales orders" type="bar">
64 <field name="partner_id"/>
65 <field name="amount_total" operator="+"/>
70 <record id="view_order_tree" model="ir.ui.view">
71 <field name="name">sale.order.tree</field>
72 <field name="model">sale.order</field>
73 <field name="type">tree</field>
74 <field name="arch" type="xml">
75 <tree string="Sales orders">
76 <field name="date_order"/>
77 <field name="name" string="Reference"/>
78 <field name="partner_id"/>
79 <field name="partner_shipping_id"/>
80 <field name="picked_rate" widget="progressbar"/>
81 <field name="invoiced_rate" widget="progressbar"/>
82 <field name="amount_untaxed"/>
88 <record id="view_order_form" model="ir.ui.view">
89 <field name="name">sale.order.form</field>
90 <field name="model">sale.order</field>
91 <field name="type">form</field>
92 <field name="arch" type="xml">
93 <form string="Sales order">
94 <group col="6" colspan="4">
95 <field name="name" select="1"/>
96 <field name="client_order_ref"/>
97 <field name="shipped" select="2"/>
98 <field name="shop_id" on_change="onchange_shop_id(shop_id)" select="2"/>
99 <field name="date_order" select="1"/>
100 <field name="invoiced" select="2"/>
102 <notebook colspan="4">
103 <page string="Sale Order">
104 <field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1" select="1"/>
105 <field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>
106 <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id"/>
107 <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id"/>
108 <field domain="[('type','=','sale')]" name="pricelist_id"/>
109 <field name="project_id" select="2"/>
111 <field colspan="4" mode="tree,graph" name="order_line" nolabel="1" widget="one2many_list">
112 <form string="Sale Order Lines">
114 <page string="Order Line">
115 <separator colspan="4" string="Automatic Declaration"/>
117 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
119 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging)"
122 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
123 name="product_uom_qty"
124 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging)"
126 <field name="product_uom"
127 on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
129 name="product_packaging"
130 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
131 on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging)"
132 domain="[('product_id','=',product_id)]"
133 groups="base.group_extended"/>
134 <separator colspan="4" string="Manual Description"/>
135 <field colspan="4" name="name" select="2"/>
136 <field name="price_unit" select="2"/>
137 <field name="discount"/>
139 <field name="delay" select="2"/>
141 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]"/>
142 <separator colspan="4" string="States"/>
143 <field name="state" select="2"/>
144 <group col="3" colspan="2">
145 <field name="invoiced" select="2"/>
146 <button colspan="1" name="%(wizard_sale_order_line_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
149 <page groups="base.group_extended" string="Extra Info">
150 <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
151 <field groups="product.group_uos" name="product_uos"/>
152 <field name="address_allotment_id" select="2"/>
153 <separator colspan="4" string="Properties"/>
154 <field colspan="4" name="property_ids" nolabel="1"/>
156 <page string="Notes">
157 <field colspan="4" name="notes" nolabel="1"/>
159 <page string="History" groups="base.group_extended">
160 <separator colspan="4" string="Invoice Lines"/>
161 <field colspan="4" name="invoice_lines" nolabel="1"/>
162 <separator colspan="4" string="Stock Moves"/>
163 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
167 <tree string="Sales order lines">
168 <field colspan="4" name="name"/>
169 <field name="product_uom_qty" string="Qty"/>
170 <field name="product_uom" string="UoM"/>
171 <field name="discount"/>
172 <field name="price_unit"/>
173 <field name="price_net"/>
174 <field name="price_subtotal"/>
178 <group col="7" colspan="4">
179 <field name="amount_untaxed" sum="Untaxed amount"/>
180 <field name="amount_tax"/>
181 <field name="amount_total" sum="Total amount"/>
182 <button name="button_dummy" states="draft" string="Compute" type="object"/>
184 <group col="13" colspan="4">
185 <field name="state" select="2"/>
186 <button name="order_confirm" states="draft" string="Confirm Order"/>
187 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
188 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
189 <button name="ship_recreate" states="shipping_except" string="Recreate Procurement"/>
190 <button name="ship_corrected" states="shipping_except" string="Procurement Corrected"/>
191 <button name="manual_invoice" states="manual" string="Create Invoice"/>
192 <button name="ship_cancel" states="shipping_except" string="Cancel Order"/>
193 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
194 <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object"/>
195 <button name="cancel" states="draft" string="Cancel Order"/>
196 <button name="invoice_cancel" states="invoice_except" string="Cancel Order"/>
199 <page string="Other data">
200 <field groups="base.group_extended" name="incoterm"/>
201 <field groups="base.group_extended" name="picking_policy" required="True"/>
202 <field name="user_id"/>
203 <field name="order_policy"/>
204 <field groups="base.group_extended" name="origin"/>
205 <field groups="base.group_extended" name="invoice_quantity" attrs="{'readonly':[('order_policy','=','picking')]}"/>
206 <field name="payment_term"/>
207 <separator colspan="4" string="Notes"/>
208 <field colspan="4" name="note" nolabel="1"/>
210 <page groups="base.group_extended" string="History">
211 <separator colspan="4" string="Related invoices"/>
212 <field colspan="4" name="invoice_ids" nolabel="1"/>
213 <field colspan="4" name="picking_ids" nolabel="1"/>
219 <record id="action_order_form" model="ir.actions.act_window">
220 <field name="name">Sales Orders</field>
221 <field name="type">ir.actions.act_window</field>
222 <field name="res_model">sale.order</field>
223 <field name="view_type">form</field>
225 <menuitem action="action_order_form" id="menu_sale_order" parent="sale.menu_sale_root"/>
227 <record id="action_order_tree" model="ir.actions.act_window">
228 <field name="name">My Sales Order</field>
229 <field name="type">ir.actions.act_window</field>
230 <field name="res_model">sale.order</field>
231 <field name="view_type">form</field>
232 <field name="view_mode">tree,form,calendar,graph</field>
233 <field name="domain">[('user_id','=',uid)]</field>
236 <menuitem action="action_order_tree" id="menu_action_order_tree" parent="sale.menu_sale_order"/>
239 <record id="action_order_tree_all" model="ir.actions.act_window">
240 <field name="name">All Sales Order</field>
241 <field name="type">ir.actions.act_window</field>
242 <field name="res_model">sale.order</field>
243 <field name="view_type">form</field>
244 <field name="view_mode">tree,form,calendar,graph</field>
246 <menuitem action="action_order_tree_all" id="menu_action_order_tree_all" parent="sale.menu_sale_order"/>
248 <record id="action_order_tree_new" model="ir.actions.act_window">
249 <field name="name">New Quotation</field>
250 <field name="type">ir.actions.act_window</field>
251 <field name="res_model">sale.order</field>
252 <field name="view_type">form</field>
253 <field name="view_mode">form,tree,calendar,graph</field>
255 <menuitem action="action_order_tree_new" id="menu_action_order_tree_new" parent="sale.menu_sale_order"/>
258 <record id="action_order_tree2" model="ir.actions.act_window">
259 <field name="name">Sales in Exception</field>
260 <field name="type">ir.actions.act_window</field>
261 <field name="res_model">sale.order</field>
262 <field name="view_type">form</field>
263 <field name="view_mode">tree,form,calendar,graph</field>
264 <field name="domain">[('state','in',('shipping_except','invoice_except')]</field>
266 <menuitem action="action_order_tree2" id="menu_action_order_tree2" parent="menu_action_order_tree_all"/>
268 <record id="action_order_tree3" model="ir.actions.act_window">
269 <field name="name">Sales Order To Be Invoiced</field>
270 <field name="type">ir.actions.act_window</field>
271 <field name="res_model">sale.order</field>
272 <field name="view_type">form</field>
273 <field name="view_mode">tree,form,calendar,graph</field>
274 <field name="domain">[('state','=','manual')]</field>
276 <menuitem action="action_order_tree3" id="menu_action_order_tree3" parent="sale.menu_action_order_tree_all"/>
278 <record id="action_order_tree4" model="ir.actions.act_window">
279 <field name="name">Sales Order in Progress</field>
280 <field name="type">ir.actions.act_window</field>
281 <field name="res_model">sale.order</field>
282 <field name="view_type">form</field>
283 <field name="view_mode">tree,form,calendar,graph</field>
284 <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
286 <menuitem action="action_order_tree4" id="menu_action_order_tree4" parent="sale.menu_action_order_tree_all" sequence="2"/>
289 <record id="action_order_tree5" model="ir.actions.act_window">
290 <field name="name">All Quotations</field>
291 <field name="type">ir.actions.act_window</field>
292 <field name="res_model">sale.order</field>
293 <field name="view_type">form</field>
294 <field name="view_mode">tree,form,calendar,graph</field>
295 <field name="domain">[('state','=','draft')]</field>
297 <menuitem action="action_order_tree5" id="menu_action_order_tree5" parent="sale.menu_action_order_tree_all" sequence="1"/>
299 <record id="action_order_tree7" model="ir.actions.act_window">
300 <field name="name">My sales in shipping exception</field>
301 <field name="type">ir.actions.act_window</field>
302 <field name="res_model">sale.order</field>
303 <field name="view_type">form</field>
304 <field name="view_mode">tree,form,calendar,graph</field>
305 <field name="domain">[('state','in',('shipping_except','invoice_except')),('user_id','=',uid)]</field>
307 <menuitem action="action_order_tree7" id="menu_action_order_tree7" parent="menu_action_order_tree"/>
309 <record id="action_order_tree8" model="ir.actions.act_window">
310 <field name="name">My sales order waiting Invoice</field>
311 <field name="type">ir.actions.act_window</field>
312 <field name="res_model">sale.order</field>
313 <field name="view_type">form</field>
314 <field name="view_mode">tree,form,calendar,graph</field>
315 <field name="domain">[('state','=','manual'),('user_id','=',uid)]</field>
317 <menuitem action="action_order_tree8" id="menu_action_order_tree8" parent="sale.menu_action_order_tree"/>
319 <record id="action_order_tree9" model="ir.actions.act_window">
320 <field name="name">My sales order in progress</field>
321 <field name="type">ir.actions.act_window</field>
322 <field name="res_model">sale.order</field>
323 <field name="view_type">form</field>
324 <field name="view_mode">tree,form,calendar,graph</field>
325 <field name="domain">[('state','in',('progress','waiting_date','manual')),('user_id','=',uid)]</field>
327 <menuitem action="action_order_tree9" id="menu_action_order_tree9" parent="sale.menu_action_order_tree" sequence="2"/>
330 <record id="action_order_tree10" model="ir.actions.act_window">
331 <field name="name">My Quotations</field>
332 <field name="type">ir.actions.act_window</field>
333 <field name="res_model">sale.order</field>
334 <field name="view_type">form</field>
335 <field name="view_mode">tree,form,calendar,graph</field>
336 <field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
338 <menuitem action="action_order_tree10" id="menu_action_order_tree10" parent="sale.menu_action_order_tree" sequence="1"/>
341 <record id="view_order_line_graph" model="ir.ui.view">
342 <field name="name">sale.order.line.graph</field>
343 <field name="model">sale.order.line</field>
344 <field name="type">graph</field>
345 <field name="arch" type="xml">
346 <graph string="Sales order lines">
347 <field name="product_id"/>
348 <field name="price_unit" operator="+"/>
354 <record id="view_order_line_tree" model="ir.ui.view">
355 <field name="name">sale.order.line.tree</field>
356 <field name="model">sale.order.line</field>
357 <field name="type">tree</field>
358 <field name="arch" type="xml">
359 <tree string="Sales order lines">
360 <field name="order_id"/>
361 <field colspan="4" name="name"/>
362 <field name="product_id"/>
363 <field name="product_uom_qty" string="Qty"/>
364 <field name="product_uom" string="UoM"/>
365 <field name="discount"/>
366 <field name="price_unit"/>
367 <field name="price_net"/>
368 <field name="price_subtotal"/>
372 <record id="view_order_line_form2" model="ir.ui.view">
373 <field name="name">sale.order.line.form2</field>
374 <field name="model">sale.order.line</field>
375 <field name="type">form</field>
376 <field name="arch" type="xml">
377 <form string="Sales Order Lines">
379 <page string="Order Lines">
380 <separator colspan="4" string="Automatic Declaration"/>
381 <field name="order_id" select="1"/>
382 <field name="invoiced" select="2"/>
383 <field name="product_uom_qty" readonly="1" select="2"/>
384 <field name="product_uom" readonly="2"/>
385 <field name="product_id" readonly="1" select="1"/>
387 <separator colspan="4" string="Manual Designation"/>
388 <field colspan="4" name="name" select="2"/>
389 <field name="price_unit" select="2"/>
390 <field name="discount"/>
392 <field name="delay" select="2"/>
393 <field name="price_subtotal"/>
394 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]"/>
395 <separator colspan="4" string="States"/>
396 <field name="state" select="2"/>
397 <group col="2" colspan="2">
398 <button name="button_done" states="confirmed" string="Done" type="object"/>
401 <page string="Properties">
402 <field name="property_ids" nolabel="1"/>
404 <page string="Notes">
405 <field colspan="4" name="notes" nolabel="1"/>
407 <page string="Invoice Lines">
408 <field colspan="4" name="invoice_lines" nolabel="1"/>
416 <record id="action_order_line_tree1" model="ir.actions.act_window">
417 <field name="name">Sales Order Lines</field>
418 <field name="type">ir.actions.act_window</field>
419 <field name="res_model">sale.order.line</field>
420 <field name="view_type">form</field>
421 <field name="view_id" eval="False"/>
423 <menuitem action="action_order_line_tree1" id="menu_action_order_line_tree1" parent="sale.menu_sale_root"/>
425 <record id="action_order_line_tree2" model="ir.actions.act_window">
426 <field name="name">Uninvoiced lines</field>
427 <field name="type">ir.actions.act_window</field>
428 <field name="res_model">sale.order.line</field>
429 <field name="view_type">form</field>
430 <field name="view_mode">tree,form,graph</field>
431 <field name="domain">[('invoiced','<>', 1),('state','<>','draft'),('state','<>','cancel')]</field>
433 <menuitem action="action_order_line_tree2" id="menu_action_order_line_tree2" parent="sale.menu_action_order_line_tree1"/>
435 <record id="action_order_line_tree3" model="ir.actions.act_window">
436 <field name="name">Uninvoiced and Delivered Lines</field>
437 <field name="type">ir.actions.act_window</field>
438 <field name="res_model">sale.order.line</field>
439 <field name="view_type">form</field>
440 <field name="view_mode">tree,form,graph</field>
441 <field name="domain">[('invoiced','<>', 1),('state','=','done')]</field>
443 <menuitem action="action_order_line_tree3" id="menu_action_order_line_tree3" parent="sale.menu_action_order_line_tree2"/>
445 <act_window context="{'partner_id': active_id}" domain="[('partner_id', '=', active_id)]" id="act_res_partner_2_sale_order" name="Sales" res_model="sale.order" src_model="res.partner"/>
447 <act_window domain="[('product_id','=',active_id)]" id="action_order_line_product_tree" name="Product sales" res_model="sale.order.line" src_model="product.product"/>
449 <!-- configartion view -->
451 <record id="view_config_picking_policy" model="ir.ui.view">
452 <field name="name">Configure Picking Policy for Sale Order </field>
453 <field name="model">sale.config.picking_policy</field>
454 <field name="type">form</field>
455 <field name="arch" type="xml">
456 <form string="Configure Picking Policy for Sale Order">
457 <separator col="4" colspan="4" string="Configure Picking Policy for Sale Order"/>
459 <field name="picking_policy"/>
460 <group col="4" colspan="4">
461 <button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/>
462 <button icon="gtk-ok" name="set_default" string="Set Default" type="object"/>
468 <record id="action_config_picking_policy" model="ir.actions.act_window">
469 <field name="name">Configure Picking Policy for Sale Order</field>
470 <field name="type">ir.actions.act_window</field>
471 <field name="res_model">sale.config.picking_policy</field>
472 <field name="view_type">form</field>
473 <field name="view_mode">form</field>
474 <field name="target">new</field>
477 <!-- register configuration wizard -->
478 <record id="config_wizard_step_sale_picking_policy" model="ir.actions.todo">
479 <field name="name">Select the default picking policy for Sale Order</field>
480 <field name="note">This Configuration step use to set default picking policy when make sale order</field>
481 <field name="action_id" ref="action_config_picking_policy"/>
482 <field name="state">open</field>