Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I Make Invoice Amount Total Rounding Code for invoice,
Untaxed Amount :2240.80 Tax Amount : 148.45
Amount Total : 2389.00 instead of 2389.25
if last decimal amount is greater 0.50 it add next value if less 0.50 then it's subtract that part.
I have Created This Code.
Just goto the Account > Account_invoice.py find def _compute_amount(self):
and put below code like,
self.amount_untaxed = sum(line.price_subtotal for line in self.invoice_line)
self.amount_tax = sum(line.amount for line in self.tax_line)
self.amount_total = self.amount_untaxed + self.amount_tax
if int(self.amount_total) > 0:
amounttotaldiff = self.amount_total - int(self.amount_total)
taxdetail = self.amount_tax - int(self.amount_tax)
c = 1 - amounttotaldiff
e = 1 - taxdetail
if (amounttotaldiff < 0.50):
d = self.amount_total - amounttotaldiff
if (amounttotaldiff > 0.50):
d = self.amount_total + c
self.amount_total = d
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/9/15, 3:08 AM|
|Seen: 607 times|
|Last updated: 9/9/15, 3:25 AM|