How to replace a value in a selection field by keeping all its properties (linkings and computations) intact in the existing model, i.e. the new added value should inherit all the properties of the replaced value.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
1
Responder
2954
Vistas
Hi,
If you just need to change the value displayed to the end user, you can easily achieve it as follows:
1. Inherit the model, in your custom module
2. Using selection_add and keeping the same selection_key, replace the value with new value.
See a sample of changing the type in stock picking type model:
code = fields.Selection(selection_add=[
('incoming', 'New Value')
])
Thanks
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
4
mar 24
|
3265 | ||
|
1
oct 23
|
5219 | ||
|
4
dic 23
|
22145 | ||
|
5
jul 24
|
15467 | ||
|
1
jun 22
|
6434 |