Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3006 Widoki

 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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
4
mar 24
3353
1
paź 23
5322
4
gru 23
22247
5
lip 24
15608
1
cze 22
6556