Files
odoo_source/addons/account_fleet/views/account_move_views.xml
T
John Laterre (jol) 16872e63a4 [IMP] account_fleet: assets/fleet/DNA/accounting
The goal is to improve the way Disallowed Expenses (DNA - Dépenses Non Admises)
and Assets (vehicles in particular) work.

This should help integrate the Accounting and Fleet modules.

closes odoo/odoo#76684

Task: 2641494
Related: odoo/upgrade#3067
Related: odoo/enterprise#20950
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-25 09:56:59 +00:00

47 lines
2.3 KiB
XML

<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="view_move_form" model="ir.ui.view">
<field name="name">account.move.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='line_ids']//field[@name='name']" position="after">
<field name='need_vehicle' invisible='1'/>
<field name='vehicle_id' attrs="{'required': [('need_vehicle', '=', True), ('parent.move_type', 'in', ('in_invoice', 'in_refund'))], 'column_invisible': [('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}" optional='hidden'/>
</xpath>
<xpath expr="//field[@name='invoice_line_ids']//field[@name='name']" position="after">
<field name='need_vehicle' invisible='1'/>
<field name='vehicle_id' attrs="{'required': [('need_vehicle', '=', True), ('parent.move_type', 'in', ('in_invoice', 'in_refund'))], 'column_invisible': [('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}" optional='hidden'/>
</xpath>
</field>
</record>
<record id="account_move_view_tree" model="ir.ui.view">
<field name="name">account.move.tree.inherit.fleet</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_tree"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="attributes">
<attribute name="string">Creation Date</attribute>
</xpath>
<xpath expr="//field[@name='date']" position="after">
<field name="invoice_date" optional="show"/>
</xpath>
</field>
</record>
<record id="view_move_line_tree_fleet" model="ir.ui.view">
<field name="name">view.move.line.tree.fleet</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position='after'>
<field name="vehicle_id" optional='hidden'/>
</xpath>
</field>
</record>
</odoo>