[MERGE] from master
[odoo/odoo.git] / addons / point_of_sale / point_of_sale_view.xml
index 6731cb9..8e6ea1d 100644 (file)
@@ -12,7 +12,7 @@
             <field name="name">pos.order</field>
             <field name="model">pos.order</field>
             <field name="arch" type="xml">
-                <form string="Point of Sale Orders" version="7.0">
+                <form string="Point of Sale Orders">
                     <header>
                         <button name="%(action_pos_payment)d" string="Payment" class="oe_highlight" type="action" states="draft" context="{'pos_session_id' : session_id}"/>
                         <button name="action_invoice" string="Invoice" type="object" states="paid" attrs="{'readonly': [('partner_id','=',False)]}"/>
@@ -39,7 +39,7 @@
                                     <field name="price_subtotal"/>
                                     <field name="price_subtotal_incl"/>
                                 </tree>
-                                <form string="Order lines" version="7.0">
+                                <form string="Order lines">
                                     <group col="4">
                                         <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)"/>
                                         <field name="qty" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
                                     <field name="statement_id"/>
                                     <field name="amount"/>
                                 </tree>
-                                <form string="Statement lines" version="7.0">
-                                    <group col="4">
-                                        <field name="account_id"/>
-                                        <field name="amount"/>
-                                        <field name="statement_id" domain="[('company_id','=',parent.company_id),('state','=','open')]"/>
-                                    </group>
-                                </form>
                             </field>
                         </page>
                         <page string="Extra Info">
                             <group string="General Information">
                                 <field name="company_id" groups="base.group_multi_company"/>
-                                <field name="warehouse_id" widget="selection" groups="stock.group_locations"/>
+                                <field name="location_id" widget="selection" groups="stock.group_locations"/>
                                 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'point_of_sale.group_pos_user']}"/>
                                 <field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]"/>
                                 <field name="picking_id" readonly="1"/>
               <p class="oe_view_nocontent_create">
                 Click to create a new order.
               </p><p>
-                Use this menu to browse your preceeding orders. To record new
-                orders, you should better use the menu <i>Your Session</i> for
+                Use this menu to browse previous orders. To record new
+                orders, you may use the menu <i>Your Session</i> for
                 the touchscreen interface.
               </p>
             </field>
                     <filter icon="terp-check" string="Invoiced" domain="[('state','=','invoiced')]"/>
                     <filter icon="gtk-convert" string="Posted" domain="[('state','=','done')]"/>
                     <field name="user_id"/>
-                    <group expand="0" string="Group By...">
+                    <group expand="0" string="Group By">
                         <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
                         <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
         <menuitem parent="menu_point_of_sale" id="menu_point_ofsale" action="action_pos_pos_form" sequence="2" groups="group_pos_manager,group_pos_user"/>
         <menuitem name="Products" id="menu_point_of_sale_product" parent="menu_point_root" sequence="15" />
 
-        <record id="product_normal_action" model="ir.actions.act_window">
+        <record id="product_template_action" model="ir.actions.act_window">
             <field name="name">Products</field>
             <field name="type">ir.actions.act_window</field>
-            <field name="res_model">product.product</field>
+            <field name="res_model">product.template</field>
             <field name="view_type">form</field>
             <field name="view_mode">tree,form,kanban</field>
             <field name="context" eval="{}"/>
             <field name="domain" eval="[('available_in_pos','&lt;&gt;',False)]"/>
-            <field name="view_id" ref="product.product_product_tree_view"/>
-            <field name="search_view_id" ref="product.product_search_form_view"/>
+            <field name="search_view_id" eval="False"/> <!-- Force empty -->
+            <field name="view_id" eval="False"/> <!-- Force empty -->
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">
                 Click to add a new product.
             </field>
         </record>
         <menuitem
-            action="product_normal_action"
+            action="product_template_action"
             id="menu_pos_products"
-            parent="menu_point_of_sale_product" sequence="2"/>
+            parent="menu_point_of_sale_product" sequence="0"/>
 
         <record model="ir.ui.view" id="view_pos_order_line">
             <field name="name">Sale lines</field>
             <field name="name">Sale line</field>
             <field name="model">pos.order.line</field>
             <field name="arch" type="xml">
-                <form string="POS Order line" version="7.0">
+                <form string="POS Order line">
                     <group col="4">
                         <field name="product_id" />
                         <field name="qty" />
             <field name="name">report.trans.pos.user.form</field>
             <field name="model">report.transaction.pos</field>
             <field name="arch" type="xml">
