You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 lines
1.0 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inherit to add the custom field views-->
<record id="view_payment_term_form" model="ir.ui.view">
<field name="name">account.payment.term.form</field>
<field name="model">account.payment.term</field>
<field name="inherit_id" ref="account.view_payment_term_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='value']" position="after">
<field name="period_type" attrs="{'required':[('value','=','instalment')],'invisible': [('value', 'not in', ['instalment'])]}"/>
<field name="period_count" attrs="{'required':[('value','=','instalment')],'invisible': [('value', 'not in', ['instalment'])]}"/>
</xpath>
<xpath expr="//tree/field[@name='value_amount']" position="attributes">
<attribute name="attrs">{'invisible':[('value','in',['balance','instalment'])]}</attribute>
</xpath>
</field>
</record>
</odoo>