← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-731035-aag into lp:openobject-addons

 

Atik Agewan(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-731035-aag into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  #731035 Reference UoM for category should be checked for uniqueness
  https://bugs.launchpad.net/bugs/731035

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-731035-aag/+merge/52651


 BUG:731035 
 [FIX] Product:Reference UoM for category should be checked for uniqueness' 
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-731035-aag/+merge/52651
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-731035-aag.
=== modified file 'product/product.py'
--- product/product.py	2011-02-28 10:49:36 +0000
+++ product/product.py	2011-03-09 09:31:31 +0000
@@ -122,6 +122,7 @@
 
     _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):


Follow ups