[IMP] stock: filter for procurement.type view
authorAntoine Huvelle <antoine.huvelle@gmail.com>
Wed, 27 Aug 2014 12:25:32 +0000 (14:25 +0200)
committerMartin Trigaux <mat@openerp.com>
Wed, 27 Aug 2014 12:56:03 +0000 (14:56 +0200)
Shouldn't allow to select view in the location field. Otherwise you'll end having pickings composed of stock moves using view stock locations.

addons/stock/stock_view.xml

index 32bc27a..f4ef1d6 100644 (file)
                 <xpath expr="//group[@name='propagation_group']" position="before">
                     <group attrs="{'invisible': [('action', '!=', 'move')]}" string="Moving Options">
                         <field name="procure_method" groups="stock.group_adv_location"/>
-                        <field name="location_src_id" attrs="{'required': [('action', '=', 'move')]}"/>
+                        <field name="location_src_id" attrs="{'required': [('action', '=', 'move')]}"  domain="[('usage','!=','view')]" />
                         <field name="partner_address_id" groups="stock.group_adv_location" context="{'show_address': 1}" options="{'always_reload': 1}"/>
                         <label for="delay" string="Delay"  groups="stock.group_adv_location"/>
                         <div groups="stock.group_adv_location">