[FIX] Sale : Onchange of product/qty corrected when uos is present.Product: Help corrected for uom to uos conversion.

bzr revid: jma@tinyerp.com-20100512133133-sjsmt800r190dws5
This commit is contained in:
JMA (OpenERP) 2010-05-12 19:01:33 +05:30
parent ec0f393faa
commit 5f7a844714
2 changed files with 2 additions and 2 deletions

View File

@ -280,7 +280,7 @@ class product_template(osv.osv):
help='Used by companies that manage two units of measure: invoicing and inventory management. For example, in food industries, you will manage a stock of ham but invoice in Kg. Keep empty to use the default UOM.'),
'uos_coeff': fields.float('UOM -> UOS Coeff', digits=(16,4),
help='Coefficient to convert UOM to UOS\n'
' uom = uos * coeff'),
' uos = uos * coeff'),
'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type', required=True),
'seller_delay': fields.function(_calc_seller_delay, method=True, type='integer', string='Supplier Lead Time', help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."),
'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Partners'),

View File

@ -1070,7 +1070,7 @@ class sale_order_line(osv.osv):
'product_uos':
[('category_id', '=', uos_category_id)]}
elif uos: # only happens if uom is False
elif uos and not uom: # only happens if uom is False
result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id
result['product_uom_qty'] = qty_uos / product_obj.uos_coeff
result['th_weight'] = result['product_uom_qty'] * product_obj.weight