Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3018 Vizualizări

 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.

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
4
mar. 24
3360
1
oct. 23
5328
4
dec. 23
22252
5
iul. 24
15615
1
iun. 22
6563