Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3002 Zobrazení

 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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
bře 24
3353
1
říj 23
5322
4
pro 23
22247
5
čvc 24
15608
1
čvn 22
6555