[FIX] Product:Reference UoM for category should be checked for uniqueness
lp bug: https://launchpad.net/bugs/731035 fixed bzr revid: aag@tinyerp.co.in-20110309091943-2mpn5q4b3i6r383i
This commit is contained in:
parent
1e681a15bc
commit
48406be61d
|
@ -122,6 +122,7 @@ class product_uom(osv.osv):
|
|||
|
||||
_sql_constraints = [
|
||||
('factor_gt_zero', 'CHECK (factor!=0)', 'The conversion ratio for a unit of measure cannot be 0!'),
|
||||
('factor_category_id_uniq', 'unique (category_id, factor)', 'You can not have more than one UOM with same factor for same UOM category'),
|
||||
]
|
||||
|
||||
def _compute_qty(self, cr, uid, from_uom_id, qty, to_uom_id=False):
|
||||
|
|
Loading…
Reference in New Issue