From 72c6bc7ac5408996ee010a65afb7f57a35697c6e Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Fri, 29 Oct 2010 11:25:58 +0530 Subject: [PATCH] [FIX] account: view while selecting voucher_id(payment) for account.bank.statement.line from bank and cash statement bzr revid: psi@tinyerp.co.in-20101029055558-awbslxjkm255edod --- addons/account_voucher/account_voucher.py | 4 ++-- addons/account_voucher/account_voucher_view.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index b8d155a993f..0e3ea22c73e 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -115,9 +115,9 @@ class account_voucher(osv.osv): return [(r['id'], (str("%.2f" % r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')] def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): - if not view_id and context.get('invoice_type', False): + if not view_id: mod_obj = self.pool.get('ir.model.data') - if context.get('invoice_type') in ('out_invoice', 'out_refund'): + if context.get('invoice_type', False) in ('out_invoice', 'out_refund') or context.get('line_type', False) == 'customer': result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form') else: result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form') diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml index a36578bb70b..3202c75e1a5 100644 --- a/addons/account_voucher/account_voucher_view.xml +++ b/addons/account_voucher/account_voucher_view.xml @@ -199,7 +199,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -234,7 +234,7 @@ - +