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
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
5
Antworten
3878
Ansichten
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) ?
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren
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>