6 <menuitem name="Point of Sale"
8 groups="group_pos_manager,group_pos_user"
11 <record model="ir.ui.view" id="view_pos_pos_form">
12 <field name="name">pos.order</field>
13 <field name="model">pos.order</field>
14 <field name="arch" type="xml">
15 <form string="Point of Sale Orders">
17 <button name="%(action_pos_payment)d" string="Payment" class="oe_highlight" type="action" states="draft" context="{'pos_session_id' : session_id}"/>
18 <button name="action_invoice" string="Invoice" type="object" states="paid" attrs="{'readonly': [('partner_id','=',False)]}"/>
19 <button name="refund" string="Return Products" type="object"
20 attrs="{'invisible':[('state','=','draft')]}"/>
21 <button name="%(action_report_pos_receipt)d" string="Reprint" type="action" states="paid,done,invoiced"/>
22 <field name="state" widget="statusbar" statusbar_visible="draft,paid,done" statusbar_colors='{"cancel":"red"}'/>
25 <group col="4" colspan="4">
27 <field name="date_order"/>
28 <field name="session_id" required="1"/>
29 <field name="partner_id" on_change="onchange_partner_id(partner_id, context)" context="{'search_default_customer':1}" attrs="{'readonly': [('state','=','invoiced')]}"/>
31 <notebook colspan="4">
32 <page string="Products">
33 <field name="lines" colspan="4" nolabel="1">
34 <tree string="Order lines" editable="bottom">
35 <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)"/>
36 <field name="qty" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
37 <field name="price_unit" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
38 <field name="discount" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
39 <field name="price_subtotal"/>
40 <field name="price_subtotal_incl"/>
42 <form string="Order lines">
44 <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)"/>
45 <field name="qty" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
46 <field name="discount" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
47 <field name="price_unit" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
48 <field name="price_subtotal" invisible="1"/>
49 <field name="price_subtotal_incl" invisible="1"/>
50 <field name="notice"/>
54 <group class="oe_subtotal_footer oe_right" colspan="2" name="order_total">
55 <field name="amount_tax"/>
56 <div class="oe_subtotal_footer_separator oe_inline">
57 <label for="amount_total" />
58 <button name="button_dummy"
59 states="draft" string="(update)" class="oe_edit_only oe_link"/>
61 <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator"/>
64 <page string="Payments">
65 <field name="statement_ids" colspan="4" nolabel="1">
66 <tree editable="bottom" string="Statement lines">
67 <field name="journal_id"/>
68 <field name="statement_id"/>
69 <field name="amount"/>
73 <page string="Extra Info">
74 <group string="General Information">
75 <field name="company_id" groups="base.group_multi_company"/>
76 <field name="location_id" widget="selection" groups="stock.group_locations"/>
77 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'point_of_sale.group_pos_user']}"/>
78 <field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]"/>
79 <field name="picking_id" readonly="1"/>
80 <field name="pos_reference"/>
82 <group string="Accounting Information">
83 <field name="sale_journal" domain="[('type','=','sale')]"/>
84 <field name="invoice_id" readonly="1"
85 attrs="{'invisible':[('state','<>','invoiced')]}"/>
86 <button name="%(pos_invoice_report)d" string="Re-Print"
87 icon="gtk-print" type="action" attrs="{'invisible':[('state','<>','invoiced')]}"/>
88 <field name="account_move" readonly="1"
89 attrs="{'invisible':[('state','<>','done')]}"/>
92 <page string="Notes" >
100 <record model="ir.actions.act_window" id="action_pos_pos_form">
101 <field name="name">Orders</field>
102 <field name="type">ir.actions.act_window</field>
103 <field name="res_model">pos.order</field>
104 <field name="view_type">form</field>
105 <field name="view_mode">tree,form</field>
106 <field name="view_id" eval="False"/>
107 <field name="domain">[]</field>
108 <field name="help" type="html">
109 <p class="oe_view_nocontent_create">
110 Click to create a new order.
112 Use this menu to browse previous orders. To record new
113 orders, you may use the menu <i>Your Session</i> for
114 the touchscreen interface.
118 <record model="ir.ui.view" id="view_pos_order_tree">
119 <field name="name">Orders</field>
120 <field name="model">pos.order</field>
121 <field name="arch" type="xml">
122 <tree string="POS Orders" colors="blue:state == 'draft';gray:state in ('done','cancel');black:state not in('done','cancel')">
124 <field name="pos_reference"/>
125 <field name="partner_id"/>
126 <field name="date_order"/>
127 <field name="user_id"/>
128 <field name="invoice_id"/>
129 <field name="amount_total" sum="Amount total"/>
130 <field name="company_id" groups="base.group_multi_company"/>
131 <field name="state"/>
132 <field name="session_id" />
136 <record id="view_pos_order_filter" model="ir.ui.view">
137 <field name="name">pos.order.list.select</field>
138 <field name="model">pos.order</field>
139 <field name="arch" type="xml">
140 <search string="Search Sales Order">
141 <field name="name" string="Sales Order"/>
142 <field name="date_order"/>
143 <field name="pos_reference"/>
144 <filter icon="terp-document-new" string="New" domain="[('state','=','draft')]"/>
145 <filter icon="gtk-apply" string="Done" domain="[('state','in',('paid','invoiced','done'))]"/>
146 <filter icon="terp-check" string="Invoiced" domain="[('state','=','invoiced')]"/>
147 <filter icon="gtk-convert" string="Posted" domain="[('state','=','done')]"/>
148 <field name="user_id"/>
149 <group expand="0" string="Group By">
150 <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
151 <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
152 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
153 <filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
159 <menuitem name="Daily Operations" id="menu_point_of_sale" parent="menu_point_root" sequence="10"/>
160 <menuitem parent="menu_point_of_sale" id="menu_point_ofsale" action="action_pos_pos_form" sequence="2" groups="group_pos_manager,group_pos_user"/>
161 <menuitem name="Products" id="menu_point_of_sale_product" parent="menu_point_root" sequence="15" />
163 <record id="product_template_action" model="ir.actions.act_window">
164 <field name="name">Products</field>
165 <field name="type">ir.actions.act_window</field>
166 <field name="res_model">product.template</field>
167 <field name="view_type">form</field>
168 <field name="view_mode">tree,form,kanban</field>
169 <field name="context" eval="{}"/>
170 <field name="domain" eval="[('available_in_pos','<>',False)]"/>
171 <field name="help" type="html">
172 <p class="oe_view_nocontent_create">
173 Click to add a new product.
175 You must define a product for everything you sell through
176 the point of sale interface.
178 Do not forget to set the price and the point of sale category
179 in which it should appear. If a product has no point of sale
180 category, you can not sell it through the point of sale
186 action="product_template_action"
187 id="menu_pos_products"
188 parent="menu_point_of_sale_product" sequence="2"/>
190 <record model="ir.ui.view" id="view_pos_order_line">
191 <field name="name">Sale lines</field>
192 <field name="model">pos.order.line</field>
193 <field name="arch" type="xml">
194 <tree string="POS Order lines">
195 <field name="product_id" readonly="1"/>
196 <field name="qty" readonly="1" sum="Total qty"/>
197 <field name="discount" readonly="1"/>
198 <field name="price_unit" readonly="1"/>
199 <field name="price_subtotal" readonly="1" sum="Sum of subtotals"/>
200 <field name="price_subtotal_incl" readonly="1" sum="Sum of subtotals"/>
201 <field name="create_date" readonly="1"/>
206 <record model="ir.ui.view" id="view_pos_order_line_form">
207 <field name="name">Sale line</field>
208 <field name="model">pos.order.line</field>
209 <field name="arch" type="xml">
210 <form string="POS Order line">
212 <field name="product_id" />
214 <field name="discount" />
215 <field name="price_unit" />
216 <field name="create_date" />
222 <record model="ir.actions.act_window" id="action_pos_order_line">
223 <field name="name">Sale line</field>
224 <field name="type">ir.actions.act_window</field>
225 <field name="res_model">pos.order.line</field>
226 <field name="view_type">form</field>
227 <field name="view_mode">tree</field>
228 <field name="view_id" ref="view_pos_order_line"/>
231 <record model="ir.actions.act_window" id="action_pos_order_line_form">
232 <field name="name">Sale line</field>
233 <field name="type">ir.actions.act_window</field>
234 <field name="res_model">pos.order.line</field>
235 <field name="view_type">form</field>
236 <field name="view_mode">form,tree</field>
237 <field name="view_id" ref="view_pos_order_line_form"/>
240 <record model="ir.actions.act_window" id="action_pos_order_line_day">
241 <field name="name">Sale line</field>
242 <field name="type">ir.actions.act_window</field>
243 <field name="res_model">pos.order.line</field>
244 <field name="view_type">form</field>
245 <field name="view_mode">tree</field>
246 <field name="view_id" ref="view_pos_order_line"/>
247 <field name="domain">[('create_date', '>=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '<=', time.strftime('%Y-%m-%d 23:59:59'))]</field>
254 <record model="ir.ui.view" id="view_pos_trans_user_form">
255 <field name="name">report.trans.pos.user.form</field>
256 <field name="model">report.transaction.pos</field>
257 <field name="arch" type="xml">
260 <field name="user_id"/>
261 <field name="journal_id"/>
262 <field name="jl_id"/>
263 <field name="date_create" widget="date"/>
264 <field name="no_trans"/>
265 <field name="amount"/>
266 <field name="invoice_id"/>
273 <record model="ir.ui.view" id="view_trans_pos_user_tree">
274 <field name="name">Sales by user</field>
275 <field name="model">report.transaction.pos</field>
276 <field name="arch" type="xml">
278 <field name="date_create" widget="date" />
279 <field name="user_id"/>
280 <field name="journal_id"/>
281 <field name="jl_id"/>
282 <field name="no_trans" sum="Total Transaction"/>
283 <field name="amount" sum="Amount total"/>
284 <field name="product_nb" />
285 <field name="invoice_id"/>
291 <record model="ir.ui.view" id="view_report_transaction_pos_calendar">
292 <field name="name">report.transaction.pos.calendar</field>
293 <field name="model">report.transaction.pos</field>
294 <field eval="2" name="priority"/>
295 <field name="arch" type="xml">
296 <calendar color="user_id" date_start="date_create" string="POS Report">
297 <field name="journal_id"/>
298 <field name="amount"/>
303 <record model="ir.ui.view" id="view_report_transaction_pos_graph">
304 <field name="name">report.transaction.pos.graph</field>
305 <field name="model">report.transaction.pos</field>
306 <field eval="2" name="priority"/>
307 <field name="arch" type="xml">
308 <graph type="bar" string="POS Report">
309 <field name="user_id" />
310 <field name="amount"/>
311 <field group="True" name="journal_id"/>
316 <record model="ir.actions.act_window" id="action_trans_pos_tree_today">
317 <field name="name">Sales by day</field>
318 <field name="res_model">report.transaction.pos</field>
319 <field name="view_type">form</field>
320 <field name="view_mode">tree,calendar,form,graph</field>
321 <field name="domain">[('date_create','=',time.strftime('%Y-%m-%d'))]</field>
325 <record model="ir.actions.act_window" id="action_trans_pos_tree_month">
326 <field name="name">Sales by month</field>
327 <field name="res_model">report.transaction.pos</field>
328 <field name="view_type">form</field>
329 <field name="view_mode">tree,calendar,form,graph</field>
330 <field name="domain">[('date_create','like',time.strftime('%Y-%m'))]</field>
334 <record model="ir.actions.act_window" id="action_trans_pos_tree">
335 <field name="name">Sales by user</field>
336 <field name="res_model">report.transaction.pos</field>
337 <field name="view_type">form</field>
338 <field name="view_mode">tree,calendar,form,graph</field>
339 <field name="view_id" ref="view_trans_pos_user_tree"/>
343 <record model="ir.ui.view" id="view_report_sales_by_user_pos_form">
344 <field name="name">report.sales.by.user.pos.form</field>
345 <field name="model">report.sales.by.user.pos</field>
346 <field name="arch" type="xml">
349 <field name="date_order" widget="date"/>
351 <field name="amount"/>
352 <field name="user_id"/>
359 <record model="ir.ui.view" id="view_report_sales_by_user_pos_tree">
360 <field name="name">report.sales.by.user.pos.tree</field>
361 <field name="model">report.sales.by.user.pos</field>
362 <field name="arch" type="xml">
364 <field name="date_order" widget="date"/>
366 <field name="amount"/>
367 <field name="user_id"/>
372 <record model="ir.ui.view" id="view_report_sales_by_user_pos_calendar">
373 <field name="name">report.sales.by.user.pos.calendar</field>
374 <field name="model">report.sales.by.user.pos</field>
375 <field eval="2" name="priority"/>
376 <field name="arch" type="xml">
377 <calendar color="user_id" date_start="date_order" string="POS Report">
379 <field name="amount" />
384 <record model="ir.ui.view" id="view_report_sales_by_user_pos_graph">
385 <field name="name">report.sales.by.user.pos.graph</field>
386 <field name="model">report.sales.by.user.pos</field>
387 <field eval="2" name="priority"/>
388 <field name="arch" type="xml">
389 <graph type="bar" string="Sales by User">
390 <field name="user_id" />
391 <field name="amount"/>
396 <record model="ir.actions.act_window" id="action_report_sales_by_user_pos_today">
397 <field name="name">Sales by User</field>
398 <field name="res_model">report.sales.by.user.pos</field>
399 <field name="view_type">form</field>
400 <field name="view_mode">tree,calendar,form,graph</field>
401 <field name="domain">[('date_order','=',time.strftime('%Y-%m-%d'))]</field>
405 <!-- Sales of user by month -->
407 <record model="ir.ui.view" id="view_report_sales_by_user_pos_month_form">
408 <field name="name">report.sales.by.user.pos.month.form</field>
409 <field name="model">report.sales.by.user.pos.month</field>
410 <field name="arch" type="xml">
413 <field name="date_order" widget="date"/>
415 <field name="amount"/>
416 <field name="user_id"/>
423 <record model="ir.ui.view" id="view_report_sales_by_user_pos_month_tree">
424 <field name="name">report.sales.by.user.pos.month.tree</field>
425 <field name="model">report.sales.by.user.pos.month</field>
426 <field name="arch" type="xml">
428 <field name="date_order" widget="date"/>
430 <field name="amount"/>
431 <field name="user_id"/>
436 <record model="ir.ui.view" id="view_report_sales_by_user_pos_month_calendar">
437 <field name="name">report.sales.by.user.pos.month.calendar</field>
438 <field name="model">report.sales.by.user.pos.month</field>
439 <field eval="2" name="priority"/>
440 <field name="arch" type="xml">
441 <calendar color="user_id" date_start="date_order" string="POS Report">
443 <field name="amount" />
448 <record model="ir.ui.view" id="view_report_sales_by_user_pos_month_graph">
449 <field name="name">report.sales.by.user.pos.month.graph</field>
450 <field name="model">report.sales.by.user.pos.month</field>
451 <field eval="2" name="priority"/>
452 <field name="arch" type="xml">
453 <graph type="bar" string="Sales by User">
454 <field name="user_id" />
455 <field name="amount"/>
461 <record model="ir.actions.act_window" id="action_report_sales_by_user_pos_month">
462 <field name="name">Sales by User Monthly</field>
463 <field name="res_model">report.sales.by.user.pos.month</field>
464 <field name="view_type">form</field>
465 <field name="view_mode">tree,calendar,form,graph</field>
466 <field name="domain">[('date_order','like',time.strftime('%Y-%m'))]</field>
471 <!-- Product Public Categories -->
472 <record id="product_pos_category_form_view" model="ir.ui.view">
473 <field name="name">pos.category.form</field>
474 <field name="model">pos.category</field>
475 <field name="arch" type="xml">
476 <form string="Pos Categories">
478 <field name="image_medium" widget='image' class="oe_avatar oe_right"/>
479 <div class="oe_left">
482 <field name="parent_id"/>
483 <field name="sequence"/>
490 <record id="product_pos_category_tree_view" model="ir.ui.view">
491 <field name="name">pos.category.tree</field>
492 <field name="model">pos.category</field>
493 <field name="field_parent" eval="False"/>
494 <field name="arch" type="xml">
495 <tree string="Product Product Categories">
496 <field name="sequence" invisible="1"/>
497 <field name="complete_name"/>
501 <record id="product_pos_category_action" model="ir.actions.act_window">
502 <field name="name">Pos Product Categories</field>
503 <field name="type">ir.actions.act_window</field>
504 <field name="res_model">pos.category</field>
505 <field name="view_type">form</field>
506 <field name="view_mode">tree,form</field>
507 <field name="view_id" eval="False"/>
508 <field name="help" type="html">
509 <p class="oe_view_nocontent_create">
510 Click to define a new category.
512 Categories are used to browse your products through the
513 touchscreen interface.
515 If you put a photo on the category, the layout of the
516 touchscreen interface will automatically. We suggest not to put
517 a photo on categories for small (1024x768) screens.
521 <menuitem action="product_pos_category_action" id="menu_product_pos_category" parent="menu_point_of_sale_product" sequence="0" />
525 <record id="product_template_form_view" model="ir.ui.view">
526 <field name="name">product.template.form.inherit</field>
527 <field name="model">product.template</field>
528 <field name="inherit_id" ref="product.product_template_form_view"/>
529 <field name="arch" type="xml">
530 <group name="website_and_pos" position="inside">
531 <group name="pos" string="Point of Sale">
532 <field name="pos_categ_id"/>
533 <field name="available_in_pos"/>
534 <field name="to_weight" />
535 <field name="income_pdt"/>
536 <field name="expense_pdt"/>
539 <field name="ean13" position="after">
540 <button colspan="2" name="edit_ean" type="object" string="Set a Custom EAN" class="oe_link oe_edit_only"/>
546 <menuitem name="Configuration" parent="menu_point_root"
547 id="menu_point_config_product" sequence="25" groups="group_pos_manager"/>
549 <record id="action_account_journal_form" model="ir.actions.act_window">
550 <field name="name">Payment Methods</field>
551 <field name="res_model">account.journal</field>
552 <field name="view_type">form</field>
553 <field name="view_mode">tree,form</field>
554 <field name="context" eval="{'default_journal_user': 1, 'default_type': 'cash'}"/>
555 <field name="domain">[('journal_user','=', 1)]</field>
556 <field name="help" type="html">
557 <p class="oe_view_nocontent_create">
558 Click to add a payment method.
560 Payment methods are defined by accounting journals having the
561 field <i>PoS Payment Method</i> checked. In order to be useable
562 from the touchscreen interface, you must set the payment method
563 on the <i>Point of Sale</i> configuration.
568 <menuitem action="action_account_journal_form"
569 id="menu_action_account_journal_form_open"
570 parent="menu_point_config_product"
573 <record model="ir.ui.view" id="view_pos_order_tree_all_sales_lines">
574 <field name="name">POS Sales Lines</field>
575 <field name="model">pos.order.line</field>
576 <field name="arch" type="xml">
577 <tree string="POS Orders lines">
578 <field name="order_id" />
579 <field name="create_date" />
580 <field name="product_id" />
582 <field name="price_unit" />
586 <record model="ir.actions.act_window" id="action_pos_all_sales_lines">
587 <field name="name">All sales lines</field>
588 <field name="type">ir.actions.act_window</field>
589 <field name="res_model">pos.order.line</field>
590 <field name="view_type">form</field>
591 <field name="view_id" ref="view_pos_order_tree_all_sales_lines" />
594 <!-- Miscellaneous Operations/Reporting -->
595 <menuitem name="Point of Sale" parent="base.menu_reporting" id="menu_point_rep" sequence="50" groups="group_pos_manager"/>
598 <record model="ir.actions.act_window" id="action_pos_invoice">
599 <field name="name">Invoices</field>
600 <field name="type">ir.actions.act_window</field>
601 <field name="res_model">account.invoice</field>
602 <field name="view_type">form</field>
603 <field name="view_mode">tree,form</field>
604 <field name="domain">[('origin','like','POS')]</field>
607 <menuitem icon="STOCK_PRINT" action="action_report_pos_details"
608 id="menu_pos_details" parent="menu_point_rep" sequence="6" />
610 <record model="ir.actions.act_url" id="action_pos_pos">
611 <field name="name">Start Point of Sale</field>
612 <field name="url">/pos/web/</field>
613 <field name="target">self</field>
616 <!-- Top menu item -->
617 <record model="ir.ui.view" id="view_pos_config_form">
618 <field name="name">pos.config.form.view</field>
619 <field name="model">pos.config</field>
620 <field name="arch" type="xml">
621 <form string="Point of Sale Configuration">
623 <button string="Set to Active" name="set_active" type="object" states="inactive,deprecated"/>
624 <button string="Set to Inactive" name="set_inactive" type="object" states="active" />
625 <button string="Set to Deprecated" name="set_deprecate" type="object" states="active,inactive" />
626 <div class="oe_right">
627 <field name="state" widget="statusbar" statusbar_visible="active,inactive,deprecated" statusbar_colors='{"deprecated" : "red"}' nolabel="1"/>
631 <label for="name" class="oe_edit_only"/>
636 <field name="picking_type_id" widget="selection" groups="stock.group_locations"
637 on_change="onchange_picking_type_id(picking_type_id)"/>
638 <field name="stock_location_id" groups="stock.group_locations"/>
639 <field name="pricelist_id" groups="product.group_sale_pricelist"/>
640 <field name="currency_id" invisible="1"/>
641 <field name="journal_id" widget="selection"/>
642 <field name="group_by" groups="account.group_account_user"/>
643 <field name="sequence_id" readonly="1" groups="base.group_no_one"/>
645 <separator string="Available Payment Methods" colspan="4"/>
646 <field name="journal_ids" colspan="4" nolabel="1">
647 <tree string="Journals">
648 <field name="code" />
649 <field name="name" />
650 <field name="type" />
651 <field name="cash_control" />
654 <group string="Features" >
656 <field name="iface_vkeyboard" />
657 <field name="iface_invoicing" />
660 <field name="iface_big_scrollbars" />
663 <group string="Hardware Proxy" >
664 <field name="proxy_ip" />
665 <field name="iface_print_via_proxy" />
666 <field name="iface_scan_via_proxy" />
667 <field name="iface_electronic_scale" />
668 <field name="iface_cashdrawer" />
670 <group string="Receipt" >
671 <field name="receipt_header" placeholder="A custom receipt header message"/>
672 <field name="receipt_footer" placeholder="A custom receipt header footage"/>
674 <group string="Barcode Types" col="4">
675 <field name="barcode_product" />
676 <field name="barcode_cashier" />
677 <field name="barcode_customer" />
678 <field name="barcode_weight" />
679 <field name="barcode_discount" />
680 <field name="barcode_price" />
687 <record model="ir.ui.view" id="view_pos_config_tree">
688 <field name="name">pos.config.tree.view</field>
689 <field name="model">pos.config</field>
690 <field name="arch" type="xml">
691 <tree string="Point of Sale Configuration" colors="grey:state == 'inactive'">
692 <field name="name" />
693 <field name="stock_location_id" groups="stock.group_locations"/>
694 <field name="state" />
699 <record model="ir.ui.view" id="view_pos_config_search">
700 <field name="name">pos.config.search.view</field>
701 <field name="model">pos.config</field>
702 <field name="arch" type="xml">
703 <search string="Point of Sale Config">
704 <field name="name" />
705 <filter string="Active" domain="[('state', '=', 'active')]" />
706 <filter string="Inactive" domain="[('state', '=', 'inactive')]" />
707 <field name="stock_location_id" groups="stock.group_locations" />
715 id="act_pos_config_sessions"
717 src_model="pos.config"
718 res_model="pos.session"
719 domain="[('config_id', '=', active_id)]" />
721 <record model="ir.actions.act_window" id="action_pos_config_pos">
722 <field name="name">Point of Sales</field>
723 <field name="type">ir.actions.act_window</field>
724 <field name="res_model">pos.config</field>
725 <field name="view_type">form</field>
726 <field name="view_mode">tree,form</field>
727 <field name="search_view_id" ref="view_pos_config_search" />
731 parent="menu_point_config_product"
732 action="action_pos_config_pos"
733 id="menu_pos_config_pos"
734 groups="group_pos_manager"/>
737 id="act_pos_session_orders"
739 src_model="pos.session"
740 res_model="pos.order"
741 context="{'search_default_session_id': active_id, 'default_session_id' : active_id }" />
745 <record model="ir.ui.view" id="view_pos_session_form">
746 <field name="name">pos.session.form.view</field>
747 <field name="model">pos.session</field>
748 <field name="arch" type="xml">
749 <form string="Point of Sale Session">
751 <button name="open_cb" type="object" string="Validate & Open Session" states="opening_control" class="oe_highlight"/>
752 <button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"
753 class="oe_highlight"/>
754 <button name="cashbox_control" type="workflow" string="End of Session"
755 attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', '!=', 'opened')]}"
756 class="oe_highlight" />
757 <button name="close" type="workflow" string="Validate Closing & Post Entries"
758 attrs="{'invisible' : ['|', ('cash_control', '=', True),('state', '!=', 'opened')]}"
759 class="oe_highlight" />
760 <button name="close" type="workflow" string="Validate Closing & Post Entries" states="closing_control"
761 class="oe_highlight" />
763 <field name="state" widget="statusbar" statusbar_visible="opening_control,opened,closing_control,closed" nolabel="1" />
767 <div class="oe_right oe_button_box">
768 <button class="oe_stat_button" name="%(action_pos_box_in)d"
769 type="action" states="opened,closing_control" icon="fa-level-down">
770 <div>Put<br/>Money In</div>
772 <button class="oe_stat_button" name="%(action_pos_box_out)d"
773 type="action" states="opened,closing_control" icon="fa-level-up">
774 <div>Take<br/>Money Out</div>
777 <h1 class="oe_title">
779 <field name="name" attrs="{'invisible': [('name','=','/')]}" class="oe_inline"/>
782 <field name="cash_control" invisible="1" />
784 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'point_of_sale.group_pos_manager', 'base.group_sale_manager']}"/>
785 <field name="currency_id" invisible="1"/>
786 <field name="config_id"/>
789 <field name="start_at" attrs="{'invisible' : [('state', '=', 'opening_control')]}"/>
790 <field name="stop_at" attrs="{'invisible' : [('state', '!=', 'closed')]}"/>
793 <group string="Opening Cash Control" attrs="{'invisible' : [('cash_control', '=', False)]}">
794 <field name="opening_details_ids" nolabel="1" colspan="2" attrs="{'readonly' : [('state', '!=', 'opening_control')]}">
795 <tree string="Opening Cashbox Lines" editable="bottom">
796 <field name="pieces" readonly="1" />
797 <field name="number_opening" on_change="on_change_sub_opening(pieces, number_opening)" />
798 <field name="subtotal_opening" string="Opening Subtotal" sum="Total"/>
802 <group string="Closing Cash Control" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', '=', 'opening_control')]}">
803 <field name="details_ids" nolabel="1" colspan="2" attrs="{'readonly' : [('state', '=', 'closed')]}">
804 <tree string="Cashbox Lines" editable="bottom">
805 <field name="pieces" readonly="1" />
806 <field name="number_closing" on_change="on_change_sub_closing(pieces, number_closing)"/>
807 <field name="subtotal_closing" string="Closing Subtotal" sum="Total"/>
812 <div attrs="{'invisible' : [('cash_control', '=', False)]}">
813 <group class="oe_subtotal_footer oe_right">
814 <field name="cash_register_balance_start" readonly="1" string="Opening Balance" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
815 <label for="cash_register_total_entry_encoding" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="+ Transactions" class="oe_force_bold oe_opening_total"/>
816 <field name="cash_register_total_entry_encoding" nolabel="1" attrs="{'invisible' : [('state', '=', 'opening_control')]}" class="oe_bold oe_pos_total" widget="monetary" options="{'currency_field': 'currency_id'}"/>
817 <label for="cash_register_balance_end" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="= Theoretical Closing Balance" class="oe_force_bold oe_opening_total"/>
818 <field name="cash_register_balance_end" nolabel="1" attrs="{'invisible' : [('state', '=', 'opening_control')]}" class="oe_bold oe_pos_total" widget="monetary" options="{'currency_field': 'currency_id'}"/>
820 <div class="oe_clear"/>
821 <div attrs="{'invisible' : ['|', ('cash_journal_id', '=', False), ('state', '!=', 'opening_control')]}" class="oe_view_nocontent" groups="point_of_sale.group_pos_manager">
822 <p class="oe_view_nocontent_create">
823 You can define another list of available currencies on the
824 <i>Cash Registers</i> tab of the <b><field name="cash_journal_id" class="oe_inline"/></b>
830 <group class="oe_subtotal_footer oe_right" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', '=', 'opening_control')]}">
831 <field name="cash_register_balance_end_real" string="Real Closing Balance" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/>
835 <group class="oe_subtotal_footer oe_right" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', '=', 'opening_control')]}">
836 <field name="cash_register_difference" class="oe_subtotal_footer_separator oe_right oe_pos_total oe_pos_difference" widget="monetary" options="{'currency_field': 'currency_id'}"/>
840 <separator string="Summary by Payment Methods" attrs="{'invisible' : [('state', '=', 'opening_control')]}"/>
841 <field name="statement_ids" attrs="{'invisible' : [('state', '=', 'opening_control')]}">
842 <tree string="Statements">
843 <field name="name" />
844 <field name="journal_id" />
845 <field name="balance_start" />
846 <field name="total_entry_encoding" />
847 <field name="balance_end_real" />
848 <field name="difference" />
849 <field name="currency" groups="base.group_multi_currency" />
850 <field name="state" />
859 <record model="ir.ui.view" id="view_pos_session_tree">
860 <field name="name">pos.session.tree.view</field>
861 <field name="model">pos.session</field>
862 <field name="arch" type="xml">
863 <tree string="Point of Sale Session">
864 <field name="config_id" />
865 <field name="name" />
866 <field name="user_id" />
867 <field name="start_at" />
868 <field name="stop_at" />
869 <field name="state" />
874 <record model="ir.ui.view" id="view_pos_session_search">
875 <field name="name">pos.session.search.view</field>
876 <field name="model">pos.session</field>
877 <field name="arch" type="xml">
878 <search string="Point of Sale Session">
879 <field name="name" />
880 <filter string="Open" domain="[('state', '=', 'opened')]" />
882 <filter string="Today" domain="[('start_at', '>=', time.strftime('%%Y-%%m-%%d 00:00:00'))]" />
883 <field name="config_id" />
884 <field name="user_id" />
885 <group expand="0" string="Group By">
886 <filter string="User" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" />
887 <filter string="Point of Sales" domain="[]" context="{'group_by': 'user_id'}" />
894 <record model="ir.actions.act_window" id="action_pos_session">
895 <field name="name">All Sessions</field>
896 <field name="type">ir.actions.act_window</field>
897 <field name="res_model">pos.session</field>
898 <field name="view_type">form</field>
899 <field name="view_mode">tree,form</field>
900 <field name="search_view_id" ref="view_pos_session_search" />
901 <field name="help" type="html">
902 <p class="oe_view_nocontent_create">
903 Click to start a new session.
905 A session is a period of time, usually one day, during which
906 you sell through the point of sale. The user has to check the
907 currencies in your cash registers at the beginning and the end
910 Note that you may use the menu <i>Your Session</i>
911 to quickly open a new session.
917 parent="menu_point_of_sale"
918 action="action_pos_session"
919 id="menu_pos_session_all"
921 groups="group_pos_manager"/>
923 <record id="view_pos_order_filter" model="ir.ui.view">
924 <field name="name">pos.order.list.select</field>
925 <field name="model">pos.order</field>
926 <field name="arch" type="xml">
927 <search string="Search Sales Order">
929 <field name="date_order"/>
930 <filter icon="terp-document-new" string="New" domain="[('state','=','draft')]"/>
931 <filter icon="gtk-apply" string="Done" domain="[('state','in',('paid','invoiced','done'))]"/>
932 <filter icon="terp-check" string="Invoiced" domain="[('state','=','invoiced')]"/>
933 <filter icon="gtk-convert" string="Posted" domain="[('state','=','done')]"/>
934 <field name="user_id"/>
935 <field name="session_id"/>
936 <group expand="0" string="Group By">
937 <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
938 <filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
939 <filter string="Session" icon="terp-personal" domain="[]" context="{'group_by':'session_id'}"/>
940 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
941 <filter string="Order Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
947 <menuitem action="action_pos_session_opening"
948 parent="menu_point_of_sale"
949 id="menu_pos_session_opening" sequence="0"/>
951 <record model="ir.ui.view" id="pos_ean13_generator">
952 <field name="name">pos.ean_wizard</field>
953 <field name="model">pos.ean_wizard</field>
954 <field name="arch" type="xml">
955 <form string="Ean13 Generator">
957 Enter a reference, it will be converted
958 automatically to a valid EAN number.
961 <field name="ean13_pattern" class="oe_inline"/>
964 <button name="sanitize_ean13" type="object" string="Apply" class="oe_highlight"/> or
965 <button icon="gtk-stop" special="cancel"
966 string="Cancel" class="oe_link"/>