32 lines
1.9 KiB
XML
32 lines
1.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="view_move_form_vendor_bill_price_edit" model="ir.ui.view">
|
|
<field name="name">account.move.form.vendor.bill.price.edit</field>
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_move_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//page[@id='invoice_tab']//field[@name='invoice_line_ids']" position="attributes">
|
|
<attribute name="context">
|
|
{
|
|
'default_move_type': context.get('default_move_type'),
|
|
'journal_id': journal_id,
|
|
'default_partner_id': commercial_partner_id,
|
|
'default_currency_id': currency_id or company_currency_id,
|
|
'default_display_type': 'product',
|
|
'quick_encoding_vals': quick_encoding_vals,
|
|
'vendor_bill_price_edit': True
|
|
}
|
|
</attribute>
|
|
</xpath>
|
|
<xpath expr="//page[@id='invoice_tab']//field[@name='invoice_line_ids']//tree//field[@name='price_subtotal']" position="attributes">
|
|
<attribute name="attrs">{'readonly': ['|', ('parent.state', '!=', 'draft'), ('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//page[@id='invoice_tab']//field[@name='invoice_line_ids']//tree//field[@name='price_total']" position="attributes">
|
|
<attribute name="column_invisible">False</attribute>
|
|
<attribute name="attrs">{'readonly': ['|', ('parent.state', '!=', 'draft'), ('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |