Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3016 Ansichten

 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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
4
März 24
3357
1
Okt. 23
5325
4
Dez. 23
22251
5
Juli 24
15613
1
Juni 22
6561