[MERGE] lp:~openerp-dev/openobject-addons/trunk-addons_issue2_product-mma
bzr revid: stw@openerp.com-20120808124841-9uwits00k52ie7w8
This commit is contained in:
+3
-7
@@ -1406,7 +1406,6 @@ class sale_order_line(osv.osv):
|
||||
[('category_id', '=', product_obj.uom_id.category_id.id)],
|
||||
'product_uos':
|
||||
[('category_id', '=', uos_category_id)]}
|
||||
|
||||
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
|
||||
@@ -1463,15 +1462,12 @@ class sale_order_line(osv.osv):
|
||||
lang=False, update_tax=True, date_order=False, context=None):
|
||||
context = context or {}
|
||||
lang = lang or ('lang' in context and context['lang'])
|
||||
res = self.product_id_change(cursor, user, ids, pricelist, product,
|
||||
if not uom:
|
||||
return {'value': {'price_unit': 0.0, 'product_uom' : uom or False}}
|
||||
return self.product_id_change(cursor, user, ids, pricelist, product,
|
||||
qty=qty, uom=uom, qty_uos=qty_uos, uos=uos, name=name,
|
||||
partner_id=partner_id, lang=lang, update_tax=update_tax,
|
||||
date_order=date_order, context=context)
|
||||
if 'product_uom' in res['value']:
|
||||
del res['value']['product_uom']
|
||||
if not uom:
|
||||
res['value']['price_unit'] = 0.0
|
||||
return res
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
|
||||
@@ -1250,7 +1250,7 @@
|
||||
<field name="picking_id" string="Reference"/>
|
||||
<field name="origin"/>
|
||||
<field name="create_date" invisible="1" groups="base.group_no_one"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
|
||||
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
|
||||
Reference in New Issue
Block a user