Stéphane Wirtel avatar Stéphane Wirtel committed dd0c293

[FIX] Add a new function for the login callback

Comments (0)

Files changed (2)


 from .rpc import XmlRPCConnector
 from .rpc import Connection
 from .rpc import Object
+from .rpc import Common
-__all__ = ['OpenERP', 'get_object', 'get_data_from_record']
+__all__ = ['OpenERP', 'get_object', 'get_data_from_record', 'login']
 def get_object(object_name):
     context = {
                                         app.config['OPENERP_DATABASE'])) or None
+    def login(self, username, password):
+        return Common(self.connector).login(['OPENERP_DATABASE'], username, password)
+* `documentation <>`_
+* `development version <>`_
 This extension allows to use the OpenERP server with Flask
 #!/usr/bin/env python
 from flask import Flask
 from flaskext.openerp import OpenERP
-    version='0.1',
+    version='0.3',
     author='Stephane Wirtel',
+        'Environment :: Web Environment',
         'Intended Audience :: Developers',
         'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
         'Operating System :: OS Independent',
         'Programming Language :: Python',
+        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
         'Topic :: Software Development :: Libraries :: Python Modules',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.