why <field name="lang" select="2"/> displays different in the page

Asked by Bushair

Why <field name="lang" select="2"/> displays as Language in the screen not as "lang"?
Where this mapping of lang to Language is done?
i couldnt see it in XML?

Also why <field name="customer" select="1"/> displays as" ?Customer" not as "Customer" ?

Please refer the screen


Question information

English Edit question
Odoo Addons (MOVED TO GITHUB) Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Naresh(OpenERP) (nch-openerp) said :

HI ,

If you look at the partner class in .partnerpy you will see the field declaration

'lang': fields.selection(_lang_get, 'Language', size=5, help="If the selected language is loaded in the system, all documents related to this partner will be printed in this language. If not, it will be english."),

where the string is declared. the mapping is done from here. Same is the case with 'Customer'


Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :

Hi Bushair,

In the convention,<field name="lang" select="2"/>;
That name indicates the name of the field which is a column in table.
Language is the string to be displayed for that field.

If you want to display your desired name,add string attribute to the tag as <field name="lang" select="2" string="My own String"/>.

Talking about " ?Customer",it means that there is a help available regarding the entry to this field.

Its demonstrated by help='Some Text' in the field definition in .py file.

It would be nice for you if you go through the documentation of OpenERP.

Hope this helps.
Thank you.

Can you help with this problem?

Provide an answer of your own, or ask Bushair for more information if necessary.

To post a message you must log in.