useability_improvement
bzr revid: fp@tinyerp.com-20100626160528-ytin0aht9e9k946d
This commit is contained in:
parent
7369085786
commit
a51c0c7b49
|
@ -77,7 +77,7 @@ class product_uom(osv.osv):
|
|||
'1 (base unit) = coeff (this unit). Ratio = 1 / Factor.'),
|
||||
'factor_inv': fields.function(_factor_inv, digits=(12, 6),
|
||||
fnct_inv=_factor_inv_write,
|
||||
method=True, string='Factor',
|
||||
method=True, string='Ratio',
|
||||
help='The coefficient for the formula:\n' \
|
||||
'coeff (base unit) = 1 (this unit). Factor = 1 / Rate.'),
|
||||
'rounding': fields.float('Rounding Precision', digits=(16, 3), required=True,
|
||||
|
@ -85,7 +85,7 @@ class product_uom(osv.osv):
|
|||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the unit of measure without removing it."),
|
||||
'uom_factor': fields.selection([('bigger','Bigger than the default'),
|
||||
('smaller','Smaller than the default'),
|
||||
('default','The Default unit of measure')],'Type of Unit', required=1),
|
||||
('default','Default UoM for the category')],'Type of Unit', required=1),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -311,12 +311,12 @@
|
|||
<form string="Units of Measure">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="category_id" select="1"/>
|
||||
<field name="category_id" select="1" widget="selection"/>
|
||||
<field name="active"/>
|
||||
<field name="uom_factor" on_change="onchange_factor(uom_factor)"/>
|
||||
<group colspan="2" col="2">
|
||||
<field name="factor" select="1" attrs="{'invisible':[('uom_factor','<>','smaller')]}"/>
|
||||
<field name="factor_inv" select="1" string="Factor Data" attrs="{'invisible':[('uom_factor','<>','bigger')]}"/>
|
||||
<field name="factor" attrs="{'invisible':[('uom_factor','<>','smaller')]}"/>
|
||||
<field name="factor_inv" string="Factor Data" attrs="{'invisible':[('uom_factor','<>','bigger')]}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="rounding"/>
|
||||
|
|
|
@ -1080,7 +1080,7 @@ class sale_order_line(osv.osv):
|
|||
|
||||
if not uom2:
|
||||
uom2 = product_obj.uom_id
|
||||
if (product_obj.type=='product') and (product_obj.virtual_available * product_obj.uom_id.factor < qty * uom2.factor) \
|
||||
if (product_obj.type=='product') and (product_obj.virtual_available * uom2.factor < qty * product_obj.uom_id.factor) \
|
||||
and (product_obj.procure_method=='make_to_stock'):
|
||||
warning = {
|
||||
'title': _('Not enough stock !'),
|
||||
|
|
Loading…
Reference in New Issue