From 68e8e0caecfb20ad56e8cbcb4bc4fd2dd50096b1 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 22 Nov 2010 18:46:15 +0530 Subject: [PATCH] [IMP]Improvement in Code bzr revid: ron@tinyerp.com-20101122131615-l4c5xxidfsokhdvs --- addons/product/product.py | 4 ++-- addons/stock/stock_view.xml | 1 + addons/stock/wizard/stock_invoice_onshipping.py | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index a636d5d64fe..d810ea8e01f 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -33,7 +33,7 @@ def is_pair(x): def check_ean(eancode): if not eancode: return True - if len(eancode) not in [13,14,8]: + if len(eancode) not in [13]: return False try: int(eancode) @@ -463,7 +463,7 @@ class product_product(osv.osv): 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the product without removing it."), 'variants': fields.char('Variants', size=64), 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"), - 'ean13': fields.char('EAN13', size=14), + 'ean13': fields.char('EAN13', size=13), 'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."), 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Sale Price')), 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Sale Price')), diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index c80fce972ef..4ef592bd3fd 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -875,6 +875,7 @@