[FIX] Account_voucher : Typo corrected for Voucher type.
bzr revid: jvo@tinyerp.com-20091026135006-81oxfwxcw6e3sugm
This commit is contained in:
parent
a6641dffce
commit
be63c95cb2
|
@ -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
|
||||
|
|
|
@ -231,8 +231,8 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" eval="view_voucher_form"/>
|
||||
<field name="domain">[('type','=','journal_sale_voucher')]</field>
|
||||
<field name="context">{'type':'journal_sale_voucher'}</field>
|
||||
<field name="domain">[('type','=','journal_sale_vou')]</field>
|
||||
<field name="context">{'type':'journal_sale_vou'}</field>
|
||||
</record>
|
||||
<menuitem name="Financial Management/Voucher Entries/Other Vouchers/Journal Sale Voucher" id="menu_action_view_jour_sale_voucher_form" action="action_view_jour_sale_voucher_form"/>
|
||||
<record model="ir.actions.act_window" id="action_view_jour_pur_voucher_form">
|
||||
|
|
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue