'Changes the Standard Price of Product and creates an account move accordingly.'

@api.multi
def change_price(self):

    self.ensure_one()
    if (self._context['active_model'] == 'product.template'):
        products = self.env['product.template'].browse(self._context['active_id']).product_variant_ids
    else:
        products = self.env['product.product'].browse(self._context['active_id'])
    products.do_change_standard_price(self.new_price, self.counterpart_account_id.id)
    return {'type': 'ir.actions.act_window_close'}
