def _compute_price(self):
price = self.price_unit * (1 - (self.discount or 0.0) / 100.0)
taxes = self.invoice_line_tax_id.compute_all(price, self.quantity, product=self.product_id, partner=self.invoice_id.partner_id)
taxes['total'] = (self.price_unit * (self.quantity - self.gratuite_qte) * (1 - (self.rem1/100)) * (1 - (self.rem2/100)) * (1 - (self.rem3/100)))
print taxes
self.price_subtotal = taxes['total']
if self.invoice_id:
self.price_subtotal = self.invoice_id.currency_id.round(self.price_subtotal)
I added discounts for price_subtotal but my problem is the base_amout to calculate tax does not change.