-                <form string="POS " version="7.0">
+                <form string="POS ">
                     <group col="4">
                         <field name="user_id"/>
                         <field name="journal_id"/>
             <field name="name">report.sales.by.user.pos.form</field>
             <field name="model">report.sales.by.user.pos</field>
             <field name="arch" type="xml">
-                <form string="POS " version="7.0">
+                <form string="POS ">
                     <group col="4">
                         <field name="date_order" widget="date"/>
                         <field name="qty"/>
             <field name="name">report.sales.by.user.pos.month.form</field>
             <field name="model">report.sales.by.user.pos.month</field>
             <field name="arch" type="xml">
-                <form string="POS " version="7.0">
+                <form string="POS ">
                     <group col="4">
                         <field name="date_order" widget="date"/>
                         <field name="qty"/>
             <field name="domain">[('date_order','like',time.strftime('%Y-%m'))]</field>
         </record>
 
-        <!-- Sales by margin -->
 
-        <record model="ir.ui.view" id="view_report_sales_by_margin_pos_form">
-            <field name="name">report.sales.by.margin.pos.form</field>
-            <field name="model">report.sales.by.margin.pos</field>
+
+        <!-- Product Public Categories -->
+        <record id="product_pos_category_form_view" model="ir.ui.view">
+            <field name="name">pos.category.form</field>
+            <field name="model">pos.category</field>
             <field name="arch" type="xml">
-                <form string="POS " version="7.0">
-                    <group col="4">
-                        <field name="user_id"/>
-                        <field name="product_name"/>
-                        <field name="date_order" widget="date"/>
-                        <field name="qty"/>
-                        <field name="net_margin_per_qty"/>
-                        <field name="total"/>
-                    </group>
+                <form string="Pos Categories">
+                    <sheet>
+                        <field name="image_medium" widget='image' class="oe_avatar oe_right"/>
+                        <div class="oe_left">
+                            <group>
+                                <field name="name"/>
+                                <field name="parent_id"/>
+                                <field name="sequence"/>
+                            </group>
+                        </div>
+                    </sheet>
                 </form>
             </field>
         </record>
-
-
-        <record model="ir.ui.view" id="view_report_sales_by_margin_pos_tree">
-            <field name="name">report.sales.by.margin.pos.tree</field>
-            <field name="model">report.sales.by.margin.pos</field>
+        <record id="product_pos_category_tree_view" model="ir.ui.view">
+            <field name="name">pos.category.tree</field>
+            <field name="model">pos.category</field>
+            <field name="field_parent" eval="False"/>
             <field name="arch" type="xml">
-                <tree string="POS">
-                    <field name="user_id"/>
-                    <field name="product_name"/>
-                    <field name="date_order" widget="date"/>
-                    <field name="qty"/>
-                    <field name="net_margin_per_qty"/>
-                    <field name="total"/>
+                <tree string="Product Product Categories">
+                    <field name="sequence" widget="handle"/>
+                    <field name="complete_name"/>
                 </tree>
             </field>
         </record>
-
-        <record model="ir.ui.view" id="view_report_sales_by_margin_pos_calendar">
-            <field name="name">report.sales.by.margin.pos.calendar</field>
-            <field name="model">report.sales.by.margin.pos</field>
-            <field eval="2" name="priority"/>
-            <field name="arch" type="xml">
-                <calendar color="user_id" date_start="date_order" string="Sales by User Margin">
-                    <field name="product_name"/>
-                    <field name="total" />
-                </calendar>
-            </field>
-         </record>
-
-        <record model="ir.ui.view" id="view_report_sales_by_margin_pos_graph">
-            <field name="name">report.sales.by.margin.pos.graph</field>
-            <field name="model">report.sales.by.margin.pos</field>
-            <field eval="2" name="priority"/>
-            <field name="arch" type="xml">
-                <graph  type="bar" string="Sales by User Margin" orientation="horizontal">
-                    <field name="product_name" />
-                    <field name="total" operator="+"/>
-                </graph>
+        <record id="product_pos_category_action" model="ir.actions.act_window">
+            <field name="name">Pos Product Categories</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">pos.category</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" eval="False"/>
+            <field name="help" type="html">
+              <p class="oe_view_nocontent_create">
+                Click to define a new category.
+              </p><p>
+                Categories are used to browse your products through the
+                touchscreen interface.
+              </p><p>
+                If you put a photo on the category, the layout of the
+                touchscreen interface will automatically. We suggest not to put
+                a photo on categories for small (1024x768) screens.
+              </p>
             </field>
