summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorJosse Colpaert <jco@odoo.com>2015-09-01 15:23:22 +0200
committerJosse Colpaert <jco@odoo.com>2015-09-01 16:20:50 +0200
commit042f05f2e5fd95a9a7b6b4e1992575e7fed92dfa (patch)
tree48a236b25065dd7761a1fe7e43194a5daed7468c /addons
parent5d7f12f03e271079b4fa976e01b6b04bc79618da (diff)
[IMP] stock: barcode of a product or location should not be copied when duplicating (copy=False)
Diffstat (limited to 'addons')
-rw-r--r--addons/product/product.py2
-rw-r--r--addons/stock/stock.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/product/product.py b/addons/product/product.py
index 649c69f9eef..24f06276dd3 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -956,7 +956,7 @@ class product_product(osv.osv):
'default_code' : fields.char('Internal Reference', select=True),
'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the product without removing it."),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade", select=True, auto_join=True),
- 'barcode': fields.char('Barcode', help="International Article Number used for product identification.", oldname='ean13'),
+ 'barcode': fields.char('Barcode', help="International Article Number used for product identification.", oldname='ean13', copy=False),
'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', store={
'product.template': (_get_name_template_ids, ['name'], 10),
'product.product': (lambda self, cr, uid, ids, c=None: ids, [], 10),
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 4c241a3f8de..abf04707b0b 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -128,7 +128,7 @@ class stock_location(osv.osv):
'return_location': fields.boolean('Is a Return Location?', help='Check this box to allow using this location as a return location.'),
'removal_strategy_id': fields.many2one('product.removal', 'Removal Strategy', help="Defines the default method used for suggesting the exact location (shelf) where to take the products from, which lot etc. for this location. This method can be enforced at the product category level, and a fallback is made on the parent locations if none is set here."),
'putaway_strategy_id': fields.many2one('product.putaway', 'Put Away Strategy', help="Defines the default method used for suggesting the exact location (shelf) where to store the products. This method can be enforced at the product category level, and a fallback is made on the parent locations if none is set here."),
- 'barcode': fields.char('Barcode', oldname='loc_barcode'),
+ 'barcode': fields.char('Barcode', copy=False, oldname='loc_barcode'),
}
_defaults = {
'active': True,