Odoo Help


How to change the base_amount ?

on 5/25/15, 6:35 AM 317 views

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/25/15, 6:35 AM
Seen: 317 times
Last updated: 5/25/15, 6:35 AM