Hardik Ansodariya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-579765-han into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579765-han/+merge/126868
Hello,
fixed the issue of rounding in Taxes when compute taxes from invoice line.
1) create a new db with demo data and belgian localisation (l10n_be)
2) create sales invoice for customer Agrolait
3) add invoice line, no products, qty = 8, unit price = 15,63, discount = 40%,
tax = VAT 21% (VAT-OUT-21-L)
4) click on 'Compute Taxes' and you have the problem : base amount = 75,04 -
Untaxed amount = 75,02
with reference of Maintenance case: 579765
Thanks
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579765-han/+merge/126868
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-579765-han.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2012-08-20 15:52:57 +0000
+++ account/account_invoice.py 2012-09-28 07:26:21 +0000
@@ -1274,7 +1274,7 @@
res[line.id] = taxes['total']
if line.invoice_id:
cur = line.invoice_id.currency_id
- res[line.id] = cur_obj.round(cr, uid, cur, res[line.id])
+ res[line.id] = round(res[line.id],self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
return res
def _price_unit_default(self, cr, uid, context=None):
@@ -1586,7 +1586,6 @@
for line in inv.invoice_line:
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, inv.address_invoice_id.id, line.product_id, inv.partner_id)['taxes']:
- tax['price_unit'] = cur_obj.round(cr, uid, cur, tax['price_unit'])
val={}
val['invoice_id'] = inv.id
val['name'] = tax['name']
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp