Add manufacturer pattern when have a product

This commit is contained in:
resteve 2015-09-08 17:30:29 +02:00
parent 32c235fc47
commit 93b959b3ae

View file

@ -19,8 +19,9 @@ class PriceList:
pattern=None):
if pattern is None:
pattern = {}
pattern['manufacturer'] = (product.manufacturer
and product.manufacturer.id or None)
if product:
pattern['manufacturer'] = product.manufacturer \
and product.manufacturer.id or None
return super(PriceList, self).compute(party, product, unit_price,
quantity, uom, pattern)