How to edit the combobox items
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
5
Replies
3423
Views
How to edit the combobox items
You can't add more combo-box options from the developer mode menu..You can make a new module in your addons directory and add this to your python code .
....
from odoo import fields,models,api
class example (models.Model):
#inherit the model that has your combo box you can find it if you clicked edit form view
#in your developer mode menu
_inherit = "your_model"
#then write your combobox field name like below and add the same option you had and add more if you want
#>> this will overwrite the field with the new value
your_combobox_field_name = fields.Selection([
('option1', 'Option 1'),
('option2', 'Option 2'),
], string='String to display', default='option1')
....
Static or dynamic (based on other model) ?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
What do you mean? Can you please explain little more?
I have a combobox whit only one option; how can i add more options? I'm in developer mode
<select>
<option value="Select">Select....</option>
<option value="java">Java</option>
<option value="html">HTML</option>
<option value="C++">C++</option>
<option value="sap">SAP</option>
</select>