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_mode">tree,form</field>
43 <field name="view_id" ref="view_shop_tree"/>
45 <menuitem id="menu_shop_configuration" name="Configuration" parent="sale.menu_sale_root" sequence="1"/>
46 <menuitem action="action_shop_form" id="menu_action_shop_form" parent="sale.menu_shop_configuration"/>
48 <record id="view_sale_order_calendar" model="ir.ui.view">
49 <field name="name">sale.order.calendar</field>
50 <field name="model">sale.order</field>
51 <field name="type">calendar</field>
52 <field name="arch" type="xml">
53 <calendar string="Sales orders" color="state" date_start="date_order">
54 <field name="partner_id"/>
55 <field name="amount_total"/>
59 <record model="ir.ui.view" id="view_sale_order_graph">
60 <field name="name">sale.order.graph</field>
61 <field name="model">sale.order</field>
62 <field name="type">graph</field>
63 <field name="arch" type="xml">
64 <graph string="Sales orders" type="bar">
65 <field name="partner_id"/>
66 <field name="amount_total" operator="+"/>
71 <record id="view_order_tree" model="ir.ui.view">
72 <field name="name">sale.order.tree</field>
73 <field name="model">sale.order</field>
74 <field name="type">tree</field>
75 <field name="arch" type="xml">
76 <tree string="Sales orders">
77 <field name="date_order"/>
78 <field name="name" string="Reference"/>
79 <field name="partner_id"/>
80 <field name="partner_shipping_id"/>
81 <field name="picked_rate" widget="progressbar"/>
82 <field name="invoiced_rate" widget="progressbar"/>
83 <field name="amount_untaxed"/>
89 <record id="view_order_form" model="ir.ui.view">
90 <field name="name">sale.order.form</field>
91 <field name="model">sale.order</field>
92 <field name="type">form</field>
93 <field name="arch" type="xml">
94 <form string="Sales order">
95 <group col="6" colspan="4">
96 <field name="name" select="1"/>
97 <field name="client_order_ref" select="2"/>
98 <field name="shipped" select="2"/>
99 <field name="shop_id" on_change="onchange_shop_id(shop_id)" select="2"/>
100 <field name="date_order" select="1"/>
101 <field name="invoiced" select="2"/>
103 <notebook colspan="4">
104 <page string="Sale Order">
105 <field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1" select="1"/>
106 <field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>
107 <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id"/>
108 <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id"/>
109 <field domain="[('type','=','sale')]" name="pricelist_id"/>
110 <field name="project_id" select="2"/>
112 <field colspan="4" mode="tree,graph" name="order_line" nolabel="1" widget="one2many_list">
113 <form string="Sale Order Lines">
115 <page string="Order Line">
116 <separator colspan="4" string="Automatic Declaration"/>
118 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
120 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)"
123 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
124 name="product_uom_qty"
125 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)"
127 <field name="product_uom"
128 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)"/>
130 name="product_packaging"
131 context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
132 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)"
133 domain="[('product_id','=',product_id)]"
134 groups="base.group_extended"/>
135 <separator colspan="4" string="Manual Description"/>
136 <field colspan="4" name="name" select="2"/>
137 <field name="price_unit" select="2"/>
138 <field name="discount"/>
140 <field name="delay" select="2"/>
142 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]"/>
143 <separator colspan="4" string="States"/>
144 <field name="state" select="2"/>
145 <group col="3" colspan="2">
146 <field name="invoiced" select="2"/>
147 <button colspan="1" name="%(wizard_sale_order_line_invoice)d" states="confirmed" string="Make Invoice" type="action"/>
150 <page groups="base.group_extended" string="Extra Info">
151 <field groups="product.group_uos" name="product_uos_qty" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
152 <field groups="product.group_uos" name="product_uos"/>
153 <field name="address_allotment_id" select="2"/>
154 <separator colspan="4" string="Properties"/>
155 <field colspan="4" name="property_ids" nolabel="1"/>
157 <page string="Notes">
158 <field colspan="4" name="notes" nolabel="1"/>
160 <page string="History" groups="base.group_extended">
161 <separator colspan="4" string="Invoice Lines"/>
162 <field colspan="4" name="invoice_lines" nolabel="1"/>
163 <separator colspan="4" string="Stock Moves"/>
164 <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/>
168 <tree string="Sales order lines">
169 <field colspan="4" name="name"/>
170 <field name="product_uom_qty" string="Qty"/>
171 <field name="product_uom" string="UoM"/>
172 <field name="discount"/>
173 <field name="price_unit"/>
174 <field name="price_net"/>
175 <field name="price_subtotal"/>
179 <group col="7" colspan="4">
180 <field name="amount_untaxed" sum="Untaxed amount"/>
181 <field name="amount_tax"/>
182 <field name="amount_total" sum="Total amount"/>
183 <button name="button_dummy" states="draft" string="Compute" type="object"/>
185 <group col="13" colspan="4">
186 <field name="state" select="2"/>
187 <button name="order_confirm" states="draft" string="Confirm Order"/>
188 <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice"/>
189 <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected"/>
190 <button name="ship_recreate" states="shipping_except" string="Recreate Procurement"/>
191 <button name="ship_corrected" states="shipping_except" string="Procurement Corrected"/>
192 <button name="manual_invoice" states="manual" string="Create Invoice"/>
193 <button name="ship_cancel" states="shipping_except" string="Cancel Order"/>
194 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
195 <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object"/>
196 <button name="cancel" states="draft" string="Cancel Order"/>
197 <button name="invoice_cancel" states="invoice_except" string="Cancel Order"/>
200 <page string="Other data">
201 <field groups="base.group_extended" name="incoterm"/>
202 <field groups="base.group_extended" name="picking_policy" required="True"/>
203 <field name="user_id"/>
204 <field name="order_policy"/>
205 <field groups="base.group_extended" name="origin"/>
206 <field groups="base.group_extended" name="invoice_quantity" attrs="{'readonly':[('order_policy','=','picking')]}"/>
207 <field name="payment_term"/>
208 <separator colspan="4" string="Notes"/>
209 <field colspan="4" name="note" nolabel="1"/>
211 <page groups="base.group_extended" string="History">
212 <separator colspan="4" string="Related invoices"/>
213 <field colspan="4" name="invoice_ids" nolabel="1"/>
214 <field colspan="4" name="picking_ids" nolabel="1"/>
220 <record id="action_order_form" model="ir.actions.act_window">
221 <field name="name">Sales Orders</field>
222 <field name="type">ir.actions.act_window</field>
223 <field name="res_model">sale.order</field>
224 <field name="view_type">form</field>
225 <field name="view_mode">tree,form,calendar,graph</field>
227 <menuitem action="action_order_form" id="menu_sale_order" parent="sale.menu_sale_root"/>
229 <record id="action_order_tree" model="ir.actions.act_window">
230 <field name="name">My Sales Order</field>
231 <field name="type">ir.actions.act_window</field>
232 <field name="res_model">sale.order</field>
233 <field name="view_type">form</field>
234 <field name="view_mode">tree,form,calendar,graph</field>
235 <field name="domain">[('user_id','=',uid)]</field>
238 <menuitem action="action_order_tree" id="menu_action_order_tree" parent="sale.menu_sale_order"/>
241 <record id="action_order_tree_all" model="ir.actions.act_window">
242 <field name="name">All Sales Order</field>
243 <field name="type">ir.actions.act_window</field>
244 <field name="res_model">sale.order</field>
245 <field name="view_type">form</field>
246 <field name="view_mode">tree,form,calendar,graph</field>
248 <menuitem action="action_order_tree_all" id="menu_action_order_tree_all" parent="sale.menu_sale_order"/>
250 <record id="action_order_tree_new" model="ir.actions.act_window">
251 <field name="name">New Quotation</field>
252 <field name="type">ir.actions.act_window</field>
253 <field name="res_model">sale.order</field>
254 <field name="view_type">form</field>
255 <field name="view_mode">form,tree,calendar,graph</field>
257 <menuitem action="action_order_tree_new" id="menu_action_order_tree_new" parent="sale.menu_sale_order"/>
260 <record id="action_order_tree2" model="ir.actions.act_window">
261 <field name="name">Sales in Exception</field>
262 <field name="type">ir.actions.act_window</field>
263 <field name="res_model">sale.order</field>
264 <field name="view_type">form</field>
265 <field name="view_mode">tree,form,calendar,graph</field>
266 <field name="domain">[('state','in',('shipping_except','invoice_except')]</field>
268 <menuitem action="action_order_tree2" id="menu_action_order_tree2" parent="menu_action_order_tree_all"/>
270 <record id="action_order_tree3" model="ir.actions.act_window">
271 <field name="name">Sales Order To Be Invoiced</field>
272 <field name="type">ir.actions.act_window</field>
273 <field name="res_model">sale.order</field>
274 <field name="view_type">form</field>
275 <field name="view_mode">tree,form,calendar,graph</field>
276 <field name="domain">[('state','=','manual')]</field>
278 <menuitem action="action_order_tree3" id="menu_action_order_tree3" parent="sale.menu_action_order_tree_all"/>
280 <record id="action_order_tree4" model="ir.actions.act_window">
281 <field name="name">Sales Order in Progress</field>
282 <field name="type">ir.actions.act_window</field>
283 <field name="res_model">sale.order</field>
284 <field name="view_type">form</field>
285 <field name="view_mode">tree,form,calendar,graph</field>
286 <field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
288 <menuitem action="action_order_tree4" id="menu_action_order_tree4" parent="sale.menu_action_order_tree_all" sequence="2"/>
291 <record id="action_order_tree5" model="ir.actions.act_window">
292 <field name="name">All Quotations</field>
293 <field name="type">ir.actions.act_window</field>
294 <field name="res_model">sale.order</field>
295 <field name="view_type">form</field>
296 <field name="view_mode">tree,form,calendar,graph</field>
297 <field name="domain">[('state','=','draft')]</field>
299 <menuitem action="action_order_tree5" id="menu_action_order_tree5" parent="sale.menu_action_order_tree_all" sequence="1"/>
301 <record id="action_order_tree7" model="ir.actions.act_window">
302 <field name="name">My sales in shipping 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')),('user_id','=',uid)]</field>
309 <menuitem action="action_order_tree7" id="menu_action_order_tree7" parent="menu_action_order_tree"/>
311 <record id="action_order_tree8" model="ir.actions.act_window">
312 <field name="name">My sales order waiting Invoice</field>
313 <field name="type">ir.actions.act_window</field>
314 <field name="res_model">sale.order</field>
315 <field name="view_type">form</field>
316 <field name="view_mode">tree,form,calendar,graph</field>
317 <field name="domain">[('state','=','manual'),('user_id','=',uid)]</field>
319 <menuitem action="action_order_tree8" id="menu_action_order_tree8" parent="sale.menu_action_order_tree"/>
321 <record id="action_order_tree9" model="ir.actions.act_window">
322 <field name="name">My sales order in progress</field>
323 <field name="type">ir.actions.act_window</field>
324 <field name="res_model">sale.order</field>
325 <field name="view_type">form</field>
326 <field name="view_mode">tree,form,calendar,graph</field>
327 <field name="domain">[('state','in',('progress','waiting_date','manual')),('user_id','=',uid)]</field>
329 <menuitem action="action_order_tree9" id="menu_action_order_tree9" parent="sale.menu_action_order_tree" sequence="2"/>
332 <record id="action_order_tree10" model="ir.actions.act_window">
333 <field name="name">My Quotations</field>
334 <field name="type">ir.actions.act_window</field>
335 <field name="res_model">sale.order</field>
336 <field name="view_type">form</field>
337 <field name="view_mode">tree,form,calendar,graph</field>
338 <field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
340 <menuitem action="action_order_tree10" id="menu_action_order_tree10" parent="sale.menu_action_order_tree" sequence="1"/>
343 <record id="view_order_line_graph" model="ir.ui.view">
344 <field name="name">sale.order.line.graph</field>
345 <field name="model">sale.order.line</field>
346 <field name="type">graph</field>
347 <field name="arch" type="xml">
348 <graph string="Sales order lines">
349 <field name="product_id"/>
350 <field name="price_unit" operator="+"/>
356 <record id="view_order_line_tree" model="ir.ui.view">
357 <field name="name">sale.order.line.tree</field>
358 <field name="model">sale.order.line</field>
359 <field name="type">tree</field>
360 <field name="arch" type="xml">
361 <tree string="Sales order lines">
362 <field name="order_id"/>
363 <field name="order_partner_id"/>
365 <field name="product_id"/>
366 <field name="product_uom_qty" string="Qty"/>
367 <field name="product_uom" string="UoM"/>
368 <field name="discount"/>
369 <field name="price_unit"/>
370 <field name="price_net"/>
371 <field name="price_subtotal"/>
372 <field name="state"/>
376 <record id="view_order_line_form2" model="ir.ui.view">
377 <field name="name">sale.order.line.form2</field>
378 <field name="model">sale.order.line</field>
379 <field name="type">form</field>
380 <field name="arch" type="xml">
381 <form string="Sales Order Lines">
383 <page string="Order Lines">
384 <separator colspan="4" string="Automatic Declaration"/>
385 <field name="order_id" select="1"/>
386 <field name="invoiced" select="2"/>
387 <field name="product_uom_qty" readonly="1" select="2"/>
388 <field name="product_uom" readonly="2"/>
389 <field name="product_id" readonly="1" select="1"/>
391 <separator colspan="4" string="Manual Designation"/>
392 <field colspan="4" name="name" select="2"/>
393 <field name="price_unit" select="2"/>
394 <field name="discount"/>
396 <field name="delay" select="2"/>
397 <field name="price_subtotal"/>
398 <field colspan="4" name="tax_id" domain="[('parent_id','=',False)]"/>
399 <separator colspan="4" string="States"/>
400 <field name="state" select="2"/>
401 <group col="2" colspan="2">
402 <button name="button_done" states="confirmed" string="Done" type="object"/>
405 <page string="Properties">
406 <field name="property_ids" nolabel="1"/>
408 <page string="Notes">
409 <field colspan="4" name="notes" nolabel="1"/>
411 <page string="Invoice Lines">
412 <field colspan="4" name="invoice_lines" nolabel="1"/>
420 <record id="action_order_line_tree1" model="ir.actions.act_window">
421 <field name="name">Sales Order Lines</field>
422 <field name="type">ir.actions.act_window</field>
423 <field name="res_model">sale.order.line</field>
424 <field name="view_type">form</field>
425 <field name="view_id" eval="False"/>
427 <menuitem action="action_order_line_tree1" id="menu_action_order_line_tree1" parent="sale.menu_sale_root"/>
429 <record id="action_order_line_tree2" model="ir.actions.act_window">
430 <field name="name">Uninvoiced lines</field>
431 <field name="type">ir.actions.act_window</field>
432 <field name="res_model">sale.order.line</field>
433 <field name="view_type">form</field>
434 <field name="view_mode">tree,form,graph</field>
435 <field name="domain">[('invoiced','<>', 1),('state','<>','draft'),('state','<>','cancel')]</field>
437 <menuitem action="action_order_line_tree2" id="menu_action_order_line_tree2" parent="sale.menu_action_order_line_tree1"/>
439 <record id="action_order_line_tree3" model="ir.actions.act_window">
440 <field name="name">Uninvoiced and Delivered Lines</field>
441 <field name="type">ir.actions.act_window</field>
442 <field name="res_model">sale.order.line</field>
443 <field name="view_type">form</field>
444 <field name="view_mode">tree,form,graph</field>
445 <field name="domain">[('invoiced','<>', 1),('state','=','done')]</field>
447 <menuitem action="action_order_line_tree3" id="menu_action_order_line_tree3" parent="sale.menu_action_order_line_tree2"/>
449 <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"/>
451 <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"/>
453 <!-- configartion view -->
455 <record id="view_config_picking_policy" model="ir.ui.view">
456 <field name="name">Configure Picking Policy for Sale Order </field>
457 <field name="model">sale.config.picking_policy</field>
458 <field name="type">form</field>
459 <field name="arch" type="xml">
460 <form string="Sales Configuration">
461 <separator colspan="4" string="Configure Sale Order Logistic"/>
463 <field name="picking_policy"/>
465 <field name="order_policy"/>
466 <group col="4" colspan="4">
467 <button icon="gtk-cancel" name="action_cancel" type="object" special="cancel" string="Cancel"/>
468 <button icon="gtk-ok" name="set_default" string="Set Default" type="object"/>
474 <record id="action_config_picking_policy" model="ir.actions.act_window">
475 <field name="name">Configure Picking Policy for Sale Order</field>
476 <field name="type">ir.actions.act_window</field>
477 <field name="res_model">sale.config.picking_policy</field>
478 <field name="view_type">form</field>
479 <field name="view_mode">form</field>
480 <field name="target">new</field>
483 <!-- register configuration wizard -->
484 <record id="config_wizard_step_sale_picking_policy" model="ir.actions.todo">
485 <field name="name">Select the default picking policy for Sale Order</field>
486 <field name="note">This Configuration step use to set default picking policy when make sale order</field>
487 <field name="action_id" ref="action_config_picking_policy"/>
488 <field name="state">open</field>