Re-use on_change_with_amount in get_amount

issue4167
review5591002
This commit is contained in:
Cédric Krier
2014-09-13 15:25:04 +02:00
parent 6334322a0a
commit aeadbc05d1
+1 -2
View File
@@ -1176,8 +1176,7 @@ class PurchaseLine(ModelSQL, ModelView):
def get_amount(self, name):
if self.type == 'line':
return self.purchase.currency.round(
Decimal(str(self.quantity)) * self.unit_price)
return self.on_change_with_amount()
elif self.type == 'subtotal':
amount = Decimal('0.0')
for line2 in self.purchase.lines: