How to move a field in a view?

  • type
  • info created for version
  • mvc
      XML (records/views/templates)
Add to Cart

  <xpath expr="//field[@name='active']" position="before">
    <xpath expr="//field[@name='barcode']" position="move"/>

Before Odoo 12 you first have to set the moving field to invisible and adding it again at the right position!

<field name="product_brand_id" position="attributes">
    <attribute name="invisible">1</attribute>
<field name="name" position="before">
    <field name="product_brand_id"/>