[FIX] product: correct name_create method

name_create returns a tuple (id, name), not a recordset

Closes #15276
This commit is contained in:
Miku Laitinen
2017-01-30 16:56:17 +01:00
committed by Martin Trigaux
parent 6a7c05112b
commit 321cc715d8
+1 -1
View File
@@ -84,7 +84,7 @@ class ProductUoM(models.Model):
if misc_category:
values['category_id'] = misc_category.id
else:
values['category_id'] = EnglishUoMCateg.name_create('Unsorted/Imported Units').id
values['category_id'] = EnglishUoMCateg.name_create('Unsorted/Imported Units')[0]
new_uom = self.create(values)
return new_uom.name_get()[0]