[Fix] Set right margin and corrected indentation.
bzr revid: tta@openerp.com-20121009091818-k4wi2eio1spd98x7
This commit is contained in:
@@ -67,5 +67,6 @@ Print product labels with barcode.
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'images': ['images/product_uom.jpeg','images/product_pricelists.jpeg','images/products_categories.jpeg', 'images/products_form.jpeg'],
|
||||
'css': ['static/css/product.css']
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -148,14 +148,14 @@ class product_uom(osv.osv):
|
||||
_sql_constraints = [
|
||||
('factor_gt_zero', 'CHECK (factor!=0)', 'The conversion ratio for a unit of measure cannot be 0!')
|
||||
]
|
||||
|
||||
|
||||
def onchange_category_id(self, cr, uid, ids, category_id):
|
||||
reference_uom = False
|
||||
if category_id:
|
||||
uom_ids = self.search(cr, uid, [('category_id', '=',category_id),('uom_type', '=', 'reference')])
|
||||
if uom_ids:
|
||||
reference_uom = uom_ids[0]
|
||||
return {'value':{'reference_uom_id': reference_uom}}
|
||||
reference_uom = False
|
||||
if category_id:
|
||||
uom_ids = self.search(cr, uid, [('category_id', '=',category_id),('uom_type', '=', 'reference')])
|
||||
if uom_ids:
|
||||
reference_uom = uom_ids[0]
|
||||
return {'value':{'reference_uom_id': reference_uom}}
|
||||
|
||||
def _compute_qty(self, cr, uid, from_uom_id, qty, to_uom_id=False):
|
||||
if not from_uom_id or not qty or not to_uom_id:
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
<field name="uom_type" on_change="onchange_type(uom_type)"/>
|
||||
<label string="Computation" for="factor" attrs="{'invisible':[('uom_type','=','reference')]}" style="margin: 9px 0 9px 0;"/>
|
||||
<group col="5" attrs="{'invisible':[('uom_type','=','reference')]}">
|
||||
<div style="margin-left: -12px;">
|
||||
<div class="oe_moveleft">
|
||||
<field name="factor_inv" class="oe_inline" attrs="{'invisible':[('uom_type','!=','bigger')]}" String="Computation" nolabel="1"/>
|
||||
<label string="1" attrs="{'invisible':[('uom_type','!=','smaller')]}"/>
|
||||
<field class="oe_inline" name="reference_uom_id" attrs="{'invisible':[('uom_type','=','reference')]}" nolabel="1"/>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.oe_moveleft{
|
||||
margin-left: -12px;
|
||||
}
|
||||
Reference in New Issue
Block a user