{ "info": { "author": "Panaetov Alexey", "author_email": "panaetovaa@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Odoo Gateway\n============\n\nThis package implements tools which help you to access database using\nOdoo models' mechanizm. Use Odoo Gateway and you will be able to\n\n- Run models' methods in shell. Usefull when you need to fix some\n database data or test you code.\n- Create stand-alone scripts which can refer to Odoo models and call\n their methods.\n\nVersion\n~~~~~~~\n\n0.0.1\n\nTech\n~~~~\n\nTo use Odoo Gateway properly you need only\n`Odoo `_ library of 7 or 8 versions.\n\nInstallation\n~~~~~~~~~~~~\n\nYou can use pip: ::\n\n $ pip install odoo_gateway\n\nShell\n~~~~~\n\nShell can be launched with::\n\n $ odoosh [params]\n\n\nParameters are the same as openerp server's ones. You can list then any time, just type::\n\n $ odoosh --help\n\nOk, lets do it right now!::\n\n $ odoosh -c config_file.conf -d database1\n\n In [1]:\n\n\nNice!\nOdoo shell is launched now. Following objects are already in namespace:\n\n- **cr** - Odoo wrapper for psycopg's cursor::\n\n In [2]: cr\n \n\n In [3]: cr.execute(\"select id, name from sale_order limit 1\")\n In [4]: cr.fetchall()\n [(600094, u'SALE-123456')]``\n- **conn** - Psycopg's connection to database::\n\n In [5]: conn\n \n In [6]: conn.rollback()\n\n- **rr** - Psycopg's cursor\n- **uid** - Id of Odoo superuser\n- **conf** - Instance of *openerp.tools.config.configmanager* that contains parsed Odoo parameters::\n\n In [7]: conf\n \n In [8]: conf['db_name']\n database1\n In [9]: conf['db_host']\n localhost\n- **models** - Adapter for Odoo models' list.::\n\n In [10]: models.sale_order # get reference for model\n sale.order sale.order()\n In [11]: type(models.sale_order)\n openerp.api.sale.order\n In [12]: \"\"\"Now we are free to apply API and user defined methods of model.\"\"\"\n In [13]: sale1 = models.sale_order.search([('name','=', 'sale-111111')])\n In [14]: sale1.name sale-111111\n In [15]: sale2 = models['sale.order'].search([('name','=', 'sale-111112')])\n In [16]: sale2.name sale-111112\n\n There are two ways to refer to Odoo model.\n\n - You can use model's name **name.of.model** and get reference with\n **models[name.of.model]**. See line *15* of example above.\n\n - Or you can replace **'.'** with **'\\_'** and type\n **models.name\\_of\\_model**. The result will be the same as in previous point. See lines 10-14.\n\n- **session** - Instance of odoo\\_gateway.session.Session\n\nStand-alone scripts\n~~~~~~~~~~~~~~~~~~~\n\nThere are problems which require using openerp API outside the openerp\nserver, in another independent process. For example imagine that you\nhave a Shop. *Done?* Ok. There is a python application APP. APP is a\nmessenger and uses the system of queues. Customers send messages in\nwhich they describe what products they want to buy. APP gets messages\nfrom queues, parses them and create sale orders in database.\n\nI belive that APP does not need for openerp server to be launched. No, sir!\n\nAll you need is instance of *odoo\\_gateway.session.Session*, which is\ninitiated with odoo server' command parameters.::\n\n from odoo_gateway import Session\n session = Session(['-c', 'config.conf', '-d', 'testdb'])\n\nAs you get session object you can get anything you may dream about.::\n\n models = session.models\n cr = session.cr\n conn = session.conn\n uid = session.uid\n rr = session.rr\n conf = session.conf\n\n # The power is yours now\n\n def create_sale(**params):\n models.sale_order.create(**params)\n cr.commit()\n\n\nLicense\n-------\n\nBSD", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/panaetov/odoo_gateway/overview", "keywords": "odoo openerp shell models stand-alone", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "odoo_gateway", "package_url": "https://pypi.org/project/odoo_gateway/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/odoo_gateway/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/panaetov/odoo_gateway/overview" }, "release_url": "https://pypi.org/project/odoo_gateway/0.131/", "requires_dist": null, "requires_python": null, "summary": "Simple and powerfull tools for programming in Odoo framework (f.e shell, reference to models in stand-alone applications, Mediator pattern for intermodel communications)", "version": "0.131" }, "last_serial": 1758475, "releases": { "0.121": [ { "comment_text": "", "digests": { "md5": "bb90403c41da4bed28d8d6b44d02294d", "sha256": "712948c427ea7cbedb152f2752a207a319814ccf12495da62fab5c44a470b00d" }, "downloads": -1, "filename": "odoo_gateway-0.121.tar.gz", "has_sig": false, "md5_digest": "bb90403c41da4bed28d8d6b44d02294d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4463, "upload_time": "2015-01-29T13:27:37", "url": "https://files.pythonhosted.org/packages/7f/17/c009645e1762a87d176e783750146931ce8de771985e0b65a1bbb4a49410/odoo_gateway-0.121.tar.gz" } ], "0.125": [ { "comment_text": "", "digests": { "md5": "a9ab49b8cef963af13416bd5fb18887d", "sha256": "704bc83525545270607cfa279af8dc22c65e51ab257d6d7af28ce8b357aea4d2" }, "downloads": -1, "filename": "odoo_gateway-0.125-py2.7.egg", "has_sig": false, "md5_digest": "a9ab49b8cef963af13416bd5fb18887d", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9432, "upload_time": "2015-04-06T11:45:22", "url": "https://files.pythonhosted.org/packages/2b/c9/a8c105ac37871f64ff7c32551d0e7ae218754a963b2de2337adaddf21abd/odoo_gateway-0.125-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "d03505c97e109c9f320629b27366b6b5", "sha256": "e7a2cd7991e97d2df40d684d661ac7f07f130853b649af1cce7b96611f50b743" }, "downloads": -1, "filename": "odoo_gateway-0.125.tar.gz", "has_sig": false, "md5_digest": "d03505c97e109c9f320629b27366b6b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4685, "upload_time": "2015-04-06T11:56:23", "url": "https://files.pythonhosted.org/packages/78/2a/1e3c51465797df5318fedb1737c54e07bdc11e6451716ffdce87e585e457/odoo_gateway-0.125.tar.gz" } ], "0.126": [ { "comment_text": "", "digests": { "md5": "59fddd1b1b2118bfa8893f724080d9a5", "sha256": "1218bc4c7f3658cae69debdd52d5fda439a1ab2ff954a1383844fede0cf05547" }, "downloads": -1, "filename": "odoo_gateway-0.126.tar.gz", "has_sig": false, "md5_digest": "59fddd1b1b2118bfa8893f724080d9a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4696, "upload_time": "2015-04-06T12:17:21", "url": "https://files.pythonhosted.org/packages/03/63/2dde80544b89740fcec94a63b5a6c9ef7c123814194ff3a82270ecf8c319/odoo_gateway-0.126.tar.gz" } ], "0.128": [ { "comment_text": "", "digests": { "md5": "2d5a8966da3082439081e7415560910f", "sha256": "ffb21097e05b4253553d545eec443970275b203c21c7a957a22d09e04f3841ce" }, "downloads": -1, "filename": "odoo_gateway-0.128.tar.gz", "has_sig": false, "md5_digest": "2d5a8966da3082439081e7415560910f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4724, "upload_time": "2015-04-08T10:03:06", "url": "https://files.pythonhosted.org/packages/03/e2/6f7cdc799da6c1aa063d19f80ec44c97d8e41b61bd45fb3aae984f818179/odoo_gateway-0.128.tar.gz" } ], "0.129": [ { "comment_text": "", "digests": { "md5": "b4266dc049e73d48091ff6d7c8fad147", "sha256": "d8bf3342a5976b78e62c6b181f868de9774befb79b601dbf90ec414b190fdb2f" }, "downloads": -1, "filename": "odoo_gateway-0.129.tar.gz", "has_sig": false, "md5_digest": "b4266dc049e73d48091ff6d7c8fad147", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4993, "upload_time": "2015-04-23T11:12:33", "url": "https://files.pythonhosted.org/packages/8f/18/c0817576b43574954d4807c9582ee8dcd86b15e35af392569794fe58d55d/odoo_gateway-0.129.tar.gz" } ], "0.130": [ { "comment_text": "", "digests": { "md5": "c72687761d9183f10cc957e368894a2f", "sha256": "84f4c6a6924965c8998925f318010e4d4e218cb58d377c02a731072e6703cccf" }, "downloads": -1, "filename": "odoo_gateway-0.130.tar.gz", "has_sig": false, "md5_digest": "c72687761d9183f10cc957e368894a2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5414, "upload_time": "2015-10-01T08:36:38", "url": "https://files.pythonhosted.org/packages/7a/6a/06c69a1d9c5bde6428bbdce6b27703be94e1bdc8bdd6a11e5a9509d7065d/odoo_gateway-0.130.tar.gz" } ], "0.131": [ { "comment_text": "", "digests": { "md5": "13a18190eb549b6575eb5cb189c068d5", "sha256": "24257518cb495b2cbf340e4ada2d3dd25f6c30d88c9e1b71ceeb8b5b69bf5f43" }, "downloads": -1, "filename": "odoo_gateway-0.131.tar.gz", "has_sig": false, "md5_digest": "13a18190eb549b6575eb5cb189c068d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5120, "upload_time": "2015-10-08T14:41:49", "url": "https://files.pythonhosted.org/packages/91/cd/ce7d154aad04a339d835678f810feb7b1233ab2607e4df75b81f4248a385/odoo_gateway-0.131.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "13a18190eb549b6575eb5cb189c068d5", "sha256": "24257518cb495b2cbf340e4ada2d3dd25f6c30d88c9e1b71ceeb8b5b69bf5f43" }, "downloads": -1, "filename": "odoo_gateway-0.131.tar.gz", "has_sig": false, "md5_digest": "13a18190eb549b6575eb5cb189c068d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5120, "upload_time": "2015-10-08T14:41:49", "url": "https://files.pythonhosted.org/packages/91/cd/ce7d154aad04a339d835678f810feb7b1233ab2607e4df75b81f4248a385/odoo_gateway-0.131.tar.gz" } ] }