Community mailing list archives


Re: Fw: Inheriting the selection field "Product Type"('type')

Martin Trigaux (mat)
- 07/01/15 07:56:23
On 01/07/15 13:11, Sayali Kothawade wrote:
> 'type': fields.selection([('raw', 'Raw Material'),('product', 'Stockable Product'), ('consu', 'Consumable'), ('service','Service')], 'Product Type', required=True"),

Doing so you are changing the properties of the field, not adding
possibilities in the selection.

Instead you should use the new API (assuming you are developing for
version 8) and use the selection_add attribute.
When redefining a field in the new API, you just need to specify the
attributes that are modified.

Martin Trigaux
Odoo (Formerly OpenERP)