-         </record>
+        </record>
+        <menuitem action="product_pos_category_action" id="menu_product_pos_category" parent="menu_point_of_sale_product" sequence="2" />
+        <!-- END -->
 
-        <record model="ir.actions.act_window" id="action_report_sales_by_margin_pos_today">
-            <field name="name">Sales by User Daily margin</field>
-            <field name="res_model">report.sales.by.margin.pos</field>
+        <record id="action_edit_ean" model="ir.actions.act_window">
+            <field name="name">Edit Ean</field>
+            <field name="res_model">pos.ean_wizard</field>
+            <field name="target">new</field>
             <field name="view_type">form</field>
-            <field name="view_mode">tree,calendar,form,graph</field>
-            <field name="domain">[('date_order','=',time.strftime('%Y-%m-%d'))]</field>
-         </record>
+            <field name="view_mode">form</field>
+        </record>
 
-         <record model="ir.ui.view" id="view_report_sales_by_margin_pos_month_form">
-            <field name="name">report.sales.by.margin.pos.month.form</field>
-            <field name="model">report.sales.by.margin.pos.month</field>
+        <record id="product_template_form_view" model="ir.ui.view">
+            <field name="name">product.template.form.inherit</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-                <form string="POS " version="7.0">
-                    <group col="4">
-                        <field name="user_id"/>
-                        <field name="product_name"/>
-                        <field name="date_order" widget="date"/>
-                        <field name="qty"/>
-                        <field name="net_margin_per_qty"/>
-                        <field name="total"/>
+                <group name="website_and_pos" position="inside">
+                    <group name="pos" string="Point of Sale">
+                        <field name="pos_categ_id"/>
+                        <field name="available_in_pos"/>
+                        <field name="to_weight" />
+                        <field name="income_pdt"/>
+                        <field name="expense_pdt"/>
                     </group>
-                </form>
+                </group>
             </field>
         </record>
-
-
-        <record model="ir.ui.view" id="view_report_sales_by_margin_pos_month_tree">
-            <field name="name">report.sales.by.margin.pos.month.tree</field>
-            <field name="model">report.sales.by.margin.pos.month</field>
+        <record id="product_template_form_view_inherit_ean" model="ir.ui.view">
+            <field name="name">product.template.only.form.inherit.ean</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_only_form_view"/>
             <field name="arch" type="xml">
-                <tree string="POS">
-                    <field name="user_id"/>
-                    <field name="product_name"/>
-                    <field name="date_order" widget="date"/>
-                    <field name="qty"/>
-                    <field name="net_margin_per_qty"/>
-                    <field name="total"/>
-                </tree>
+                <field name="barcode" position="after">
+                    <button colspan="2" name="%(action_edit_ean)d" type="action" string="Set a Custom EAN"
+                            attrs="{'invisible': [('product_variant_count', '>', 1)]}" class="oe_link oe_edit_only"/>
+                </field>
             </field>
         </record>
-
-        <record model="ir.ui.view" id="view_report_sales_by_margin_pos_month_calendar">
-            <field name="name">report.sales.by.margin.pos.month.calendar</field>
-            <field name="model">report.sales.by.margin.pos.month</field>
-            <field eval="2" name="priority"/>
-            <field name="arch" type="xml">
-                <calendar color="user_id" date_start="date_order" string="Sales by User Margin">
-                    <field name="product_name"/>
-                    <field name="total" />
-                </calendar>
-            </field>
-         </record>
-
-        <record model="ir.ui.view" id="view_report_sales_by_margin_pos_month_graph">
-            <field name="name">report.sales.by.margin.pos.month.graph</field>
-            <field name="model">report.sales.by.margin.pos.month</field>
-            <field eval="2" name="priority"/>
+        <record id="product_normal_form_view_inherit_ean" model="ir.ui.view">
+            <field name="name">product.form.inherit.ean</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
-                <graph  type="bar" string="Sales by User Margin" orientation="horizontal">
-                    <field name="product_name" />
-                    <field name="total" operator="+"/>
-                </graph>
+                <field name="barcode" position="after">
+                    <button colspan="2" name="%(action_edit_ean)d" type="action" string="Set a Custom EAN" class="oe_link oe_edit_only"/>
+                </field>
             </field>
