2018-01-16 06:58:15 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2018-01-16 11:34:37 +01:00
|
|
|
<flectra>
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
<!-- Add "Asset Category" to supplier invoices -->
|
|
|
|
<record model="ir.ui.view" id="view_invoice_asset_category">
|
|
|
|
<field name="name">account.invoice.supplier.form</field>
|
|
|
|
<field name="model">account.invoice</field>
|
|
|
|
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='account_id']" position="before">
|
|
|
|
<field string="Asset Category" name="asset_category_id" domain="[('type','=','purchase')]" context="{'default_type':'purchase'}"/>
|
|
|
|
</xpath>
|
2018-07-24 13:15:11 +02:00
|
|
|
<xpath expr="//field[@name='partner_id']" position="after">
|
|
|
|
<field name="asset_bool" invisible="1"/>
|
|
|
|
</xpath>
|
|
|
|
<xpath expr="//field[@name='partner_id']" position="attributes">
|
|
|
|
<attribute name="attrs">{'readonly': [('asset_bool', '=', True)]}</attribute>
|
|
|
|
</xpath>
|
|
|
|
<xpath expr="//field[@name='invoice_line_ids']" position="inside">
|
|
|
|
<field name="asset_bool" invisible="1"/>
|
|
|
|
</xpath>
|
|
|
|
<xpath expr="//field[@name='invoice_line_ids']" position="attributes">
|
|
|
|
<attribute name="attrs">{'readonly': [('asset_bool', '=', True)]}</attribute>
|
|
|
|
</xpath>
|
2018-01-16 06:58:15 +01:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2018-01-16 11:34:37 +01:00
|
|
|
</flectra>
|