[FIX] base: Traceback when creating a submenu
When self.name is False, the following expression: "self.parent_id._get_full_name(level - 1) + MENU_ITEM_SEPARATOR + self.name" raised: "TypeError: coercing to Unicode: need string or buffer, bool found" opw:706202
This commit is contained in:
@@ -55,7 +55,7 @@ class IrUiMenu(models.Model):
|
||||
if level <= 0:
|
||||
return '...'
|
||||
if self.parent_id:
|
||||
return self.parent_id._get_full_name(level - 1) + MENU_ITEM_SEPARATOR + self.name
|
||||
return self.parent_id._get_full_name(level - 1) + MENU_ITEM_SEPARATOR + (self.name or "")
|
||||
else:
|
||||
return self.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user