'On change of product it sets product quantity, tax account, name,
uom of product, unit price and price subtotal.'

@api.onchange('repair_id', 'product_id', 'product_uom_qty')
def onchange_product_id(self):

    if ((not self.product_id) or (not self.product_uom_qty)):
        return
    partner = self.repair_id.partner_id
    pricelist = self.repair_id.pricelist_id
    if (partner and self.product_id):
        self.tax_id = partner.property_account_position_id.map_tax(self.product_id.taxes_id, self.product_id, partner).ids
    if self.product_id:
        self.name = self.product_id.display_name
        self.product_uom = self.product_id.uom_id.id
    warning = False
    if (not pricelist):
        warning = {'title': _('No    Pricelist!'), 'message': _('You    have    to    select    a    pricelist    in    the    Repair    form    !\n    Please    set    one    before    choosing    a    product.')}
    else:
        price = pricelist.get_product_price(self.product_id, self.product_uom_qty, partner)
        if (price is False):
            warning = {'title': _('No    valid    pricelist    line    found    !'), 'message': _("Couldn't    find    a    pricelist    line    matching    this    product    and    quantity.\nYou    have    to    change    either    the    product,    the    quantity    or    the    pricelist.")}
        else:
            self.price_unit = price
    if warning:
        return {'warning': warning}
