account_move_views.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version='1.0' encoding='utf-8'?>
  2. <odoo>
  3. <record id="view_move_form" model="ir.ui.view">
  4. <field name="name">account.move.form</field>
  5. <field name="model">account.move</field>
  6. <field name="inherit_id" ref="account.view_move_form"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//field[@name='line_ids']//field[@name='account_id']" position="after">
  9. <field name='need_vehicle' invisible='1'/>
  10. <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'/>
  11. </xpath>
  12. <xpath expr="//field[@name='invoice_line_ids']//field[@name='account_id']" position="after">
  13. <field name='need_vehicle' invisible='1'/>
  14. <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'/>
  15. </xpath>
  16. </field>
  17. </record>
  18. <record id="account_move_view_tree" model="ir.ui.view">
  19. <field name="name">account.move.tree.inherit.fleet</field>
  20. <field name="model">account.move</field>
  21. <field name="inherit_id" ref="account.view_move_tree"/>
  22. <field name="mode">primary</field>
  23. <field name="arch" type="xml">
  24. <xpath expr="//field[@name='date']" position="attributes">
  25. <attribute name="string">Creation Date</attribute>
  26. </xpath>
  27. <xpath expr="//field[@name='date']" position="after">
  28. <field name="invoice_date" optional="show"/>
  29. </xpath>
  30. </field>
  31. </record>
  32. <record id="view_move_line_tree_fleet" model="ir.ui.view">
  33. <field name="name">view.move.line.tree.fleet</field>
  34. <field name="model">account.move.line</field>
  35. <field name="inherit_id" ref="account.view_move_line_tree"/>
  36. <field name="arch" type="xml">
  37. <xpath expr="//field[@name='name']" position='after'>
  38. <field name="vehicle_id" optional='hidden'/>
  39. </xpath>
  40. </field>
  41. </record>
  42. </odoo>