def _get_fullPrice self returns price as Decimal subtype self get_subt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
def _get_fullPrice(self):
"""
returns price as a Decimal
"""
subtype = self.get_subtype_with_attr('unit_price')
price = None
if subtype:
price = subtype.unit_price
else:
price = self._get_qty_price(1)
if not price:
price = Decimal("0.00")
return price
unit_price = property(_get_fullPrice)