[IMP] account_voucher : from invoice form the tab "payment information" tab visible

bzr revid: rpr@tinyerp.com-20120925084949-7o3n24opjimhi7fk
This commit is contained in:
Rajesh Prajapati (OpenERP) 2012-09-25 14:19:49 +05:30
parent 325115166b
commit 6cf318cb39
2 changed files with 5 additions and 5 deletions

View File

@ -8,9 +8,9 @@
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_open'][last()]" position="after">
<button name="invoice_pay_customer" type="object" string="Register Payment"
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}"/>
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}" context="{'payment_info':True}"/>
<button name="invoice_pay_customer" type="object" string="Register Payment"
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',False)]}" class="oe_highlight"/>
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',False)]}" class="oe_highlight" context="{'payment_info':True}"/>
</xpath>
</field>
</record>
@ -20,7 +20,7 @@
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_open'][last()]" position="after">
<button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight"/>
<button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight" context="{'payment_info':True}"/>
</xpath>
</field>
</record>

View File

@ -154,7 +154,7 @@
</group>
</group>
<notebook>
<page string="Payment Information">
<page string="Payment Information" invisible="context.get('payment_info', False)">
<field name="line_dr_ids" attrs="{'invisible': [('line_dr_ids','=',False)]}" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
<tree string="Supplier Invoices and Outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
@ -327,7 +327,7 @@
</group>
<notebook>
<page string="Payment Information" groups="base.group_user">
<page string="Payment Information" groups="base.group_user" invisible="context.get('payment_info', False)">
<field name="line_cr_ids" attrs="{'invisible': [('line_cr_ids','=',False)]}" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"