-         </record>
-
-         <record model="ir.actions.act_window" id="action_report_sales_by_margin_pos_month">
-            <field name="name">Sales by User Monthly margin</field>
-            <field name="res_model">report.sales.by.margin.pos.month</field>
-            <field name="view_type">form</field>
-            <field name="view_mode">tree,calendar,form,graph</field>
-            <field name="domain">[('date_order','like',time.strftime('%Y-%m'))]</field>
         </record>
 
-        <record id="product_normal_form_view" model="ir.ui.view">
-            <field name="name">product.normal.form.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
+        <record id="product_template_tree_view" model="ir.ui.view">
+            <field name="name">product.template.tree.inherit</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_tree_view"/>
             <field name="arch" type="xml">
-                <group name="sale" position="inside">
-                    <group name="pos" string="Point of Sale">
-                        <field name="available_in_pos"/>
-                        <field name="to_weight" />
-                        <field name="income_pdt"/>
-                        <field name="expense_pdt"/>
-                    </group>
-                </group>
-                <field name="ean13" position="after">
-                    <button name="edit_ean" type="object" string="Set a Custom EAN" class="oe_link oe_edit_only"/>
+                <field name="name" position="before">
+                    <field name="sequence" widget="handle" />
                 </field>
             </field>
         </record>
 
-        <!-- Categories tree view -->
-        <menuitem action="product.product_public_category_action" id="menu_product_public_category" parent="menu_point_of_sale_product" sequence="0" />
         <!-- END -->
 
         <menuitem name="Configuration" parent="menu_point_root"
         </record>
 
         <!--  Miscellaneous Operations/Reporting -->
-        <menuitem name="Point of Sale" parent="base.menu_reporting" id="menu_point_rep" sequence="50" groups="group_pos_manager"/>
+        <menuitem name="Point of Sale" parent="base.menu_reporting" id="menu_point_rep" sequence="4" groups="group_pos_manager"/>
         <!-- Invoice -->
 
         <record model="ir.actions.act_window" id="action_pos_invoice">
             <field name="name">pos.config.form.view</field>
             <field name="model">pos.config</field>
             <field name="arch" type="xml">
-                <form string="Point of Sale Configuration" version="7.0">
+                <form string="Point of Sale Configuration">
                     <header>
                         <button string="Set to Active" name="set_active" type="object" states="inactive,deprecated"/>
                         <button string="Set to Inactive" name="set_inactive" type="object" states="active" />
                             <field name="name"/>
                         </h1>
                         <group col="4">
-                            <field name="warehouse_id" widget="selection" groups="stock.group_locations" />
+                            <field name="picking_type_id" widget="selection" groups="stock.group_locations" 
+                                on_change="onchange_picking_type_id(picking_type_id)"/>
+                            <field name="stock_location_id" groups="stock.group_locations"/>
+                            <field name="company_id" groups="base.group_multi_company"/>
                             <field name="pricelist_id" groups="product.group_sale_pricelist"/>
-                            <field name="currency_id" invisible="1"/>
                             <field name="journal_id" widget="selection"/>
                             <field name="group_by" groups="account.group_account_user"/>
+                            <field name="barcode_nomenclature_id" />
                             <field name="sequence_id" readonly="1" groups="base.group_no_one"/>
+                            <field name="currency_id" invisible="1"/>
                         </group>
                         <separator string="Available Payment Methods" colspan="4"/>
                         <field name="journal_ids" colspan="4" nolabel="1">
                         </field>
                         <group string="Features" >
                             <group>
-                                <field name="iface_cashdrawer" />
+                                <field name="iface_vkeyboard" />
                                 <field name="iface_invoicing" />
-                                <field name="iface_electronic_scale" />
+                                <field name="iface_precompute_cash" />
                             </group>
                             <group>
-                                <field name="iface_vkeyboard" />
+                                <field name="iface_fullscreen" />
                                 <field name="iface_big_scrollbars" />
+                                <field name="iface_print_auto" />
+                                <field name="iface_tax_included" />
                             </group>
                         </group>
-                        <group string="Hardware Proxy" >
+                        <group string="Hardware Proxy / PosBox" >
                             <field name="proxy_ip" />
