Community mailing list archives
community@mail.odoo.com
Browse archives
Re: How to import data from postgresql to excel
Re: Fw: Inheriting the selection field "Product Type"('type')
Re: Fw: Inheriting the selection field "Product Type"('type')
by
Martin Trigaux (mat)
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. https://www.odoo.com/documentation/8.0/reference/orm.html#openerp.fields.Selection https://github.com/odoo/odoo/blob/f59f9e7/addons/account/models/account_payment.py#L185 -- Martin Trigaux Odoo (Formerly OpenERP) https://odoo.com https://github.com/mart-e
Reference
-
Fw: Inheriting the selection field "Product Type"('type')
bysayali.kothawade-
Re: Fw: Inheriting the selection field "Product Type"('type')
byOpenERP Master -
Re: Fw: Inheriting the selection field "Product Type"('type')
byDanimar Ribeiro -
Re: Fw: Inheriting the selection field "Product Type"('type')
byAVANZOSC, S.L, Ana Juaristi Olalde -
Re: Fw: Inheriting the selection field "Product Type"('type')
bysayali.kothawade -
Re: Fw: Inheriting the selection field "Product Type"('type')
byMartin Trigaux (mat) -
Re: Fw: Inheriting the selection field "Product Type"('type')
byAit-Mlouk Addi
-