[FIX]GOLEM Resource Option : need unicode string to handle non-ascii / special characters

This commit is contained in:
Fabien BOURGEOIS 2018-03-29 07:56:20 +02:00
parent 7b390534f2
commit e7fad86347

View File

@ -36,7 +36,7 @@ class GolemResourceOptionSelection(models.Model):
@api.multi @api.multi
def _compute_name(self): def _compute_name(self):
for selection in self: for selection in self:
selection.name = "{}/{}".format(selection.resource_id.name, selection.option_id.name) selection.name = u"{}/{}".format(selection.resource_id.name, selection.option_id.name)
_sql_constraints = [ _sql_constraints = [
('unique_selection', "UNIQUE(resource_id, option_id, reservation_id)", ('unique_selection', "UNIQUE(resource_id, option_id, reservation_id)",