Ajuda

0

How to set a _rec_name value through web client development?

Avatar
Zeeshan Khan

I am using the web client for my development and wanted to know wether is was possible to set a _rec_name value through there.

I have created a many2one field but the lookup shows the ids not a field value. Also through the web client you cannot create a name field as all custom fields must start with 'x_'

How can I choose a field to display in the lookup instead of the id.

4 Comentários
Avatar
Descartar
Avatar
Abhishek H Menon
-

you have to overide name_get method inside the model instead of id name will be shown

Avatar
Zeeshan Khan
-

Hi, How can I achieve this through the web client. I have created the object through going to Technical -> Database Structure -> Models.

Avatar
Grover Menacho
-

Well, it's better if you don't do that through the web client, if you update some base modules everything is going to dissapear. Create a module and code everything there.

Avatar
Abhishek H Menon
-

I agree with Grover. Maximum you must do all the edits and updates on the coding part. Because suppose when you wish to update the module all the changes you made in the client side will disappear. And that practice is also not good. So try with coding.