-                            <field name="iface_print_via_proxy" />
-                            <field name="iface_scan_via_proxy" />
+                            <field name="iface_print_via_proxy" string="Receipt Printer"/>
+                            <field name="iface_scan_via_proxy" string="Barcode Scanner"/>
+                            <field name="iface_electronic_scale" />
+                            <field name="iface_cashdrawer" />
                         </group>
                         <group string="Receipt" >
-                            <field name="receipt_header" placeholder="A custom receipt header message"/>
-                            <field name="receipt_footer" placeholder="A custom receipt header footage"/>
+                            <field name="receipt_header" string="Header" placeholder="A custom receipt header message"/>
+                            <field name="receipt_footer" string="Footer" placeholder="A custom receipt header footage"/>
                         </group>
                     </sheet>
 
             <field name="arch" type="xml">
                 <tree string="Point of Sale Configuration" colors="grey:state == 'inactive'">
                     <field name="name" />
-                    <field name="warehouse_id" groups="stock.group_locations"/>
+                    <field name="stock_location_id" groups="stock.group_locations"/>
                     <field name="state" />
                 </tree>
             </field>
                     <field name="name" />
                     <filter string="Active" domain="[('state', '=', 'active')]" />
                     <filter string="Inactive" domain="[('state', '=', 'inactive')]" />
-                    <field name="warehouse_id" groups="stock.group_locations" />
+                    <field name="stock_location_id" groups="stock.group_locations" />
                 </search>
             </field>
         </record>
 
+        <!-- Sessions -->
 
         <act_window
             id="act_pos_config_sessions"
             <field name="name">pos.session.form.view</field>
             <field name="model">pos.session</field>
             <field name="arch" type="xml">
-                <form string="Point of Sale Session" version="7.0">
+                <form string="Point of Sale Session">
                     <header>
                         <button name="open_cb" type="object" string="Validate &amp; Open Session" states="opening_control" class="oe_highlight"/>
                         <button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"
                     </header>
                     <sheet>
                         <div class="oe_right oe_button_box">
-                            <button name="%(action_pos_box_in)d" string="Put Money In" type="action" states="opened,closing_control"/>
-                            <button name="%(action_pos_box_out)d" string="Take Money Out" type="action" states="opened,closing_control"/>
+                            <button class="oe_stat_button" name="%(action_pos_box_in)d"
+                                type="action" states="opened,closing_control" icon="fa-level-down">
+                                <div>Put<br/>Money In</div>
+                            </button>
+                            <button class="oe_stat_button" name="%(action_pos_box_out)d"
+                                type="action" states="opened,closing_control" icon="fa-level-up">
+                                <div>Take<br/>Money Out</div>
+                            </button>
                         </div>
                         <h1 class="oe_title">
                             Session:
                     <filter string="Today" domain="[('start_at', '>=', time.strftime('%%Y-%%m-%%d 00:00:00'))]" />
                     <field name="config_id" />
                     <field name="user_id" />
-                    <group expand="0" string="Group By...">
+                    <group expand="0" string="Group By">
                         <filter string="User" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" />
                         <filter string="Point of Sales" domain="[]" context="{'group_by': 'user_id'}" />
                     </group>
                 currencies in your cash registers at the beginning and the end
                 of each session.
               </p><p>
-                Note that you should better to use the menu <i>Your Session</i>
+                Note that you may use the menu <i>Your Session</i>
                 to quickly open a new session.
               </p>
             </field>
                     <filter icon="gtk-convert" string="Posted" domain="[('state','=','done')]"/>
                     <field name="user_id"/>
                     <field name="session_id"/>
-                    <group expand="0" string="Group By...">
+                    <group expand="0" string="Group By">
                         <filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
                         <filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
                         <filter string="Session" icon="terp-personal" domain="[]" context="{'group_by':'session_id'}"/>
             <field name="name">pos.ean_wizard</field>
             <field name="model">pos.ean_wizard</field>
             <field name="arch" type="xml">
-                <form string="Ean13 Generator" version="7.0">  
+                <form string="Ean13 Generator">  
                     <p class="oe_grey">
                         Enter a reference, it will be converted
                         automatically to a valid EAN number.
             </field>
         </record>
 
-
+        <!-- Barcode Nomenclatures -->
+        <menuitem parent="menu_point_config_product" action="barcodes.action_barcode_nomenclature_form" id="menu_pos_barcode_nomenclature_all"
+            sequence="30"/>
     </data>
 </openerp>
+