From 0694b1415fe5e906a3e977c32b4a575459538bf5 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Fri, 1 Oct 2010 10:19:11 +0200
Subject: [PATCH 1/9] [FIX] decimal_precision:
* 'fucntion' fields also need to be updated
* clear_cache should be called before 'col.digits_change'
bzr revid: olt@tinyerp.com-20101001081911-ne67wl3mjq3ki3dx
---
addons/decimal_precision/decimal_precision.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/addons/decimal_precision/decimal_precision.py b/addons/decimal_precision/decimal_precision.py
index 4077a019ee2..1986eb8c441 100644
--- a/addons/decimal_precision/decimal_precision.py
+++ b/addons/decimal_precision/decimal_precision.py
@@ -46,11 +46,11 @@ class decimal_precision(osv.osv):
def write(self, cr, uid, ids, data, *args, **argv):
res = super(decimal_precision, self).write(cr, uid, ids, data, *args, **argv)
- for obj in self.pool.obj_list():
- for colname,col in self.pool.get(obj)._columns.items():
- if isinstance(col, fields.float):
- col.digits_change(cr)
self.precision_get.clear_cache(cr.dbname)
+ for obj in self.pool.obj_list():
+ for colname, col in self.pool.get(obj)._columns.items():
+ if isinstance(col, (fields.float, fields.function)):
+ col.digits_change(cr)
return res
decimal_precision()
@@ -62,4 +62,3 @@ def get_precision(application):
return (16, res)
return change_digit
-
From 03079183be98fb1e31ff2159c05547e000ca7306 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Fri, 1 Oct 2010 13:19:29 +0200
Subject: [PATCH 2/9] [IMP] account_budget: 'crossovered_budget_report' uses
decimal_precision
bzr revid: olt@tinyerp.com-20101001111929-e23695jz3erj3mci
---
addons/account_budget/crossovered_budget.py | 10 ++++++----
.../report/crossovered_budget_report.rml | 18 +++++++++---------
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/addons/account_budget/crossovered_budget.py b/addons/account_budget/crossovered_budget.py
index 6c7eb6639ec..335cf7a1d5f 100644
--- a/addons/account_budget/crossovered_budget.py
+++ b/addons/account_budget/crossovered_budget.py
@@ -24,6 +24,8 @@ import datetime
from osv import osv, fields
from tools.translate import _
+import decimal_precision as dp
+
def strToDate(dt):
dt_date=datetime.date(int(dt[0:4]),int(dt[5:7]),int(dt[8:10]))
return dt_date
@@ -240,9 +242,9 @@ class crossovered_budget_lines(osv.osv):
'date_from': fields.date('Start Date', required=True),
'date_to': fields.date('End Date', required=True),
'paid_date': fields.date('Paid Date'),
- 'planned_amount':fields.float('Planned Amount', required=True, digits=(16,2)),
- 'practical_amount':fields.function(_prac, method=True, string='Practical Amount', type='float', digits=(16,2)),
- 'theoritical_amount':fields.function(_theo, method=True, string='Theoritical Amount', type='float', digits=(16,2)),
+ 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),
+ 'practical_amount':fields.function(_prac, method=True, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
+ 'theoritical_amount':fields.function(_theo, method=True, string='Theoritical Amount', type='float', digits_compute=dp.get_precision('Account')),
'percentage':fields.function(_perc, method=True, string='Percentage', type='float'),
'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
}
@@ -258,4 +260,4 @@ class account_analytic_account(osv.osv):
account_analytic_account()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_budget/report/crossovered_budget_report.rml b/addons/account_budget/report/crossovered_budget_report.rml
index 9ef3dc716af..e297c8b3ca2 100644
--- a/addons/account_budget/report/crossovered_budget_report.rml
+++ b/addons/account_budget/report/crossovered_budget_report.rml
@@ -148,16 +148,16 @@
[['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ a['name'] ]]
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['theo'] ]] [[ company.currency_id.symbol ]]
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['pln'] ]] [[ company.currency_id.symbol ]]
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['prac'] ]] [[ company.currency_id.symbol ]]
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['perc'] ]]%
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'], digits=2) ]]%
|
@@ -168,16 +168,16 @@
[[ repeatIn(funct_total(data['form']),'b') ]]Total:
- [[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(b['tot_theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ formatLang(b['tot_pln']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(b['tot_pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ formatLang(b['tot_prac']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(b['tot_prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ '%.2f' % b['tot_perc'] ]]%
+ [[ formatLang(b['tot_perc'], digits=2) ]]%
|
@@ -185,4 +185,4 @@
-
\ No newline at end of file
+
From 78736c910db22542e9896a542f9ed889f8bde99c Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Fri, 1 Oct 2010 13:58:16 +0200
Subject: [PATCH 3/9] [IMP] account: 'account_general_ledger' report now uses
decimal_precicion
bzr revid: olt@tinyerp.com-20101001115816-ez0lzvu9ywo3858q
---
.../account/report/account_general_ledger.py | 2 +-
.../account_general_ledger_landscape.rml | 26 +++++++++----------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py
index d8ab573b083..2d31a97049b 100644
--- a/addons/account/report/account_general_ledger.py
+++ b/addons/account/report/account_general_ledger.py
@@ -97,7 +97,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
FROM account_move_line l \
WHERE l.account_id = %s AND %s '%(account.id, self.init_query))
sum_currency += self.cr.fetchone()[0] or 0.0
- return str(sum_currency)
+ return sum_currency
def get_children_accounts(self, account):
res = []
diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml
index 163d5cb5f2c..1321bdea750 100644
--- a/addons/account/report/account_general_ledger_landscape.rml
+++ b/addons/account/report/account_general_ledger_landscape.rml
@@ -266,10 +266,10 @@
| [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] |
|
- [[formatLang(sum_debit_account(o)) ]] |
- [[formatLang(sum_credit_account(o)) ]] |
- [[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] |
- [[ o.currency_id and sum_currency_amount_account(o) +o.currency_id.code or '' ]] |
+ [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] |
+ [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]] |
@@ -292,9 +292,9 @@
[[ line['move'] ]] |
[[ line['lname'] ]] |
[[ strip_name(line['line_corresp'].replace(', ',','),40) ]] |
- [[ formatLang(line['debit']) ]] |
- [[ formatLang(line['credit']) ]] |
- [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] |
+ [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] |
[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]] |
@@ -327,9 +327,9 @@
| [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] |
|
- [[formatLang(sum_debit_account(o)) ]] |
- [[formatLang(sum_credit_account(o)) ]] |
- [[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] |
+ [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(sum_credit_account(o), digits=get_digits(dp=Account)) ]] |
+ [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] |
@@ -352,9 +352,9 @@
[[ line['move'] ]] |
[[ line['lname'] ]] |
[[ strip_name(line['line_corresp'],15) ]] |
- [[ formatLang(line['debit']) ]] |
- [[ formatLang(line['credit']) ]] |
- [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] |
+ [[ formatLang(line['debit'], dp='Account') ]] |
+ [[ formatLang(line['credit'], dp='Account') ]] |
+ [[ formatLang(line['progress'], dp='Account') ]] [[ company.currency_id.symbol ]] |
From 6976b690bb81d08ee92c7a1ca72e6bb1cdfe5c08 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Fri, 1 Oct 2010 14:00:56 +0200
Subject: [PATCH 4/9] [IMP] sale_layout: pep8 on report
bzr revid: olt@tinyerp.com-20101001120056-q4np9gq4io7kien2
---
.../sale_layout/report/report_sale_layout.py | 169 +++++++++---------
1 file changed, 83 insertions(+), 86 deletions(-)
diff --git a/addons/sale_layout/report/report_sale_layout.py b/addons/sale_layout/report/report_sale_layout.py
index 20ad66313a2..78c07f97046 100755
--- a/addons/sale_layout/report/report_sale_layout.py
+++ b/addons/sale_layout/report/report_sale_layout.py
@@ -1,5 +1,5 @@
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -14,21 +14,22 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
import time
-import pooler
from report import report_sxw
rml_parents = {
- 'tr':1,
- 'li':1,
+ 'tr': 1,
+ 'li': 1,
'story': 0,
'section': 0
}
+
+
class sale_order_1(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(sale_order_1, self).__init__(cr, uid, name, context)
@@ -39,98 +40,94 @@ class sale_order_1(report_sxw.rml_parse):
})
self.context = context
-#
+ def sale_order_lines(self, sale_order):
+ result = []
+ sub_total = {}
+ info = []
+ order_lines = []
+ res = {}
- def sale_order_lines(self,sale_order):
- result =[]
- sub_total={}
- info=[]
- order_lines=[]
- res={}
- list_in_seq=[]
ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)])
- for id in range(0,len(ids)):
- order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.context.copy())
+ for id in range(0, len(ids)):
+ order = self.pool.get('sale.order.line').browse(self.cr, self.uid, ids[id], self.context.copy())
order_lines.append(order)
-
- i=1
- j=0
- sum_flag={}
- sum_flag[j]=-1
+
+ i = 1
+ j = 0
+ sum_flag = {}
+ sum_flag[j] = -1
for entry in order_lines:
- res={}
+ res = {}
- if entry.layout_type=='article':
- res['tax_id']=', '.join(map(lambda x: x.name, entry.tax_id)) or ''
- res['name']=entry.name
- res['product_uom_qty']="%.2f"%(entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00)
- res['product_uom']=entry.product_uos and entry.product_uos.name or entry.product_uom.name
- res['price_unit']="%.2f"%(entry.price_unit or 0.00)
- res['discount']="%.2f"%(entry.discount and entry.discount or 0.00)
- res['price_subtotal']="%.2f"%(entry.price_subtotal and entry.price_subtotal or 0.00)
- sub_total[i]= entry.price_subtotal and entry.price_subtotal
- i=i+1
- res['note']=entry.notes or ''
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['layout_type']=entry.layout_type
-
+ if entry.layout_type == 'article':
+ res['tax_id'] = ', '.join(map(lambda x: x.name, entry.tax_id)) or ''
+ res['name'] = entry.name
+ res['product_uom_qty'] = self.digits_fmt(entry, 'product_uos') % (entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00)
+ res['product_uom'] = entry.product_uos and entry.product_uos.name or entry.product_uom.name
+ res['price_unit'] = self.digits_fmt(entry, 'price_unit') % (entry.price_unit or 0.00)
+ res['discount'] = self.digits_fmt(entry, 'discount') % (entry.discount and entry.discount or 0.00)
+ res['price_subtotal'] = self.digits_fmt(entry, 'price_subtotal') % (entry.price_subtotal and entry.price_subtotal or 0.00)
+ sub_total[i] = entry.price_subtotal and entry.price_subtotal
+ i = i + 1
+ res['note'] = entry.notes or ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['layout_type'] = entry.layout_type
else:
+ res['product_uom_qty'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['layout_type'] = entry.layout_type
+ res['note'] = entry.notes or ''
+ res['product_uom'] = ''
- res['product_uom_qty']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['layout_type']=entry.layout_type
- res['note']=entry.notes or ''
- res['product_uom']=''
-
- if entry.layout_type=='subtotal':
- res['name']=entry.name
- sum=0
- sum_id=0
- if sum_flag[j]==-1:
- temp=1
+ if entry.layout_type == 'subtotal':
+ res['name'] = entry.name
+ sum = 0
+ sum_id = 0
+ if sum_flag[j] == -1:
+ temp = 1
else:
- temp=sum_flag[j]
+ temp = sum_flag[j]
- for sum_id in range(temp,len(sub_total)+1):
- sum+=sub_total[sum_id]
- sum_flag[j+1]= sum_id +1
+ for sum_id in range(temp, len(sub_total)+1):
+ sum += sub_total[sum_id]
+ sum_flag[j+1] = sum_id +1
- j=j+1
- res['price_subtotal']="%.2f"%(sum)
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['quantity']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['product_uom']=''
- elif entry.layout_type=='title':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='text':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='line':
- res['product_uom_qty']='__________'
- res['price_unit']='______________'
- res['discount']='___________'
- res['tax_id']='_________________'
- res['product_uom']='_____'
- res['name']='_______________________________________'
- res['price_subtotal']='_________'
- res['currency']='_______'
- elif entry.layout_type=='break':
- res['layout_type']=entry.layout_type
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
+ j = j + 1
+ res['price_subtotal'] = self.digits_fmt(entry, 'price_subtotal') % (sum)
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['quantity'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['product_uom'] = ''
+ elif entry.layout_type == 'title':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'text':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'line':
+ res['product_uom_qty'] = '__________'
+ res['price_unit'] = '______________'
+ res['discount'] = '___________'
+ res['tax_id'] = '_________________'
+ res['product_uom'] = '_____'
+ res['name'] = '_______________________________________'
+ res['price_subtotal'] = '_________'
+ res['currency'] = '_______'
+ elif entry.layout_type == 'break':
+ res['layout_type'] = entry.layout_type
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
else:
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=sale_order.pricelist_id.currency_id.name
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
result.append(res)
return result
From 5c07eacf45e06e17e8f8a51bfe94ed14e3745fb9 Mon Sep 17 00:00:00 2001
From: Mustufa Rangwala
Date: Fri, 1 Oct 2010 17:36:00 +0530
Subject: [PATCH 5/9] [FIX] Account: Partner ledger report init query with new
changes from qdp (just used init_bal on contexxt)
bzr revid: mra@mra-laptop-20101001120600-rw8olwlssfvmgn7i
---
addons/account/report/account_partner_ledger.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/addons/account/report/account_partner_ledger.py b/addons/account/report/account_partner_ledger.py
index 5a240619594..6ce8813fabb 100644
--- a/addons/account/report/account_partner_ledger.py
+++ b/addons/account/report/account_partner_ledger.py
@@ -58,7 +58,9 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
def set_context(self, objects, data, ids, report_type=None):
obj_move = self.pool.get('account.move.line')
self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
- self.init_query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context_initial_bal', {}))
+ ctx2 = data['form'].get('used_context',{}).copy()
+ ctx2.update({'initial_bal': True})
+ self.init_query = obj_move._query_get(self.cr, self.uid, obj='l', context=ctx2)
self.reconcil = data['form'].get('reconcil', True)
self.initial_balance = data['form'].get('initial_balance', True)
self.result_selection = data['form'].get('result_selection', 'customer')
From 59d7a6eaec531ba872413edba1ae1d6e47773891 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Fri, 1 Oct 2010 14:13:56 +0200
Subject: [PATCH 6/9] [IMP] sale, sale_layout: sale order reports now uses
'decimal.precision'
bzr revid: olt@tinyerp.com-20101001121356-0dy5wfaltlckoxtn
---
addons/sale/report/sale_order.rml | 8 ++++----
addons/sale_layout/report/report_sale_layout.py | 10 +++++-----
addons/sale_layout/report/report_sale_layout.rml | 8 ++++----
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml
index 3f44ef2afb3..a4eab5aa86d 100644
--- a/addons/sale/report/sale_order.rml
+++ b/addons/sale/report/sale_order.rml
@@ -312,7 +312,7 @@
Net Total :
- [[ formatLang(o.amount_untaxed ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -325,7 +325,7 @@
Taxes :
|
- [[ formatLang(o.amount_tax ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -338,7 +338,7 @@
Total :
|
- [[ formatLang(o.amount_total ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -361,4 +361,4 @@
-
\ No newline at end of file
+
diff --git a/addons/sale_layout/report/report_sale_layout.py b/addons/sale_layout/report/report_sale_layout.py
index 78c07f97046..3e61a6cd3e9 100755
--- a/addons/sale_layout/report/report_sale_layout.py
+++ b/addons/sale_layout/report/report_sale_layout.py
@@ -62,11 +62,11 @@ class sale_order_1(report_sxw.rml_parse):
if entry.layout_type == 'article':
res['tax_id'] = ', '.join(map(lambda x: x.name, entry.tax_id)) or ''
res['name'] = entry.name
- res['product_uom_qty'] = self.digits_fmt(entry, 'product_uos') % (entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00)
+ res['product_uom_qty'] = entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00
res['product_uom'] = entry.product_uos and entry.product_uos.name or entry.product_uom.name
- res['price_unit'] = self.digits_fmt(entry, 'price_unit') % (entry.price_unit or 0.00)
- res['discount'] = self.digits_fmt(entry, 'discount') % (entry.discount and entry.discount or 0.00)
- res['price_subtotal'] = self.digits_fmt(entry, 'price_subtotal') % (entry.price_subtotal and entry.price_subtotal or 0.00)
+ res['price_unit'] = entry.price_unit or 0.00
+ res['discount'] = entry.discount and entry.discount or 0.00
+ res['price_subtotal'] = entry.price_subtotal and entry.price_subtotal or 0.00
sub_total[i] = entry.price_subtotal and entry.price_subtotal
i = i + 1
res['note'] = entry.notes or ''
@@ -95,7 +95,7 @@ class sale_order_1(report_sxw.rml_parse):
sum_flag[j+1] = sum_id +1
j = j + 1
- res['price_subtotal'] = self.digits_fmt(entry, 'price_subtotal') % (sum)
+ res['price_subtotal'] = sum
res['currency'] = sale_order.pricelist_id.currency_id.name
res['quantity'] = ''
res['price_unit'] = ''
diff --git a/addons/sale_layout/report/report_sale_layout.rml b/addons/sale_layout/report/report_sale_layout.rml
index d33d424a8a2..b01affd5329 100755
--- a/addons/sale_layout/report/report_sale_layout.rml
+++ b/addons/sale_layout/report/report_sale_layout.rml
@@ -318,13 +318,13 @@
[[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom'] ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ a['price_unit'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ formatLang(a['price_unit'], digits=get_digits(dp='Sale Price')) ]]
|
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['discount'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['discount'], digits=get_digits(dp='Sale Price')) ]]
|
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['price_subtotal'] ]] [[ o.pricelist_id.currency_id.symbol ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['price_subtotal'], digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id.symbol ]]
|
@@ -397,7 +397,7 @@
Taxes :
- [[ formatLang(o.amount_tax ) ]] [[ o.pricelist_id.currency_id.symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account') ) ]] [[ o.pricelist_id.currency_id.symbol ]]
|
From 69d838d81173a2cd4444aab9f40931e56826798b Mon Sep 17 00:00:00 2001
From: vth
Date: Fri, 1 Oct 2010 17:46:41 +0530
Subject: [PATCH 7/9] [IMP] account: remove extra groups from accounting
configration and place correct account manager group on it
bzr revid: vth@tinyerp.com-20101001121641-26161pur7ueippbe
---
addons/account/account_menuitem.xml | 8 ++++----
addons/account/security/account_security.xml | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index c04da9dec65..fc4d350ea36 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -17,12 +17,12 @@
-
-
-
+
+
+
-
+
-
+
-