Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2996 Prikazi

 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.

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
4
mar. 24
3348
1
okt. 23
5322
4
dec. 23
22246
5
jul. 24
15608
1
jun. 22
6554