[IMP]remove shop from stock and stock_location
authorsgo@tinyerp.com <>
Mon, 21 Jan 2013 11:01:05 +0000 (16:31 +0530)
committersgo@tinyerp.com <>
Mon, 21 Jan 2013 11:01:05 +0000 (16:31 +0530)
bzr revid: sgo@tinyerp.com-20130121110105-d3teso7rsz7v00rm

addons/stock/product.py
addons/stock_location/stock_location_demo_cpu1.xml

index ba55688..f59c28e 100644 (file)
@@ -205,7 +205,6 @@ class product_product(osv.osv):
         
         location_obj = self.pool.get('stock.location')
         warehouse_obj = self.pool.get('stock.warehouse')
-        shop_obj = self.pool.get('sale.shop')
         
         states = context.get('states',[])
         what = context.get('what',())
@@ -215,11 +214,6 @@ class product_product(osv.osv):
         if not ids:
             return res
 
-        if context.get('shop', False):
-            warehouse_id = shop_obj.read(cr, uid, int(context['shop']), ['warehouse_id'])['warehouse_id'][0]
-            if warehouse_id:
-                context['warehouse'] = warehouse_id
-
         if context.get('warehouse', False):
             lot_id = warehouse_obj.read(cr, uid, int(context['warehouse']), ['lot_stock_id'])['lot_stock_id'][0]
             if lot_id:
@@ -370,7 +364,6 @@ class product_product(osv.osv):
                  "In a context with a single Warehouse, this includes "
                  "goods stored in the Stock Location of this Warehouse, or any "
                  "of its children.\n"
-                 "In a context with a single Shop, this includes goods "
                  "stored in the Stock Location of the Warehouse of this Shop, "
                  "or any of its children.\n"
                  "Otherwise, this includes goods stored in any Stock Location "
@@ -385,7 +378,6 @@ class product_product(osv.osv):
                  "In a context with a single Warehouse, this includes "
                  "goods stored in the Stock Location of this Warehouse, or any "
                  "of its children.\n"
-                 "In a context with a single Shop, this includes goods "
                  "stored in the Stock Location of the Warehouse of this Shop, "
                  "or any of its children.\n"
                  "Otherwise, this includes goods stored in any Stock Location "
index 6578a96..1c16179 100644 (file)
             <field model="product.product" name="product_id" ref="product.product_product_9"/>
         </record>
 
-        <record id="sale_shop2" model="sale.shop">
-            <field name="name">Chicago Shop</field>
-            <field name="warehouse_id" ref="stock.stock_warehouse_shop0"/>
-            <field name="company_id" ref="stock.res_company_1"/>
-            <field model="account.payment.term" name="payment_default_id" search="[]"/>
-        </record>
-        <record id="sale_shop3" model="sale.shop">
-            <field name="name">Birmingham shop</field>
-            <field name="warehouse_id" ref="stock.stock_warehouse_shop1"/>
-            <field name="company_id" ref="stock.res_company_2"/>
-            <field model="account.payment.term" name="payment_default_id" search="[]"/>
-        </record>
     </data>
 </openerp>