diff options
| author | Jay (Open ERP) <jvo@tinyerp.com> | 2010-05-25 17:33:36 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2010-05-25 17:33:36 +0530 |
| commit | 7a5cc7c838b8d9dcb3dc15cd6f263479ee86aafe (patch) | |
| tree | 53e91460127e2a4274a5294123871601a3091530 | |
| parent | 72336e04adb5d4b0f85c6b818c7655fce704bcf5 (diff) | |
[REF] Stock/product.py
bzr revid: jvo@tinyerp.com-20100525120336-wx7chzp2x50k5j34
| -rw-r--r-- | addons/sale/sale.py | 2 | ||||
| -rw-r--r-- | addons/stock/product.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 272ee0ecd70..a322809135d 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -292,7 +292,7 @@ class sale_order(osv.osv): 'partner_invoice_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['invoice'])['invoice'], 'partner_order_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['contact'])['contact'], 'partner_shipping_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['delivery'])['delivery'], - 'pricelist_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').browse(cr, uid, context['partner_id']).property_product_pricelist.id, +# 'pricelist_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').browse(cr, uid, context['partner_id']).property_product_pricelist.id, } _order = 'name desc' diff --git a/addons/stock/product.py b/addons/stock/product.py index ad189ee546a..dc300994232 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -148,10 +148,10 @@ class product_product(osv.osv): return res def get_product_available(self,cr,uid,ids,context=None): - if not context: + if context is None: context = {} - states=context.get('states',[]) - what=context.get('what',()) + states = context.get('states',[]) + what = context.get('what',()) if not ids: ids = self.search(cr, uid, []) res = {}.fromkeys(ids, 0.0) @@ -184,9 +184,9 @@ class product_product(osv.osv): # build the list of ids of children of the location given by id if context.get('compute_child',True): child_location_ids = self.pool.get('stock.location').search(cr, uid, [('location_id', 'child_of', location_ids)]) - location_ids= len(child_location_ids) and child_location_ids or location_ids + location_ids = child_location_ids or location_ids else: - location_ids= location_ids + location_ids = location_ids uoms_o = {} product2uom = {} |
