[FIX] ean13 field in res.partner and res.users renamed in Barcode (only in views...
authorAaron Bohy <aab@odoo.com>
Wed, 5 Nov 2014 09:03:26 +0000 (10:03 +0100)
committerFrédéric van der Essen <fvdessen@gmail.com>
Wed, 26 Nov 2014 10:46:18 +0000 (11:46 +0100)
addons/point_of_sale/res_partner.py
addons/point_of_sale/res_users.py

index 87ca525..029fb33 100644 (file)
@@ -9,16 +9,17 @@ import openerp.addons.product.product
 class res_users(osv.osv):
     _inherit = 'res.partner'
     _columns = {
-        'ean13' : fields.char('EAN13', size=13, help="BarCode"),
+        # 'ean13' : fields.char('EAN13', size=13, help="BarCode"),
+        'ean13' : fields.char('Barcode', help="BarCode"),
     }
 
-    def _check_ean(self, cr, uid, ids, context=None):
-        return all(
-            openerp.addons.product.product.check_ean(user.ean13) == True
-            for user in self.browse(cr, uid, ids, context=context)
-        )
+    # def _check_ean(self, cr, uid, ids, context=None):
+    #     return all(
+    #         openerp.addons.product.product.check_ean(user.ean13) == True
+    #         for user in self.browse(cr, uid, ids, context=context)
+    #     )
 
-    _constraints = [
-        (_check_ean, "Error: Invalid ean code", ['ean13'],),
-    ]
+    # _constraints = [
+    #     (_check_ean, "Error: Invalid ean code", ['ean13'],),
+    # ]
 
index 9198e33..4c2cd2e 100644 (file)
@@ -9,17 +9,18 @@ import openerp.addons.product.product
 class res_users(osv.osv):
     _inherit = 'res.users'
     _columns = {
-        'ean13' : fields.char('EAN13', size=13, help="BarCode"),
+        # 'ean13' : fields.char('EAN13', size=13, help="BarCode"),
+        'ean13' : fields.char('Barcode', help="BarCode"),
         'pos_config' : fields.many2one('pos.config', 'Default Point of Sale', domain=[('state', '=', 'active')]),
     }
 
-    def _check_ean(self, cr, uid, ids, context=None):
-        return all(
-            openerp.addons.product.product.check_ean(user.ean13) == True
-            for user in self.browse(cr, uid, ids, context=context)
-        )
+    # def _check_ean(self, cr, uid, ids, context=None):
+    #     return all(
+    #         openerp.addons.product.product.check_ean(user.ean13) == True
+    #         for user in self.browse(cr, uid, ids, context=context)
+    #     )
 
-    _constraints = [
-        (_check_ean, "Error: Invalid ean code", ['ean13'],),
-    ]
+    # _constraints = [
+    #     (_check_ean, "Error: Invalid ean code", ['ean13'],),
+    # ]