From 321cc715d882aee5bff1944e25424e7ffba4940a Mon Sep 17 00:00:00 2001 From: Miku Laitinen Date: Mon, 30 Jan 2017 17:56:17 +0200 Subject: [PATCH] [FIX] product: correct name_create method name_create returns a tuple (id, name), not a recordset Closes #15276 --- addons/product/models/product_uom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/models/product_uom.py b/addons/product/models/product_uom.py index 9c3baa4d6db..23acd5a5294 100644 --- a/addons/product/models/product_uom.py +++ b/addons/product/models/product_uom.py @@ -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]