From 957c82182818ec1c7cfebbe11abc42624ea3d1bd Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Mon, 4 Oct 2010 10:10:52 +0200
Subject: [PATCH] [IMP] account_invoice_layout: 'invoices wihh layout' report
now uses decimal.precision
bzr revid: olt@tinyerp.com-20101004081052-l12jti4h22ss3yez
---
.../report/report_account_invoice_layout.py | 8 ++++----
.../report/report_account_invoice_layout.rml | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.py b/addons/account_invoice_layout/report/report_account_invoice_layout.py
index f7cae7a91c5..f61a05fd5f4 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.py
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.py
@@ -68,10 +68,10 @@ class account_invoice_1(report_sxw.rml_parse):
tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))])
res['tax_types'] = tax_names
res['name'] = entry.name
- res['quantity'] = "%.2f" % (entry.quantity)
- res['price_unit'] = "%.2f" % (entry.price_unit)
- res['discount'] = "%.2f" % (entry.discount)
- res['price_subtotal'] = "%.2f" % (entry.price_subtotal)
+ res['quantity'] = self.formatLang(entry.quantity, digits=self.get_digits(dp='Account'))
+ res['price_unit'] = self.formatLang(entry.price_unit, digits=self.get_digits(dp='Account'))
+ res['discount'] = self.formatLang(entry.discount, digits=self.get_digits(dp='Account'))
+ res['price_subtotal'] = self.formatLang(entry.price_subtotal, digits=self.get_digits(dp='Account'))
sub_total[i] = entry.price_subtotal
i = i + 1
res['note'] = entry.note
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
index f92cd477f1a..3cd64a08b02 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml
@@ -376,7 +376,7 @@