[IMP] purchase: improved code

bzr revid: rha@tinyerp.com-20120622072905-ybxqziwrpemn0q5a
This commit is contained in:
Rifakat
2012-06-22 12:59:05 +05:30
parent f3a9a91ae5
commit e4c36049c7
+1 -4
View File
@@ -706,12 +706,9 @@ class purchase_order_line(osv.osv):
if not uom_id:
return {'value': {'price_unit': price_unit or 0.0, 'name': name or '', 'notes': notes or'', 'product_uom' : uom_id or False}}
context.update(uom_change=True)
res = self.onchange_product_id(cr, uid, ids, pricelist_id, product_id, qty, uom_id,
return self.onchange_product_id(cr, uid, ids, pricelist_id, product_id, qty, uom_id,
partner_id, date_order=date_order, fiscal_position_id=fiscal_position_id, date_planned=date_planned,
name=name, price_unit=price_unit, notes=notes, context=context)
if 'product_uom' in res['value']:
del res['value']['product_uom']
return res
def _get_date_planned(self, cr, uid, supplier_info, date_order_str, context=None):
"""Return the datetime value to use as Schedule Date (``date_planned``) for