How to create selection field in Odoo
5 maart, 2021 in
How to create selection field in Odoo
Administrator
| Nog geen reacties


To make selection field in OpenERP (Odoo)

In Selection Field first we have to go in .py file (python file) After that we have to decide where you want to give selection Field and then give attribute Selection to that field.

Like below python code in .py file –

  1. class product_product(osv.osv):
  2. _inherit=’product.product’
  3. _columns= {
  4. ‘Inventory_Type’:fields.selection (((‘inventory’, ‘Inventory’), (‘services’, ‘Services’), (‘group’, ‘Group’)), ‘Inventory Type’),
  5. }
  6. product_product()
Aanmelden om een reactie achter te laten