diff --git a/pricing/pricing.py b/pricing/pricing.py index 25817d1..805bf6e 100644 --- a/pricing/pricing.py +++ b/pricing/pricing.py @@ -354,7 +354,7 @@ where a.id = b.ppid times = 1 unit = 1 for k,spec_value in p.items(): - if k == 'price': + if k in ['price', 'formula']: continue f = d.fields.get(k) if not f: @@ -384,6 +384,7 @@ where a.id = b.ppid np = p.copy() times = float(times) unit = float(unit) + formula = p.formula or d.formula if formula: ns = { 'price': p.price,