Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1081 Vistas

Somehow it dont show the code here, so i try in words to explain.


I have added a field with name:  x_studio_service_vertrag_2 which contains either Standard, Professional or Ultimate.


Now i want an if else to check if  x_studio_service_vertrag_2 has the value Standard, then put some text, else if it has the value Professional, then put some other text, else, also some other text.

I don't geht the right syntax in the if else statement to put in res.partner.form.

Might someone know the syntax for the "if", to check if  x_studio_service_vertrag_2 has the value "Standard"?


Avatar
Descartar
Mejor respuesta

Hi,
You can add the Label/ String to any field in Odoo dynamically depending on other fields. Please refer to the blog on

 How to Dynamically Change Label/String using fields_view_get for more details.


Hope it helps

Avatar
Descartar
Autor Mejor respuesta

Hi

Thanks for your reply.

I was a bit confused on how i should getting this to work with this link (I am totally new in xml and odoo), but i found some way which it works at least half.

i made a multiline text field in odoo with name 'x_studio_service_zeiten'


then i did following in xml:


this is half working. it shows the right times depending on the selected value on x_studio_service_vertrage_2

The Text should be in the red area, and not in the actual green area: ('Service Zeiten' is x_studio_service_zeiten)

so i think string is not the right place to put in my text? But where than?




Avatar
Descartar