Skip to content

Commit

Permalink
[FIX] name_get of the hr.department
Browse files Browse the repository at this point in the history
Recursive call currently fails with an IndexError as `name_get()` in new
API context returns a list of a single pair.

Closes odoo#12496
  • Loading branch information
sts-odoo authored and xmo-odoo committed Jul 4, 2016
1 parent 2b775b0 commit f8e971e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/hr/models/hr.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def name_get(self):
for record in self:
name = record.name
if record.parent_id:
name = "%s / %s" % (record.parent_id.name_get()[1], name)
name = "%s / %s" % (record.parent_id.name_get()[0][1], name)
result.append((record.id, name))
return result

Expand Down

0 comments on commit f8e971e

Please sign in to comment.