[WIP] wip
[odoo/odoo.git] / addons / point_of_sale / point_of_sale_view.xml
index 527635f..404ac2d 100644 (file)
@@ -16,7 +16,7 @@
             <field name="model">pos.order</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="Point of Sale Orders" layout="manual">
+                <form string="Point of Sale Orders" version="7.0"> 
                     <div class="oe_form_topbar">
                         <button name="%(action_pos_payment)d" string="Payment" icon="gtk-apply" type="action" states="draft" context="{'pos_session_id' : session_id}"/>
                         <button name="action_invoice" string="Invoice" icon="gtk-apply" type="object" states="paid" attrs="{'readonly': [('partner_id','=',False)]}"/>
                                 <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,paid,done" statusbar_colors='{"cancel":"red"}'/>
                             </div>
                     </div>
-                    <sheet layout="auto">
+                    <sheet> 
                     <group col="4" colspan="4">
                         <field name="name"/>
                         <field name="date_order"/>
                         <field name="session_id" required="1" />
                         <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_customer':1}" attrs="{'readonly': [('state','=','invoiced')]}"/>
-
                     </group>
                     <notebook colspan="4">
                         <page string="Products">
                                     <field name="price_subtotal"/>
                                     <field name="price_subtotal_incl"/>
                                 </tree>
-                                <form string="Order lines">
-                                    <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="discount"  on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
-                                    <field name="price_unit" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
-                                    <field name="price_subtotal" invisible="1"/>
-                                    <field name="price_subtotal_incl" invisible="1"/>
-                                    <field name="notice"/>
+                                <form string="Order lines" version="7.0">
+                                    <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="discount"  on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
+                                        <field name="price_unit" on_change="onchange_qty(product_id, discount, qty, price_unit, context)"/>
+                                        <field name="price_subtotal" invisible="1"/>
+                                        <field name="price_subtotal_incl" invisible="1"/>
+                                        <field name="notice"/>
+                                    </group>
                                 </form>
                             </field>
-                            <group colspan="4" col="7">
+                            <group class="oe_subtotal_footer">
                                 <field name="amount_tax"/>
                                 <field name="amount_total"/>
                                 <button name="button_dummy" string="Update" icon="gtk-execute" states="draft" />
-                                <button name="%(action_pos_discount)d" string="Discount" icon="gtk-remove" type="action" states="draft" />
                             </group>
                         </page>
                         <page string="Payments">
                                     <field name="statement_id" />
                                     <field name="amount"/>
                                 </tree>
-                                <form string="Statement lines">
-                                    <field name="account_id"/>
-                                    <field name="amount"/>
-                                    <field name="statement_id" domain="[('company_id','=',parent.company_id),('state','=','open')]"/>
+                                <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 colspan="2" col="2">
-                                <separator string="General Information" colspan="2"/>
+                            <group string="General Information">
                                 <field name="company_id" groups="base.group_multi_company"/>
                                 <field name="shop_id" widget="selection"/>
                                 <field name="user_id"/>
                                 <field name="pricelist_id" groups="product.group_sale_pricelist" domain="[('type','=','sale')]"/>
                                 <field name="picking_id" readonly="1"/>
                             </group>
-                            <group colspan="2" col="3">
-                                <separator string="Accounting Information" colspan="3"/>
+                            <group string="Accounting Information">
                                 <field name="sale_journal" domain="[('type','=','sale')]"/>
-                                <button name="done" string="Post Entries" icon="gtk-apply" type="workflow" states="paid"/>
-                                <field name="invoice_id" colspan="2" readonly="1"
+                                <field name="invoice_id" readonly="1"
                                     attrs="{'invisible':[('state','&lt;&gt;','invoiced')]}"/>
                                 <button name="%(pos_invoice_report)d" string="Re-Print"
                                     icon="gtk-print" type="action" attrs="{'invisible':[('state','&lt;&gt;','invoiced')]}"/>
-                                <field name="account_move" colspan="3" readonly="1"
+                                <field name="account_move" readonly="1"
                                     attrs="{'invisible':[('state','&lt;&gt;','done')]}"/>
                             </group>
                         </page>
                         <page string="Notes" >
-                            <field colspan="4" name="note" nolabel="1"/>
+                            <field name="note"/>
                         </page>
                     </notebook>
                 </sheet>
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Search Sales Order">
+                    <field name="name" string="Sales Order"/>
+                    <separator orientation="vertical"/>
+                    <field name="date_order"/>
+                    <separator orientation="vertical"/>
                     <filter icon="terp-document-new" string="New" domain="[('state','=','draft')]"/>
                     <filter icon="gtk-apply" string="Done" domain="[('state','in',('paid','invoiced','done'))]"/>
