From 7536a0a67635aa48e31d107b7a704c8e52ee438b Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 20 Oct 2008 11:06:28 +0530 Subject: [PATCH 1/4] small changes in the partner balance wizard bzr revid: patelamit2003@gmail.com-20081020053628-z8k5l8aim64y1x36 --- addons/account/wizard/wizard_partner_balance_report.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/wizard/wizard_partner_balance_report.py b/addons/account/wizard/wizard_partner_balance_report.py index 09c9f765b5a..6acc4197e96 100644 --- a/addons/account/wizard/wizard_partner_balance_report.py +++ b/addons/account/wizard/wizard_partner_balance_report.py @@ -117,7 +117,6 @@ class wizard_report(wizard.interface): else: raise wizard.except_wizard('UserError','Date not in a defined fiscal year') - states = { 'init': { 'actions': [_get_defaults], From 3b06d075edfb74a1859c04163ff293a4a411cb10 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 20 Oct 2008 11:16:17 +0530 Subject: [PATCH 2/4] Error Solved : [Mon Oct 20 11:14:27 2008] ERROR:report:report account.partner.balance: Traceback (most recent call last): File "/home/apa/Bazar Branches/openobject-server/bin/report/report_sxw.py", line 395, in _eval res = eval(expr, self.localcontext) File "", line 1, in File "/home/apa/Bazar Branches/openobject-addons/account/report/partner_balance.py", line 560, in _sum_scredit result_tmp = self.cr.fetchone()[0] TypeError: 'NoneType' object is unsubscriptable 'NoneType' object is unsubscriptable expr: (sum_scredit(data)-sum_sdebit(data)) or '0.0' bzr revid: patelamit2003@gmail.com-20081020054617-9aj0rrpo33vp31x5 --- addons/account/report/partner_balance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/report/partner_balance.py b/addons/account/report/partner_balance.py index 08dab933af3..057d8f1ae76 100644 --- a/addons/account/report/partner_balance.py +++ b/addons/account/report/partner_balance.py @@ -556,8 +556,9 @@ class partner_balance(report_sxw.rml_parse): 'GROUP BY partner_id', (self.date_lst[0],)) + print"self.cr.fetchone()[0]",self.cr.fetchone()[0] if self.cr.fetchone() != None: - result_tmp = float(self.cr.fetchone()[0]) + result_tmp = self.cr.fetchone()[0] else: result_tmp = 0.0 # From e57ba14d27bee191986685bd229f1d918a52e259 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 20 Oct 2008 12:03:13 +0530 Subject: [PATCH 3/4] Small changs in partner Balance Wizard and (Amit Patel) Cost Ledger : THe number of the analytic account should be on the left, now, it s on the right or centered(Rana Vinay) bzr revid: patelamit2003@gmail.com-20081020063313-h895flnex31uw6bl --- addons/account/project/report/cost_ledger.rml | 29 ++++++++++--------- addons/account/report/partner_balance.py | 5 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml index ab73f3ce5d1..f3640e421d6 100644 --- a/addons/account/project/report/cost_ledger.rml +++ b/addons/account/project/report/cost_ledger.rml @@ -72,18 +72,20 @@ - - + + + + @@ -125,6 +127,7 @@ + @@ -162,7 +165,7 @@ - + Period from @@ -175,7 +178,7 @@ - + [[ data['form']['date1'] ]] @@ -192,7 +195,7 @@
- + Code / Date @@ -212,10 +215,10 @@ - + - Total : + Total : @@ -236,10 +239,10 @@ [[ repeatIn(objects,'o') ]] - + - [[ o.code ]] + [[ o.code ]] [[ o.complete_name ]] @@ -258,10 +261,10 @@ [[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2']),'move_g') ]] - + - [[ move_g['code'] ]] + [[ move_g['code'] ]] [[ move_g['name'] ]] @@ -279,7 +282,7 @@ [[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2']),'move_a') ]] - + [[ move_a['date'] ]] @@ -315,4 +318,4 @@ - + \ No newline at end of file diff --git a/addons/account/report/partner_balance.py b/addons/account/report/partner_balance.py index 057d8f1ae76..ea0a9864d39 100644 --- a/addons/account/report/partner_balance.py +++ b/addons/account/report/partner_balance.py @@ -555,10 +555,9 @@ class partner_balance(report_sxw.rml_parse): 'AND l.reconcile_id IS NULL ' \ 'GROUP BY partner_id', (self.date_lst[0],)) - - print"self.cr.fetchone()[0]",self.cr.fetchone()[0] + print"self.cr.fetchone()[0]",self.cr.fetchone() if self.cr.fetchone() != None: - result_tmp = self.cr.fetchone()[0] + result_tmp = float(self.cr.fetchone()[0]) or 0.0 else: result_tmp = 0.0 # From 8d297c524910f8d764eabbfadb0807747e259bbf Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 20 Oct 2008 12:45:25 +0530 Subject: [PATCH 4/4] Small changes in wizard view(partner balance) bzr revid: patelamit2003@gmail.com-20081020071525-zz3k0emeykjzbq38 --- .../account/wizard/wizard_partner_balance_report.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/account/wizard/wizard_partner_balance_report.py b/addons/account/wizard/wizard_partner_balance_report.py index 6acc4197e96..1fb8012a886 100644 --- a/addons/account/wizard/wizard_partner_balance_report.py +++ b/addons/account/wizard/wizard_partner_balance_report.py @@ -40,17 +40,16 @@ period_form = ''' - - + + - - + - + ''' @@ -60,7 +59,7 @@ period_fields = { 'string':"Date/Period Filter", 'type':'selection', 'selection':[('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')], - 'default': lambda *a:'byperiod' + 'default': lambda *a:'all' }, 'fiscalyear': { 'string':'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear',