odooodoo-10odoo-view

Odoo 10: Add extra fields to the product form


I want to add a couple of extra fields to the product form, right after 'standard_price'.

I created a view that inherits from "product.product_template_form_view" and added my fields there:

<field name="standard_price" position="after">
        <field name="my_field" />
</field>

I then restart odoo updating the module, but I don't see my new fields when I call the product form.

The fields appear on the database model (created inherited models also), but not on the user interface.

What I'm missing here?


Solution

  • Check these things:

    Template code for working view with a new field after standard_price_uom div:

    <div name='standard_price_uom' position="after">
      <field name="my_field" />
    </div>
    

    If these does not help, please provide whole view definition.