i get a code from another user but i think it refer to odoo 9 because the odoo 8 code is little different.
class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'
def onchange_product_id(self, cr, uid, ids, pricelist_id, product_id, qty,
uom_id, partner_id, date_order=False,
fiscal_position_id=False, date_planned=False,
name=False, price_unit=False, state='draft',
context=None):
res = super(PurchaseOrderLine, 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,
state=state, context=context)
product_id = res['product_id']
res['name'] = product_id.name + product_id.default_code
# for addind "x_IDfornitore" and x_IDfornitore2 fields
res['name'] = product_id.name (if needed,) + product_id.x_IDfornitore + IDfornitore2
return res