İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3050 Görünümler

 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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
4
Mar 24
3395
1
Eki 23
5351
4
Ara 23
22276
5
Tem 24
15646
1
Haz 22
6591