Odoo Help

Welcome!

This community 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.

0

How to change the base_amount ?

By
elalaoui
on 5/25/15, 6:35 AM 261 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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