1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_voucher_payment_options_purchase" model="ir.ui.view">
<field name="name">voucher.payment.options.purchase</field>
<field name="model">account.voucher</field>
<field name="inherit_id" ref="account_voucher.view_purchase_receipt_form" />
<field name="type">tree</field>
<field name="arch" type="xml">
<xpath expr="//separator[@string='Payment Terms']" position="before">
<group col="2" colspan="1">
<separator string="Payment Options" colspan="2"/>
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
<field name="account_id"
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
domain="[('type','=','liquidity')]"/>
<!-- should select income accounts only. Or use the journal for this ? -->
<field name="reference"
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
/>
<field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
</group>
</xpath>
<xpath expr="/form/notebook/page/group/group/separator[@string='Payment Terms']" position="replace">
</xpath>
<xpath expr="/form/notebook/page/group/group/field[@name='date_due']" position="replace">
</xpath>
<xpath expr="/form/group/field[@name='pay_now']" position="replace">
</xpath>
</field>
</record>
</data>
</openerp>
|