-                    <separator orientation="vertical"/>
                     <filter icon="terp-check" string="Invoiced" domain="[('state','=','invoiced')]"/>
                     <filter icon="gtk-convert" string="Posted" domain="[('state','=','done')]"/>
                     <separator orientation="vertical"/>
-                    <filter icon="terp-go-month" string="Today" domain="[('date_order','&gt;=',datetime.date.today().strftime('%%Y-%%m-%%d 00:00:00')),('date_order','&lt;=',datetime.date.today().strftime('%%Y-%%m-%%d 23:59:59'))]"/>
-                    <filter icon="gtk-go-forward" string="Yesterday" domain="[('date_order','&lt;',datetime.date.today().strftime('%%Y-%%m-%%d 00:00:00')),('date_order','&gt;=',(datetime.date.today() - relativedelta(days=1)).strftime('%%Y-%%m-%%d 00:00:00'))]"/>
-                    <separator orientation="vertical"/>
-                    <field name="name"/>
                     <field name="user_id"/>
-                    <newline/>
                     <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="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
                         <separator string="" orientation="vertical"/>
-                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+                        <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                         <separator string="" orientation="vertical"/>
                         <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
                     </group>
             <field name="model">pos.order.line</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="POS Order line">
-                    <field name="product_id" />
-                    <field name="qty" />
-                    <field name="discount" />
-                    <field name="price_unit" />
-                    <field name="create_date" />
+                <form string="POS Order line" version="7.0">
+                    <group col="4">
+                        <field name="product_id" />
+                        <field name="qty" />
+                        <field name="discount" />
+                        <field name="price_unit" />
+                        <field name="create_date" />
+                    </group>
                 </form>
             </field>
         </record>
             <field name="model">report.transaction.pos</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="POS ">
-                    <field name="user_id"/>
-                    <field name="journal_id"/>
-                    <field name="jl_id"/>
-                    <field name="date_create" widget="date"/>
-                    <field name="no_trans"/>
-                    <field name="amount"/>
-                    <field name="invoice_id"/>
+                <form string="POS " version="7.0">
+                    <group col="4">
+                        <field name="user_id"/>
+                        <field name="journal_id"/>
+                        <field name="jl_id"/>
+                        <field name="date_create" widget="date"/>
+                        <field name="no_trans"/>
+                        <field name="amount"/>
+                        <field name="invoice_id"/>
+                    </group>
                 </form>
             </field>
         </record>
             <field name="model">report.sales.by.user.pos</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="POS ">
-                    <field name="date_order" widget="date"/>
-                    <field name="qty"/>
-                    <field name="amount"/>
-                    <field name="user_id"/>
+                <form string="POS " version="7.0">
+                    <group col="4">
+                        <field name="date_order" widget="date"/>
+                        <field name="qty"/>
+                        <field name="amount"/>
+                        <field name="user_id"/>
+                    </group>
                 </form>
             </field>
         </record>
             <field name="model">report.sales.by.user.pos.month</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="POS ">
-                    <field name="date_order" widget="date"/>
-                    <field name="qty"/>
-                    <field name="amount"/>
-                    <field name="user_id"/>
+                <form string="POS " version="7.0">
+                    <group col="4">
+                        <field name="date_order" widget="date"/>
+                        <field name="qty"/>
+                        <field name="amount"/>
+                        <field name="user_id"/>
+                    </group>
                 </form>
             </field>
         </record>
             <field name="model">report.sales.by.margin.pos</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form 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"/>
+                <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>
             </field>
         </record>
             <field name="model">report.sales.by.margin.pos.month</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form 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"/>
+                <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>
             </field>
         </record>
             <field name="type">form</field>
             <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
-                  <group name="status" position="after">
-                      <group colspan="2" col="2" name="pos">
-                          <separator string="Point of Sale" colspan="2"/>
-                          <field name="pos_categ_id"/>
-                          <field name="to_weight" />
-                      </group>
-                  </group>
-            </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="type">form</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
-            <field name="arch" type="xml">
+                <group name="status" position="after">
+                    <group name="pos" string="Point of Sale">
+                        <field name="pos_categ_id"/>
+                        <field name="to_weight" />
+                    </group>
+                </group>
                 <group name="misc" position="after">
                     <group name="pos" colspan="2" col="2">
                         <separator string="Point of Sale" colspan="2"/>
                         <field name="expense_pdt"/>
                     </group>
                 </group>
