[FIX] product: correct name_create method
name_create returns a tuple (id, name), not a recordset Closes #15276
This commit is contained in:
committed by
Martin Trigaux
parent
6a7c05112b
commit
321cc715d8
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user