This callback can be used to initialize an application for use with
        the OpenERP server.

def init_app(self, app):
        """This callback can be used to initialize an application for use with
        the OpenERP server.
        """
        app.config.setdefault('OPENERP_SERVER', 'http://localhost:8069')
        app.config.setdefault('OPENERP_DATABASE', 'openerp')
        app.config.setdefault('OPENERP_DEFAULT_USER', 'admin')
        app.config.setdefault('OPENERP_DEFAULT_PASSWORD', 'admin')

        app.jinja_env.globals.update(
            get_data_from_record=get_data_from_record
        )

        cnx = Client(
            server=app.config['OPENERP_SERVER'],
            db=app.config['OPENERP_DATABASE'],
            user=app.config['OPENERP_DEFAULT_USER'],
            password=app.config['OPENERP_DEFAULT_PASSWORD']
        )

        self.default_user = cnx.user

        app.before_request(self.before_request)