[FIX] stock: allow same serial number for different products

Bug lp:1222289, opw 597639
This commit is contained in:
Hardik Ansodariya 2014-07-23 10:03:40 +02:00 committed by Martin Trigaux
parent f7dfcd5d98
commit 9a20018166
1 changed files with 1 additions and 1 deletions

View File

@ -1487,7 +1487,7 @@ class stock_production_lot(osv.osv):
'product_id': lambda x, y, z, c: c.get('product_id', False),
}
_sql_constraints = [
('name_ref_uniq', 'unique (name, ref)', 'The combination of Serial Number and internal reference must be unique !'),
('name_ref_uniq', 'unique (name, ref, product_id, company_id)', 'The combination of Serial Number, internal reference, Product and Company must be unique !'),
]
def action_traceability(self, cr, uid, ids, context=None):
""" It traces the information of a product