+                <!-- <field name="ean13" position="after">
+                    <button name="add_ean13" type="object" string="Edit" />
+                </field> -->
             </field>
         </record>
 
             <field name="model">pos.category</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="Product PoS Categories">
-                    <group colspan="4" col="6">
-                        <field name="name"/>
-                        <field name="parent_id"/>
-                        <field name="sequence"/>
-                    </group>
-                    <group colspan="2" col="1">
-                      <field name="photo" widget='image' nolabel="1" on_change="onchange_photo(photo)"/>
-                    </group>
+                <form string="Product PoS Categories" version="7.0">
+                    <sheet>
+                        <field name="category_image" 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>
             <field name="model">pos.config</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="Point of Sale Configuration" layout="manual">
-                    <div class="oe_form_topbar">
+                <form string="Point of Sale Configuration" version="7.0">
+                    <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" />
                         <button string="Set to Deprecated" name="set_deprecate" type="object" states="active,inactive" />
                         <div class="oe_right">
                             <field name="state" widget="statusbar" statusbar_visible="active,inactive,deprecated" statusbar_colors='{"deprecated" : "red"}' nolabel="1"/>
                         </div>
-                    </div>
+                    </header>
 
-                    <sheet layout="auto">
+                    <sheet>
+                        <group>
                         <field name="name"/>
                         <field name="shop_id" widget="selection" />
                         <field name="journal_id" widget="selection" />
                         <field name="sequence_id" readonly="1"/>
                         <field name="group_by" />
+                        </group>
                         <separator string="Available Payment Methods" colspan="4"/>
                         <field name="journal_ids" colspan="4" nolabel="1">
                             <tree string="Journals">
                                 <field name="closing_control" />
                             </tree>
                         </field>
-                        <separator string="Material Interfaces" colspan="4"/>
-                        <field name="iface_self_checkout" />
-                        <field name="iface_websql" />
-                        <field name="iface_led" />
-                        <field name="iface_cashdrawer" />
-                        <field name="iface_payment_terminal" />
-                        <field name="iface_electronic_scale" />
-                        <field name="iface_barscan" />
-                        <field name="iface_vkeyboard" />
-                        <field name="iface_print_via_proxy" />
+                        <group string="Material Interfaces" >
+                            <group>
+                                <field name="iface_self_checkout" />
+                                <field name="iface_websql" />
+                                <field name="iface_led" />
+                                <field name="iface_cashdrawer" />
+                                <field name="iface_payment_terminal" />
+                            </group>
+                            <group>
+                                <field name="iface_electronic_scale" />
+                                <field name="iface_barscan" />
+                                <field name="iface_vkeyboard" />
+                                <field name="iface_print_via_proxy" />
+                            </group>
+                        </group>
                     </sheet>
 
                 </form>
             <field name="model">pos.session</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="Point of Sale Session" layout="manual">
-                    <div class="oe_form_topbar">
+                <form string="Point of Sale Session" version="7.0">  
+                    <header>
                         <button name="open" type="workflow" string="Validate &amp; Open Session" states="opening_control" /> 
                         <button name="cashbox_control" type="workflow" string="End of Session" states="opened" /> 
                         <button name="close" type="workflow" string="Validate &amp; Close" states="closing_control,opened" />
                         <div class="oe_right">
                             <field name="state" widget="statusbar" statusbar_visible="opening_control,opened,closing_control,closed" nolabel="1"/>
                         </div>
-                    </div>
-                    <sheet layout="auto">
+                    </header>
+                    <sheet>
 
-                    <group colspan="4" col="4">
+                    <group>
                         <field name="config_id"/>
                         <field name="has_opening_control" invisible="1" />
                         <field name="has_closing_control" invisible="1" />
-                               <group colspan="2" col="2">
+                               <group>
                                        <button name="%(action_pos_box_in)d" string="Put Money In" type="action" states="opened"/>
                                        <button name="%(action_pos_box_out)d" string="Take Money Out" type="action" states="opened"/>
                             <button name="open_frontend_cb" type="object" string="Open Point Of Sale" states="opened" />
 
         <menuitem action="action_pos_session_opening" parent="menu_point_of_sale" id="menu_pos_session_opening" sequence="0" />
 
+        <record model="ir.ui.view" id="view_pos_session_form">
+            <field name="name">pos.ean_wizard</field>
+            <field name="model">pos.ean_wizard</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="ASDFDASF of Sale Session" version="7.0">  
+                    <field name="ean13_pattern"/>
+                    <footer>
+                        <button name="sanitize_ean13" type="object" string="Apply"/>
+                    </footer>
+                </form>
+            </field>
+        </record>
+
+
     </data>
 </openerp>