I\'m just playing around learning classes functions etc, So I decided to create a simple function what should give me tax amount.
this is my code so far.
It seems like self.VAT is of decimal.Decimal type and self.amount is a float, thing that you can't do.
self.VAT
decimal.Decimal
self.amount
float
Try decimal.Decimal(self.amount) * self.VAT instead.
decimal.Decimal(self.amount) * self.VAT