I know that there are exactly the same question here:
But I tried the answers with no result. In the standard kanban view of a partner, if this one is a person, their name is shown as following:
company, name
If I check the code of the kanban view, I find the line which is showing the name:
<h4 class="oe_partner_heading"><a type="open"><field name="name"/></a></h4>
But why is showing the column display_name instead of name?
I tried to remove that, and I cannot, because, let's show my example:
This works, and shows the phone just after the display_name (why display_name??? I specified name):
<xpath expr="//kanban/templates//div//div/h4" position="replace">
<h4><a type="open"><field name="name"/> <field name="phone"/></a></h4> ...
This does not work:
<xpath expr="//kanban/templates//div//div/h4" position="replace">
<h4><a type="open"><field name="phone"/></a></h4> ...
It seems that if I remove the field name, it will not work. Anyone knows about this problem? How can I remove the name of the company in the kanban view if the partner is a person?
EDIT
def name_get(self, cr, uid, ids, context=None):
if context is None:
context = {}
if isinstance(ids, (int, long)):
ids = [ids]
res = []
for record in self.browse(cr, uid, ids, context=context):
name = record.name
res.append((record.id, name))
return res