From be63c95cb212dacdef0f1a0279ccd25ce087ac59 Mon Sep 17 00:00:00 2001
From: "ACH,VRA" <>
Date: Mon, 26 Oct 2009 19:20:06 +0530
Subject: [PATCH] [FIX] Account_voucher : Typo corrected for Voucher type.
bzr revid: jvo@tinyerp.com-20091026135006-81oxfwxcw6e3sugm
---
addons/account_voucher/voucher.py | 7 +++----
addons/account_voucher/voucher_view.xml | 4 ++--
addons/account_voucher/wizard/open_voucher.py | 4 ++--
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index d1dc30c6b67..6fd5204d318 100755
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -214,7 +214,7 @@ class account_voucher(osv.osv):
for il in iml:
if il['account_analytic_id']:
- if inv.type in ('pay_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
+ if inv.type in ('pay_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
@@ -244,7 +244,7 @@ class account_voucher(osv.osv):
diff_currency_p = inv.currency_id.id <> company_currency
total = 0
- if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
+ if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
@@ -508,12 +508,11 @@ class VoucherLine(osv.osv):
res.append(self.move_line_get_item(cr, uid, line, context))
return res
- def onchange_partner(self, cr, uid, ids, partner_id, ttype,type1):
+ def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1):
if not partner_id:
return {'value' : {'account_id' : False, 'type' : False ,'amount':False}}
obj = self.pool.get('res.partner')
account_id = False
-
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
balance = obj.browse(cr,uid,partner_id).credit
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 089ec8d1614..28233ad6f8c 100755
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -231,8 +231,8 @@
form
form,tree
- [('type','=','journal_sale_voucher')]
- {'type':'journal_sale_voucher'}
+ [('type','=','journal_sale_vou')]
+ {'type':'journal_sale_vou'}
diff --git a/addons/account_voucher/wizard/open_voucher.py b/addons/account_voucher/wizard/open_voucher.py
index 253d220dbb9..c88819df315 100644
--- a/addons/account_voucher/wizard/open_voucher.py
+++ b/addons/account_voucher/wizard/open_voucher.py
@@ -45,7 +45,7 @@ _types = {
'rec_voucher':'Cash Receipt Voucher',
'bank_rec_voucher':'Bank Receipt Voucher',
'cont_voucher':'Contra Voucher',
- 'journal_sale_voucher':'Journal Sale Voucher',
+ 'journal_sale_vou':'Journal Sale Voucher',
'journal_pur_voucher':'Journal Purchase Voucher'
}
_states = {
@@ -62,7 +62,7 @@ _voucher_fields = {
('rec_voucher','Cash Receipt Voucher'),
('bank_rec_voucher','Bank Receipt Voucher'),
('cont_voucher','Contra Voucher'),
- ('journal_sale_voucher','Journal Sale Voucher'),
+ ('journal_sale_vou','Journal Sale Voucher'),
('journal_pur_voucher','Journal Purchase Voucher')], 'required':True},
'state': {'string':'State', 'type':'selection', 'selection':[
('draft','Draft'),