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
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
5
Antwoorden
3884
Weergaven
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) ?
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden
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>