From 79f2b475762763c403d996ed15d2c0b10fc3a624 Mon Sep 17 00:00:00 2001
From: Guewen Baconnier <guewen@gmail.com>
Date: Tue, 3 Jun 2014 16:13:54 +0200
Subject: [PATCH] Wrong variable name. The write() method should accept both
 int/long and tuple/list

---
 addons/product/product.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/addons/product/product.py b/addons/product/product.py
index 631323782738..db86047c10aa 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -202,6 +202,8 @@ class product_uom(osv.osv):
         return {}
 
     def write(self, cr, uid, ids, vals, context=None):
+        if isinstance(ids, (int, long)):
+            ids = [ids]
         if 'category_id' in vals:
             for uom in self.browse(cr, uid, ids, context=context):
                 if uom.category_id.id != vals['category_id']:
@@ -677,7 +679,7 @@ class product_template(osv.osv):
 
     def write(self, cr, uid, ids, vals, context=None):
         ''' Store the standard price change in order to be able to retrieve the cost of a product template for a given date'''
-        if isinstance(id, (int, long)):
+        if isinstance(ids, (int, long)):
             ids = [ids]
         if 'uom_po_id' in vals:
             new_uom = self.pool.get('product.uom').browse(cr, uid, vals['uom_po_id'], context=context)
-- 
GitLab