[FIX]: fix small probelm in the journal vouchers

bzr revid: mga@tinyerp.com-20100909103301-d605s006chtwwqct
This commit is contained in:
Mantavya Gajjar 2010-09-09 16:03:01 +05:30
parent 52725e844f
commit acad9fa69c
2 changed files with 4 additions and 3 deletions

View File

@ -13,6 +13,7 @@
<field name="partner_id"/>
<field name="journal_id"/>
<field name="period_id" groups="base.group_extended" invisible="context.get('visible', True)"/>
<field name="type" invisible="context.get('visible', True)"/>
<field name="amount" sum="Total Amount"/>
<field name="state"/>
<button name="proforma_voucher" string="Post" states="draft" icon="terp-document-new"/>
@ -27,10 +28,10 @@
<field name="arch" type="xml">
<form string="Accounting Voucher">
<group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id)"/>
<field name="name" colspan="4"/>
<field name="type" on_change="onchange_partner_id(partner_id, journal_id)"/>
<field name="reference" select="1"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id)"/>
<field name="type" on_change="onchange_partner_id(partner_id, journal_id)"/>
<field name="journal_id" widget="selection" select="1" on_change="onchange_partner_id(partner_id, journal_id)"/>
<field name="account_id" widget="selection" invisible="True"/>
</group>

View File

@ -136,7 +136,7 @@ class account_voucher_open(osv.osv_memory):
'view_mode': 'tree,graph,form',
'res_model': 'account.voucher',
'view_id': False,
'context': "{'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d, 'partner_id':%s}" % (journal_id, journal_id, period_id, context.get('partner_id',False)),
'context': "{'search_default_journal_id':%d, 'search_default_period_id':%d, 'partner_id':%s}" % (journal_id, period_id, context.get('partner_id',False)),
'type': 'ir.actions.act_window',
'search_view_id': res_id
}