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',())
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:
"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 "
"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 "
<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>