[IMP] stock: barcode of a product or location should not be copied when duplicating (copy=False)
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user