[Point of sale] ~pos_order form: only show available in pos products
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 24 Mar 2014 15:33:54 +0000 (16:33 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 24 Mar 2014 15:33:54 +0000 (16:33 +0100)
view/point_of_sale.xml

index d9c11c5..372ff5c 100644 (file)
@@ -12,6 +12,9 @@
                 <xpath expr="//field[@name='partner_id']" position="replace">
                     <field name="partner_id" on_change="onchange_partner_id(partner_id, context)" context="{'search_default_customer': 1, 'form_view_ref': 'bikecoop.view_bikecoop_members_form'}" attrs="{'readonly': [('state','=', 'invoiced')]}"/>
                 </xpath>
+                <xpath expr="//tree/field[@name='product_id']" position="attributes">
+                    <attribute name="domain">[('available_in_pos','=', True)]</attribute>
+                </xpath>
             </field>
         </record>
         <record id="point_of_sale.menu_pos_session_all" model="ir.ui.menu">