Community mailing list archives

Re: override name_get in new api

Martin Trigaux (mat)
- 08/27/2014 09:27:47

Sorry to contradict you but it's actually still name_get that you should
The initial intended behaviour was indeed to have display_name as
replacement of name_get. However there were lot's of issues with the
initial implementation and it was not backward compatible with the old
api and we have to partially go back to old behaviour[1].

So the current behaviour of the name_get/display_name is the following:

name_get is still the main function used for rendering
display_name is a computed field that will use name_get
If you want to change both, you should still override name_get (see
event for example[2]).

Changing the method of display_name would affect only display_name, not
name_get (can be what we want[3] but usually not).

We may change one day to fully use display_name and drop name_get but
that means breaking the backward-compatibility.

Hope it's clear.


Martin Trigaux
Odoo (Formerly OpenERP)

On 08/27/2014 10:20 AM, abhishek jaiswal wrote:
> can any body tell me how to override name_get() function in new api
> --
> With Warm Regards
> Abhishek Jaiswal