From 45e6a0401488cce80672e0a7723ce04ecce311a8 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 14 Sep 2010 19:16:07 +0530 Subject: [PATCH] [IMP]:improve for the -ve entry with the journal voucher bzr revid: mga@tinyerp.com-20100914134607-9wexghheuzyoah1r --- addons/account_voucher/voucher.py | 4 ++-- addons/account_voucher/voucher_view.xml | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 45e4cf62fe5..4215c08fc94 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -790,10 +790,10 @@ class account_voucher_line(osv.osv): journal = journal_pool.browse(cr, user, journal_id) account_id = False ttype = 'cr' - if journal.type in ('sale', 'purchase_refund'): + if journal.type in ('sale', 'sale_refund'): account_id = journal.default_credit_account_id and journal.default_credit_account_id.id or False ttype = 'cr' - elif journal.type in ('purchase', 'expense', 'sale_refund'): + elif journal.type in ('purchase', 'expense', 'purchase_refund'): account_id = journal.default_debit_account_id and journal.default_debit_account_id.id or False ttype = 'dr' elif partner_id: diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 2f5fcadbad2..f8de8baf1b8 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -41,7 +41,7 @@ - + @@ -51,7 +51,7 @@ - + @@ -61,11 +61,17 @@ - - - - - + + + + + + + + +