[IMP] improve the supplier payment and write check view.

bzr revid: nco@tinyerp.com-20120626100539-nu49v8dttvjs5r3t
This commit is contained in:
Nimesh (Open ERP) 2012-06-26 15:35:39 +05:30
parent 20a04f01de
commit 6ecc7cc97e
2 changed files with 24 additions and 32 deletions

View File

@ -2,28 +2,7 @@
<openerp>
<data>
<!-- <field name="inherit_id" ref="account_voucher.view_vendor_payment_form" />
<field name="arch" type="xml">
<h1 position="replace">
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/>
</h1>
<field name="journal_id" position="after">
<newline/>
<field name="allow_check" invisible="1"/>
<field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="6"/>
<newline/>
</field>
<field name="number" position="replace">
<field name="number" attrs="{'readonly':[('allow_check','!=',1)]}" />
</field>
<button name="proforma_voucher" position="after">
<button name="print_check" icon="gtk-print" string="Print Check" type="object" attrs="{'invisible':['|',('allow_check','!=',1),('state','!=','posted') ]}"/>
</button>
</field> -->
<!-- Supplier voucher view -->
<!-- Supplier write check view -->
<record model="ir.ui.view" id="view_vendor_payment_check_form">
<field name="name">account.voucher.payment.check.form</field>
@ -48,8 +27,15 @@
widget="selection"
on_change="onchange_journal(journal_id, line_dr_ids, False, partner_id, date, amount, type, company_id, context)"
string="Payment Method"/>
<field name="amount" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="6"/>
</group>
<group>
<label for="amount" string="Total" class="oe_inline"/>
<div>
<field name="amount" class="oe_inline" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/> -
<field name="amount_in_word" class="oe_inline" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="1"/>
</div>
</group>
<group col="4">
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>

View File

@ -150,17 +150,23 @@
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet string="Bill Payment">
<label for="partner_id" class="oe_edit_only" string="Supplier"/>
<h1>
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/>
</h1>
<group col="4">
<field name="amount" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection"
on_change="onchange_journal(journal_id, line_dr_ids, False, partner_id, date, amount, type, company_id, context)"
string="Payment Method"/>
<h2>
Pay
<field name="amount" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)" nolabel="1"/>
by
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection" class="oe_inline"
on_change="onchange_journal(journal_id, line_dr_ids, False, partner_id, date, amount, type, company_id, context)"
nolabel="1" colspan="4"/>
</h2>
<group col="4">
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>