1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem icon="terp-sale" id="menu_sale_root" name="Sales Management"
5 groups="group_sale_user"/>
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="Sale Shop">
13 <field name="name" select="1"/>
14 <field name="warehouse_id" required="1" select="1"/>
15 <separator colspan="4" string="Accounting"/>
16 <field name="payment_default_id"/>
17 <field domain="[('type','=','sale')]" name="pricelist_id" select="1"/>
18 <field name="project_id" select="1"/>
19 <separator colspan="4" string="Payment accounts"/>
20 <field colspan="4" name="payment_account_id" nolabel="1"/>
24 <record id="view_shop_tree" model="ir.ui.view">
25 <field name="name">sale.shop</field>
26 <field name="model">sale.shop</field>
27 <field name="type">tree</field>
28 <field name="arch" type="xml">
29 <tree string="Sale Shop">
31 <field name="pricelist_id"/>
32 <field name="project_id"/>
33 <field name="warehouse_id"/>
38 <record id="action_shop_form" model="ir.actions.act_window">
39 <field name="name">Shop</field>
40 <field name="type">ir.actions.act_window</field>
41 <field name="res_model">sale.shop</field>
42 <field name="view_type">form</field>
43 <field name="view_mode">tree,form</field>
44 <field name="view_id" ref="view_shop_tree"/>
46 <menuitem id="menu_shop_configuration" name="Configuration" parent="sale.menu_sale_root" sequence="1"/>
47 <menuitem action="action_shop_form" id="menu_action_shop_form" parent="sale.menu_shop_configuration"/>
49 <record id="view_sale_order_calendar" model="ir.ui.view">
50 <field name="name">sale.order.calendar</field>
51 <field name="model">sale.order</field>
52 <field name="type">calendar</field>
53 <field name="arch" type="xml">
54 <calendar string="Sales orders" color="state" date_start="date_order">
55 <field name="partner_id"/>
56 <field name="amount_total"/>
60 <record model="ir.ui.view" id="view_sale_order_graph">
61 <field name="name">sale.order.graph</field>
62 <field name="model">sale.order</field>
63 <field name="type">graph</field>
64 <field name="arch" type="xml">
65 <graph string="Sales orders" type="bar">
66 <field name="partner_id"/>
67 <field name="amount_total" operator="+"/>
72 <record id="view_order_tree" model="ir.ui.view">
73 <field name="name">sale.order.tree</field>
74 <field name="model">sale.order</field>
75 <field name="type">tree</field>
76 <field name="arch" type="xml">
77 <tree string="Sales orders">
78 <field name="date_order"/>
79 <field name="name" string="Reference"/>
80 <field name="partner_id"/>
81 <field name="partner_shipping_id"/>
82 <field name="picked_rate" widget="progressbar"/>
83 <field name="invoiced_rate" widget="progressbar"/>
84 <field name="amount_untaxed"/>
90 <record id="view_order_form" model="ir.ui.view">
91 <field name="name">sale.order.form</field>
92 <field name="model">sale.order</field>
93 <field name="type">form</field>
94 <field name="arch" type="xml">
95 <form string="Sales order">
96 <group col="6" colspan="4">
97 <field name="name" select="1"/>
98 <field name="client_order_ref" select="2"/>
99 <field name="shipped" select="2"/>
100 <field name="shop_id" on_change="onchange_shop_id(shop_id)" select="2"/>
101 <field name="date_order" select="1"/>
102 <field name="invoiced" select="2"/>
104 <notebook colspan="4">
105 <page string="Sale Order">
106 <field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1" select="1"/>
107 <field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>
108 <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id"/>
109 <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id"/>
110 <field domain="[('type','=','sale')]" name="pricelist_id"/>
111 <field name="project_id" select="2" context="{'partner_id':partner_id, 'contact_id':partner_order_id, 'pricelist_id':pricelist_id, 'default_name':name}"/>
113 <field colspan="4" mode="tree,graph" name="order_line" nolabel="1" widget="one2many_list">
114 <form string="Sale Order Lines">
116 <page string="Order Line">
117 <separator colspan="4" string="Automatic Declaration"/>
119 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
121 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)"
124 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
125 name="product_uom_qty"
126 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)"
128 <field name="product_uom"
129 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)"/>
131 name="product_packaging"
132 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
133 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)"
134 domain="[('product_id','=',product_id)]"
135 groups="base.group_extended"/>
136 <separator colspan="4" string="Manual Description"/>
137 <field colspan="4" name="name" select="2"/>
138 <field name="price_unit" select="2"/>
139 <field name="discount"/>
141 <field name="delay" select="2"/>
143 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]"/>
144 <separator colspan="4" string="States"/>
145 <field name="state" select="2"/>
146 <group col="3" colspan="2">
147 <field name="invoiced" select="2"/>
148 <button colspan="1" name="%(wizard_sale_order_line_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
151 <page groups="base.group_extended" string="Extra Info">
152 <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
153 <field groups="product.group_uos" name="product_uos"/>
154 <field name="address_allotment_id" select="2"/>
155 <separator colspan="4" string="Properties"/>
156 <field colspan="4" name="property_ids" nolabel="1"/>
158 <page string="Notes">
159 <field colspan="4" name="notes" nolabel="1"/>
161 <page string="History" groups="base.group_extended">
162 <separator colspan="4" string="Invoice Lines"/>
163 <field colspan="4" name="invoice_lines" nolabel="1"/>
164 <separator colspan="4" string="Stock Moves"/>
165 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
169 <tree string="Sales order lines">
170 <field colspan="4" name="name"/>
171 <field name="product_uom_qty" string="Qty"/>
172 <field name="product_uom" string="UoM"/>
173 <field name="discount"/>
174 <field name="price_unit"/>
175 <field name="price_net"/>
176 <field name="price_subtotal"/>
180 <group col="7" colspan="4">
181 <field name="amount_untaxed" sum="Untaxed amount"/>
182 <field name="amount_tax"/>
183 <field name="amount_total" sum="Total amount"/>
184 <button name="button_dummy" states="draft" string="Compute" type="object"/>
186 <group col="13" colspan="4">
187 <field name="state" select="2"/>
188 <button name="order_confirm" states="draft" string="Confirm Order"/>
189 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
190 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
191 <button name="ship_recreate" states="shipping_except" string="Recreate Procurement"/>
192 <button name="ship_corrected" states="shipping_except" string="Procurement Corrected"/>
193 <button name="manual_invoice" states="manual" string="Create Invoice"/>
194 <button name="ship_cancel" states="shipping_except" string="Cancel Order"/>
195 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
196 <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object"/>
197 <button name="cancel" states="draft" string="Cancel Order"/>
198 <button name="invoice_cancel" states="invoice_except" string="Cancel Order"/>
201 <page string="Other data">
202 <field groups="base.group_extended" name="incoterm"/>
203 <field groups="base.group_extended" name="picking_policy" required="True"/>
204 <field name="user_id"/>
205 <field name="order_policy"/>
206 <field groups="base.group_extended" name="origin"/>
207 <field groups="base.group_extended" name="invoice_quantity" attrs="{'readonly':[('order_policy','=','prepaid')]}"/>
208 <field name="payment_term"/>
209 <separator colspan="4" string="Notes"/>
210 <field colspan="4" name="note" nolabel="1"/>
212 <page groups="base.group_extended" string="History">
213 <separator colspan="4" string="Related invoices"/>
214 <field colspan="4" name="invoice_ids" nolabel="1"/>
215 <field colspan="4" name="picking_ids" nolabel="1"/>
221 <record id="action_order_form" model="ir.actions.act_window">
222 <field name="name">Sales Orders</field>
223 <field name="type">ir.actions.act_window</field>
224 <field name="res_model">sale.order</field>
225 <field name="view_type">form</field>
226 <field name="view_mode">tree,form,calendar,graph</field>
228 <menuitem action="action_order_form" id="menu_sale_order" parent="sale.menu_sale_root"/>
230 <record id="action_order_tree" model="ir.actions.act_window">
231 <field name="name">My Sales Order</field>
232 <field name="type">ir.actions.act_window</field>
233 <field name="res_model">sale.order</field>
234 <field name="view_type">form</field>
235 <field name="view_mode">tree,form,calendar,graph</field>
236 <field name="domain">[('user_id','=',uid)]</field>
239 <menuitem action="action_order_tree" id="menu_action_order_tree" parent="sale.menu_sale_order"/>
242 <record id="action_order_tree_all" model="ir.actions.act_window">
243 <field name="name">All Sales Order</field>
244 <field name="type">ir.actions.act_window</field>
245 <field name="res_model">sale.order</field>
246 <field name="view_type">form</field>
247 <field name="view_mode">tree,form,calendar,graph</field>
249 <menuitem action="action_order_tree_all" id="menu_action_order_tree_all" parent="sale.menu_sale_order"/>
251 <record id="action_order_tree_new" model="ir.actions.act_window">
252 <field name="name">New Quotation</field>
253 <field name="type">ir.actions.act_window</field>
254 <field name="res_model">sale.order</field>
255 <field name="view_type">form</field>
256 <field name="view_mode">form,tree,calendar,graph</field>
258 <menuitem action="action_order_tree_new" id="menu_action_order_tree_new" parent="sale.menu_sale_order"/>
261 <record id="action_order_tree2" model="ir.actions.act_window">
262 <field name="name">Sales in Exception</field>
263 <field name="type">ir.actions.act_window</field>
264 <field name="res_model">sale.order</field>
265 <field name="view_type">form</field>
266 <field name="view_mode">tree,form,calendar,graph</field>
267 <field name="domain">[('state','in',('shipping_except','invoice_except')]</field>
269 <menuitem action="action_order_tree2" id="menu_action_order_tree2" parent="menu_action_order_tree_all"/>
271 <record id="action_order_tree3" model="ir.actions.act_window">
272 <field name="name">Sales Order To Be Invoiced</field>
273 <field name="type">ir.actions.act_window</field>
274 <field name="res_model">sale.order</field>
275 <field name="view_type">form</field>
276 <field name="view_mode">tree,form,calendar,graph</field>
277 <field name="domain">[('state','=','manual')]</field>
279 <menuitem action="action_order_tree3" id="menu_action_order_tree3" parent="sale.menu_action_order_tree_all"/>
281 <record id="action_order_tree4" model="ir.actions.act_window">
282 <field name="name">Sales Order in Progress</field>
283 <field name="type">ir.actions.act_window</field>
284 <field name="res_model">sale.order</field>
285 <field name="view_type">form</field>
286 <field name="view_mode">tree,form,calendar,graph</field>
287 <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
289 <menuitem action="action_order_tree4" id="menu_action_order_tree4" parent="sale.menu_action_order_tree_all" sequence="2"/>
292 <record id="action_order_tree5" model="ir.actions.act_window">
293 <field name="name">All Quotations</field>
294 <field name="type">ir.actions.act_window</field>
295 <field name="res_model">sale.order</field>
296 <field name="view_type">form</field>
297 <field name="view_mode">tree,form,calendar,graph</field>
298 <field name="domain">[('state','=','draft')]</field>
300 <menuitem action="action_order_tree5" id="menu_action_order_tree5" parent="sale.menu_action_order_tree_all" sequence="1"/>
302 <record id="action_order_tree7" model="ir.actions.act_window">
303 <field name="name">My sales in shipping exception</field>
304 <field name="type">ir.actions.act_window</field>
305 <field name="res_model">sale.order</field>
306 <field name="view_type">form</field>
307 <field name="view_mode">tree,form,calendar,graph</field>
308 <field name="domain">[('state','in',('shipping_except','invoice_except')),('user_id','=',uid)]</field>
310 <menuitem action="action_order_tree7" id="menu_action_order_tree7" parent="menu_action_order_tree"/>
312 <record id="action_order_tree8" model="ir.actions.act_window">
313 <field name="name">My sales order waiting Invoice</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','=','manual'),('user_id','=',uid)]</field>
320 <menuitem action="action_order_tree8" id="menu_action_order_tree8" parent="sale.menu_action_order_tree"/>
322 <record id="action_order_tree9" model="ir.actions.act_window">
323 <field name="name">My sales order in progress</field>
324 <field name="type">ir.actions.act_window</field>
325 <field name="res_model">sale.order</field>
326 <field name="view_type">form</field>
327 <field name="view_mode">tree,form,calendar,graph</field>
328 <field name="domain">[('state','in',('progress','waiting_date','manual')),('user_id','=',uid)]</field>
330 <menuitem action="action_order_tree9" id="menu_action_order_tree9" parent="sale.menu_action_order_tree" sequence="2"/>
333 <record id="action_order_tree10" model="ir.actions.act_window">
334 <field name="name">My Quotations</field>
335 <field name="type">ir.actions.act_window</field>
336 <field name="res_model">sale.order</field>
337 <field name="view_type">form</field>
338 <field name="view_mode">tree,form,calendar,graph</field>
339 <field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
341 <menuitem action="action_order_tree10" id="menu_action_order_tree10" parent="sale.menu_action_order_tree" sequence="1"/>
344 <record id="view_order_line_graph" model="ir.ui.view">
345 <field name="name">sale.order.line.graph</field>
346 <field name="model">sale.order.line</field>
347 <field name="type">graph</field>
348 <field name="arch" type="xml">
349 <graph string="Sales order lines">
350 <field name="product_id"/>
351 <field name="price_subtotal" operator="+"/>
357 <record id="view_order_line_tree" model="ir.ui.view">
358 <field name="name">sale.order.line.tree</field>
359 <field name="model">sale.order.line</field>
360 <field name="type">tree</field>
361 <field name="arch" type="xml">
362 <tree string="Sales order lines">
363 <field name="order_id"/>
364 <field name="order_partner_id"/>
366 <field name="product_id"/>
367 <field name="product_uom_qty" string="Qty"/>
368 <field name="product_uom" string="UoM"/>
369 <field name="discount"/>
370 <field name="price_unit"/>
371 <field name="price_net"/>
372 <field name="price_subtotal"/>
373 <field name="state"/>
377 <record id="view_order_line_form2" model="ir.ui.view">
378 <field name="name">sale.order.line.form2</field>
379 <field name="model">sale.order.line</field>
380 <field name="type">form</field>
381 <field name="arch" type="xml">
382 <form string="Sales Order Lines">
384 <page string="Order Lines">
385 <separator colspan="4" string="Automatic Declaration"/>
386 <field name="order_id" select="1"/>
387 <field name="invoiced" select="2"/>
388 <field name="product_uom_qty" readonly="1" select="2"/>
389 <field name="product_uom" readonly="2"/>
390 <field name="product_id" readonly="1" select="1"/>
392 <separator colspan="4" string="Manual Designation"/>
393 <field colspan="4" name="name" select="2"/>
394 <field name="price_unit" select="2"/>
395 <field name="discount"/>
397 <field name="delay" select="2"/>
398 <field name="price_subtotal"/>
399 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]"/>
400 <separator colspan="4" string="States"/>
401 <field name="state" select="2"/>
402 <group col="2" colspan="2">
403 <button name="button_done" states="confirmed" string="Done" type="object"/>
406 <page string="Properties">
407 <field name="property_ids" nolabel="1"/>
409 <page string="Notes">
410 <field colspan="4" name="notes" nolabel="1"/>
412 <page string="Invoice Lines">
413 <field colspan="4" name="invoice_lines" nolabel="1"/>
421 <record id="action_order_line_tree1" model="ir.actions.act_window">
422 <field name="name">Sales Order Lines</field>
423 <field name="type">ir.actions.act_window</field>
424 <field name="res_model">sale.order.line</field>
425 <field name="view_type">form</field>
426 <field name="view_id" eval="False"/>
428 <menuitem action="action_order_line_tree1" id="menu_action_order_line_tree1" parent="sale.menu_sale_root"
429 groups="base.group_extended"/>
431 <record id="action_order_line_tree2" model="ir.actions.act_window">
432 <field name="name">Uninvoiced Lines</field>
433 <field name="type">ir.actions.act_window</field>
434 <field name="res_model">sale.order.line</field>
435 <field name="view_type">form</field>
436 <field name="view_mode">tree,form,graph</field>
437 <field name="domain">[('invoiced','<>', 1),('state','<>','draft'),('state','<>','cancel')]</field>
439 <menuitem action="action_order_line_tree2" id="menu_action_order_line_tree2" parent="sale.menu_action_order_line_tree1"/>
441 <record id="action_order_line_tree3" model="ir.actions.act_window">
442 <field name="name">Uninvoiced and Delivered Lines</field>
443 <field name="type">ir.actions.act_window</field>
444 <field name="res_model">sale.order.line</field>
445 <field name="view_type">form</field>
446 <field name="view_mode">tree,form,graph</field>
447 <field name="domain">[('invoiced','<>', 1),('state','=','done')]</field>
449 <menuitem action="action_order_line_tree3" id="menu_action_order_line_tree3" parent="sale.menu_action_order_line_tree2"/>
451 <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"/>
453 <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"/>
455 <!-- configartion view -->
457 <record id="view_config_picking_policy" model="ir.ui.view">
458 <field name="name">Configure Picking Policy for Sale Order </field>
459 <field name="model">sale.config.picking_policy</field>
460 <field name="type">form</field>
461 <field name="arch" type="xml">
462 <form string="Sales Configuration">
463 <separator colspan="4" string="Configure Sale Order Logistic"/>
465 <field name="picking_policy"/>
467 <field name="order_policy"/>
470 <group col="4" colspan="4">
471 <button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/>
472 <button icon="gtk-ok" name="set_default" string="Set Default" type="object"/>
478 <record id="action_config_picking_policy" model="ir.actions.act_window">
479 <field name="name">Configure Picking Policy for Sale Order</field>
480 <field name="type">ir.actions.act_window</field>
481 <field name="res_model">sale.config.picking_policy</field>
482 <field name="view_type">form</field>
483 <field name="view_mode">form</field>
484 <field name="target">new</field>
487 <!-- register configuration wizard -->
488 <record id="config_wizard_step_sale_picking_policy" model="ir.actions.todo">
489 <field name="name">Select the default picking policy for Sale Order</field>
490 <field name="note">This Configuration step use to set default picking policy when make sale order</field>
491 <field name="action_id" ref="action_config_picking_policy"/>
492 <field name="state">open</field>