From b1991d21d501face1db8383c99ecd9b9ead145e3 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Thu, 24 Jun 2010 01:14:06 +0530 Subject: [PATCH] [IMP]: accounting improvements * account.move * account.move.line * account.invoice * account.voucher * bank statement bzr revid: mga@tinyerp.com-20100623194406-3go72eb7hseiylhb --- addons/account/account_bank_statement.py | 10 +- addons/account/account_invoice_view.xml | 8 +- addons/account/account_report.xml | 2 +- addons/account/account_view.xml | 105 +++++++++++++----- .../process/customer_invoice_process.xml | 8 +- .../process/supplier_invoice_process.xml | 6 +- addons/account_voucher/voucher_report.xml | 4 +- addons/account_voucher/voucher_view.xml | 17 ++- 8 files changed, 112 insertions(+), 48 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 6de3dabaa28..0e46944a436 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -45,7 +45,7 @@ class account_bank_statement(osv.osv): 'type': 'ir.actions.act_window', 'target': 'new', 'nodestroy': True - } + } def _default_journal_id(self, cr, uid, context={}): if context.get('journal_id', False): @@ -556,9 +556,9 @@ account_bank_statement_reconcile_line() class account_bank_statement_line(osv.osv): - def onchange_partner_id(self, cursor, user, line_id, partner_id, type, currency_id, - context={}): + def onchange_partner_id(self, cursor, user, line_id, partner_id, type, currency_id, context={}): res = {'value': {}} + if not partner_id: return res line = self.browse(cursor, user, line_id) @@ -591,6 +591,10 @@ class account_bank_statement_line(osv.osv): balance = res_currency_obj.compute(cursor, user, company_currency_id, currency_id, balance, context=context) res['value']['amount'] = balance + + if context.get('amount', 0) > 0: + res['value']['amount'] = context.get('amount') + return res def _reconcile_amount(self, cursor, user, ids, name, args, context=None): diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index bceb1b3c857..fc10c58cc8f 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -349,11 +349,15 @@ + + - + + + @@ -363,7 +367,7 @@ - + diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 6480178d1ae..fc622d8f0c0 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -34,7 +34,7 @@ string="Taxes Report"/> tree,form - + + + account.bank.statement.select + account.bank.statement + search + + + + + + + + + + + + + + account.bank.statement.tree account.bank.statement @@ -358,19 +376,20 @@ form
- - - - - - - - -