Get Sale Price. Context return price without special price

This commit is contained in:
resteve 2014-05-15 11:32:42 +02:00
parent 83ff2ef7cc
commit 38401440c0
1 changed files with 5 additions and 1 deletions

View File

@ -31,12 +31,16 @@ class Product:
Date = Pool().get('ir.date')
prices = super(Product, cls).get_sale_price(products, quantity)
today = Date.today()
if Transaction().context.get('without_special_price'):
return prices
if (Transaction().context.get('customer')):
User = Pool().get('res.user')
PriceList = Pool().get('product.price_list')
today = Date.today()
user = User(Transaction().user)
if user.shop and user.shop.special_price:
for product in products: