I was trying to edit a selection field on my custom module via python code.
Original Field Definition
unit_of_measurement = fields.Selection(
string='Unit of Measurement',
selection=[
('meter', 'Meter'),
('feet', 'Feet'),
],
)
I changed it to:
unit_of_measurement = fields.Selection(
string='Unit of Measurement of to get Size Area',
selection=[
('square_meter', 'Square meters'),
('squre_feet', 'Square feet'),
],
)
What Happened After the Update:
When you updated your custom module, Odoo did not remove the old options. Instead, it combined both the old and new selection values,
Options became:
- meter
- feet
- square_meter
- squre_feet
Can someone explain to me what could be the cause and how can I resolve it? Thank you in advance!