Using Odoo 13 Community Version.
I want to copy the name from a selection field not the value with api onchange method.
The selection field ist "vorgang_auswahl":
vorgang_auswahl = fields.Selection([
('gewinde', 'Gewinde schneiden'),
('senkung', 'Senken'),
('kantung', 'Kanten'),
('mikro', 'Mikroecken entfernen'),
('schweissen', 'Schweissen'),
('schleifen', 'Schleifen')],
string="Operations", default="gewinde")
The onchange method so far:
@api.onchange('vorgang_auswahl')
def _onchange_vorgang_auswahl(self):
self.name = self.vorgang_auswahl
At the moment i get the value for example "mikro", but i want "Mikroecken entfernen".
Hi,
refer the following forum posts
https://www.odoo.com/fr_FR/forum/aide-1/question/selection-field-label-42889
https://www.odoo.com/fr_FR/forum/aide-1/question/how-to-get-string-of-selection-field-148745