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, parent.fiscal_position)"
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, parent.fiscal_position, True)"
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, parent.fiscal_position)"
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),('type_tax_use','<>','purchase')]"/>
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="th_weight"/>
155 <field name="address_allotment_id" select="2"/>
156 <separator colspan="4" string="Properties"/>
157 <field colspan="4" name="property_ids" nolabel="1"/>
159 <page string="Notes">
160 <field colspan="4" name="notes" nolabel="1"/>
162 <page string="History" groups="base.group_extended">
163 <separator colspan="4" string="Invoice Lines"/>
164 <field colspan="4" name="invoice_lines" nolabel="1"/>
165 <separator colspan="4" string="Stock Moves"/>
166 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
170 <tree string="Sales order lines">
171 <field colspan="4" name="name"/>
172 <field name="product_uom_qty" string="Qty"/>
173 <field name="product_uom" string="UoM"/>
174 <field name="discount"/>
175 <field name="price_unit"/>
176 <field name="price_net"/>
177 <field name="price_subtotal"/>
181 <group col="7" colspan="4">
182 <field name="amount_untaxed" sum="Untaxed amount"/>
183 <field name="amount_tax"/>
184 <field name="amount_total" sum="Total amount"/>
185 <button name="button_dummy" states="draft" string="Compute" type="object"/>
187 <group col="13" colspan="4">
188 <field name="state" select="2"/>
189 <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-execute"/>
190 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-execute"/>
191 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="gtk-go-forward"/>
192 <button name="ship_recreate" states="shipping_except" string="Recreate Procurement" icon="gtk-execute"/>
193 <button name="ship_corrected" states="shipping_except" string="Procurement Corrected" icon="gtk-go-forward"/>
194 <button name="manual_invoice" states="manual" string="Create Invoice" icon="gtk-execute"/>
195 <button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/>
196 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
197 <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/>
198 <button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>
199 <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/>
202 <page string="Other data">
203 <field groups="base.group_extended" name="incoterm"/>
204 <field groups="base.group_extended" name="picking_policy" required="True"/>
205 <field name="user_id"/>
206 <field name="order_policy" on_change="shipping_policy_change(order_policy)"/>
207 <field groups="base.group_extended" name="origin"/>
208 <field groups="base.group_extended" name="invoice_quantity" attrs="{'readonly':[('order_policy','=','prepaid'),('order_policy','=','picking')]}"/>
209 <field name="payment_term"/>
210 <field name="fiscal_position" groups="base.group_extended"/>
211 <separator colspan="4" string="Notes"/>
212 <field colspan="4" name="note" nolabel="1"/>
214 <page string="History">
215 <separator colspan="4" string="Related invoices"/>
216 <field colspan="4" name="invoice_ids" nolabel="1"/>
217 <field colspan="4" name="picking_ids" nolabel="1"/>
223 <record id="action_order_form" model="ir.actions.act_window">
224 <field name="name">Sales Orders</field>
225 <field name="type">ir.actions.act_window</field>
226 <field name="res_model">sale.order</field>
227 <field name="view_type">form</field>
228 <field name="view_mode">tree,form,calendar,graph</field>
230 <menuitem action="action_order_form" id="menu_sale_order" parent="sale.menu_sale_root"/>
232 <record id="action_order_tree" model="ir.actions.act_window">
233 <field name="name">My Sales Order</field>
234 <field name="type">ir.actions.act_window</field>
235 <field name="res_model">sale.order</field>
236 <field name="view_type">form</field>
237 <field name="view_mode">tree,form,calendar,graph</field>
238 <field name="domain">[('user_id','=',uid)]</field>
241 <menuitem action="action_order_tree" id="menu_action_order_tree" parent="sale.menu_sale_order"/>
244 <record id="action_order_tree_all" model="ir.actions.act_window">
245 <field name="name">All Sales Order</field>
246 <field name="type">ir.actions.act_window</field>
247 <field name="res_model">sale.order</field>
248 <field name="view_type">form</field>
249 <field name="view_mode">tree,form,calendar,graph</field>
251 <menuitem action="action_order_tree_all" id="menu_action_order_tree_all" parent="sale.menu_sale_order"/>
253 <record id="action_order_tree_new" model="ir.actions.act_window">
254 <field name="name">New Quotation</field>
255 <field name="type">ir.actions.act_window</field>
256 <field name="res_model">sale.order</field>
257 <field name="view_type">form</field>
258 <field name="view_mode">form,tree,calendar,graph</field>
260 <menuitem action="action_order_tree_new" id="menu_action_order_tree_new" parent="sale.menu_sale_order"/>
263 <record id="action_order_tree2" model="ir.actions.act_window">
264 <field name="name">Sales in Exception</field>
265 <field name="type">ir.actions.act_window</field>
266 <field name="res_model">sale.order</field>
267 <field name="view_type">form</field>
268 <field name="view_mode">tree,form,calendar,graph</field>
269 <field name="domain">[('state','in',('shipping_except','invoice_except'))]</field>
271 <menuitem action="action_order_tree2" id="menu_action_order_tree2" parent="menu_action_order_tree_all"/>
273 <record id="action_order_tree3" model="ir.actions.act_window">
274 <field name="name">Sales Order To Be Invoiced</field>
275 <field name="type">ir.actions.act_window</field>
276 <field name="res_model">sale.order</field>
277 <field name="view_type">form</field>
278 <field name="view_mode">tree,form,calendar,graph</field>
279 <field name="domain">[('state','=','manual')]</field>
281 <menuitem action="action_order_tree3" id="menu_action_order_tree3" parent="sale.menu_action_order_tree_all"/>
283 <record id="action_order_tree4" model="ir.actions.act_window">
284 <field name="name">Sales Order in Progress</field>
285 <field name="type">ir.actions.act_window</field>
286 <field name="res_model">sale.order</field>
287 <field name="view_type">form</field>
288 <field name="view_mode">tree,form,calendar,graph</field>
289 <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
291 <menuitem action="action_order_tree4" id="menu_action_order_tree4" parent="sale.menu_action_order_tree_all" sequence="2"/>
294 <record id="action_order_tree5" model="ir.actions.act_window">
295 <field name="name">All Quotations</field>
296 <field name="type">ir.actions.act_window</field>
297 <field name="res_model">sale.order</field>
298 <field name="view_type">form</field>
299 <field name="view_mode">tree,form,calendar,graph</field>
300 <field name="domain">[('state','=','draft')]</field>
302 <menuitem action="action_order_tree5" id="menu_action_order_tree5" parent="sale.menu_action_order_tree_all" sequence="1"/>
304 <record id="action_order_tree7" model="ir.actions.act_window">
305 <field name="name">My sales in shipping exception</field>
306 <field name="type">ir.actions.act_window</field>
307 <field name="res_model">sale.order</field>
308 <field name="view_type">form</field>
309 <field name="view_mode">tree,form,calendar,graph</field>
310 <field name="domain">[('state','in',('shipping_except','invoice_except')),('user_id','=',uid)]</field>
312 <menuitem action="action_order_tree7" id="menu_action_order_tree7" parent="menu_action_order_tree"/>
314 <record id="action_order_tree8" model="ir.actions.act_window">
315 <field name="name">My sales order waiting Invoice</field>
316 <field name="type">ir.actions.act_window</field>
317 <field name="res_model">sale.order</field>
318 <field name="view_type">form</field>
319 <field name="view_mode">tree,form,calendar,graph</field>
320 <field name="domain">[('state','=','manual'),('user_id','=',uid)]</field>
322 <menuitem action="action_order_tree8" id="menu_action_order_tree8" parent="sale.menu_action_order_tree"/>
324 <record id="action_order_tree9" model="ir.actions.act_window">
325 <field name="name">My sales order in progress</field>
326 <field name="type">ir.actions.act_window</field>
327 <field name="res_model">sale.order</field>
328 <field name="view_type">form</field>
329 <field name="view_mode">tree,form,calendar,graph</field>
330 <field name="domain">[('state','in',('progress','waiting_date','manual')),('user_id','=',uid)]</field>
332 <menuitem action="action_order_tree9" id="menu_action_order_tree9" parent="sale.menu_action_order_tree" sequence="2"/>
335 <record id="action_order_tree10" model="ir.actions.act_window">
336 <field name="name">My Quotations</field>
337 <field name="type">ir.actions.act_window</field>
338 <field name="res_model">sale.order</field>
339 <field name="view_type">form</field>
340 <field name="view_mode">tree,form,calendar,graph</field>
341 <field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
343 <menuitem action="action_order_tree10" id="menu_action_order_tree10" parent="sale.menu_action_order_tree" sequence="1"/>
346 <record id="view_order_line_graph" model="ir.ui.view">
347 <field name="name">sale.order.line.graph</field>
348 <field name="model">sale.order.line</field>
349 <field name="type">graph</field>
350 <field name="arch" type="xml">
351 <graph string="Sales order lines">
352 <field name="product_id"/>
353 <field name="price_subtotal" operator="+"/>
359 <record id="view_order_line_tree" model="ir.ui.view">
360 <field name="name">sale.order.line.tree</field>
361 <field name="model">sale.order.line</field>
362 <field name="type">tree</field>
363 <field name="arch" type="xml">
364 <tree string="Sales order lines">
365 <field name="order_id"/>
366 <field name="order_partner_id"/>
368 <field name="product_id"/>
369 <field name="product_uom_qty" string="Qty"/>
370 <field name="product_uom" string="UoM"/>
371 <field name="discount"/>
372 <field name="price_unit"/>
373 <field name="price_net"/>
374 <field name="price_subtotal"/>
375 <field name="th_weight"/>
376 <field name="state"/>
380 <record id="view_order_line_form2" model="ir.ui.view">
381 <field name="name">sale.order.line.form2</field>
382 <field name="model">sale.order.line</field>
383 <field name="type">form</field>
384 <field name="arch" type="xml">
385 <form string="Sales Order Lines">
387 <page string="Order Lines">
388 <separator colspan="4" string="Automatic Declaration"/>
389 <field name="order_id" select="1"/>
390 <field name="order_partner_id" readonly="1" select="1" invisible="1"/>
391 <field name="product_uom_qty" readonly="1" select="2"/>
392 <field name="product_uom" readonly="2"/>
393 <field name="product_id" readonly="1" select="1"/>
394 <field name="invoiced" select="2"/>
396 <separator colspan="4" string="Manual Designation"/>
397 <field colspan="4" name="name" select="2"/>
398 <field name="price_unit" select="2"/>
399 <field name="discount"/>
401 <field name="delay" select="2"/>
402 <field name="price_subtotal"/>
403 <field name="th_weight"/>
404 <field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
405 <separator colspan="4" string="States"/>
406 <field name="state" select="2"/>
407 <group col="2" colspan="2">
408 <button name="button_done" states="confirmed,exception" string="Done" type="object"/>
409 <button name="button_cancel" states="confirmed,exception" string="Cancel" type="object"/>
412 <page string="Properties">
413 <field name="property_ids" nolabel="1"/>
415 <page string="Notes">
416 <field colspan="4" name="notes" nolabel="1"/>
418 <page string="Invoice Lines">
419 <field colspan="4" name="invoice_lines" nolabel="1"/>
427 <record id="action_order_line_tree1" model="ir.actions.act_window">
428 <field name="name">Sales Order Lines</field>
429 <field name="type">ir.actions.act_window</field>
430 <field name="res_model">sale.order.line</field>
431 <field name="view_type">form</field>
432 <field name="view_id" eval="False"/>
434 <menuitem action="action_order_line_tree1" id="menu_action_order_line_tree1" parent="sale.menu_sale_root"
435 groups="base.group_extended"/>
437 <record id="action_order_line_tree2" model="ir.actions.act_window">
438 <field name="name">Uninvoiced Lines</field>
439 <field name="type">ir.actions.act_window</field>
440 <field name="res_model">sale.order.line</field>
441 <field name="view_type">form</field>
442 <field name="view_mode">tree,form,graph</field>
443 <field name="domain">[('invoiced','<>', 1),('state','<>','draft'),('state','<>','cancel')]</field>
445 <menuitem action="action_order_line_tree2" id="menu_action_order_line_tree2" parent="sale.menu_action_order_line_tree1"/>
447 <record id="action_order_line_tree3" model="ir.actions.act_window">
448 <field name="name">Uninvoiced and Delivered Lines</field>
449 <field name="type">ir.actions.act_window</field>
450 <field name="res_model">sale.order.line</field>
451 <field name="view_type">form</field>
452 <field name="view_mode">tree,form,graph</field>
453 <field name="domain">[('invoiced','<>', 1),('state','=','done')]</field>
455 <menuitem action="action_order_line_tree3" id="menu_action_order_line_tree3" parent="sale.menu_action_order_line_tree2"/>
457 <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"/>
459 <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"/>
461 <!-- configartion view -->
463 <record id="view_config_picking_policy" model="ir.ui.view">
464 <field name="name">Configure Picking Policy for Sale Order </field>
465 <field name="model">sale.config.picking_policy</field>
466 <field name="type">form</field>
467 <field name="arch" type="xml">
468 <form string="Sales Configuration">
469 <separator colspan="4" string="Configure Sale Order Logistic"/>
471 <field name="picking_policy"/>
473 <field name="order_policy"/>
476 <separator string="" colspan="4"/>
477 <group col="4" colspan="4">
478 <button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/>
479 <button icon="gtk-ok" name="set_default" string="Set Default" type="object"/>
485 <record id="action_config_picking_policy" model="ir.actions.act_window">
486 <field name="name">Configure Picking Policy for Sale Order</field>
487 <field name="type">ir.actions.act_window</field>
488 <field name="res_model">sale.config.picking_policy</field>
489 <field name="view_type">form</field>
490 <field name="view_mode">form</field>
491 <field name="target">new</field>
494 <!-- register configuration wizard -->
495 <record id="config_wizard_step_sale_picking_policy" model="ir.actions.todo">
496 <field name="name">Select the default picking policy for Sale Order</field>
497 <field name="note">This Configuration step use to set default picking policy when make sale order</field>
498 <field name="action_id" ref="action_config_picking_policy"/>