Merge lp:~openerp-dev/openobject-addons/7.0-opw-597639-han into lp:openobject-addons/7.0

Proposed by Hardik Ansodariya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-597639-han
Merge into: lp:openobject-addons/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
stock/stock.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-597639-han
Reviewer Review Type Date Requested Status
Moisés López - http://www.vauxoo.com (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+185441@code.launchpad.net

Description of the change

Added product_id and company_id to unique constraint as it should also take into account the product and the company.

With reference of maintenance case: 597639.

Thanks,

To post a comment you must log in.
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

This MP fixed bug!

review: Approve

Unmerged revisions

9429. By Hardik Ansodariya (OpenERP)

[FIXED] production.lot: Added a Product_id and company_id to the unique constaraint(Maintenance case: 597639)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2013-09-09 15:32:21 +0000
3+++ stock/stock.py 2013-09-13 09:03:32 +0000
4@@ -1474,7 +1474,7 @@
5 'product_id': lambda x, y, z, c: c.get('product_id', False),
6 }
7 _sql_constraints = [
8- ('name_ref_uniq', 'unique (name, ref)', 'The combination of Serial Number and internal reference must be unique !'),
9+ ('name_ref_uniq', 'unique (name, ref, product_id, company_id)', 'The combination of Serial Number, internal reference, Product and Company must be unique !'),
10 ]
11 def action_traceability(self, cr, uid, ids, context=None):
12 """ It traces the information of a product