{ "info": { "author": "St\u00e9phane Mangin", "author_email": "stephane.mangin@freesbee.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Topic :: Database", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "********************************\nWelcome to csv2odoo's repository\n********************************\n\n`csv2odoo` is a Python converter from the `csv` format to `OpenObject` data\n models.\n\n`csv2odoo` is an easy way to import records from heterogeneous datas by editing\na simple script as the manner of `Odoo` data model.\nYou can specify pre-treatment(s) before any records insertions, you can also,\naccording to criteria, omit the insertion of an entire record, mofify it or just\ncreate it (CRUD abilities).\n\nSome features of `csv2odoo` include abilities of Python `csv` module to specify\ninput file configuration. It also include some useful functions to make\nspecific value operations on each individual columns (See `callbacks` for more\ninformations).\n\n===========\nQuick start\n===========\n\nSample::\n \n #!/usr/bin/env python\n #.. your_script.py\n from csv2odoo import Model, Field, Odoo, Session\n\n #\n # Configure Odoo connection\n #\n\n odoo = Odoo(\n host='198.168.0.1', port=8069,\n user='admin', pwd='admin', dbname='database', \n lang'fr_FR')\n\n #\n # Create a new importation instance::\n #\n\n session = Session(\n 'file.csv', delimiter=';', quotechar='\"', encoding='utf-8',\n offset=1, limit=10)\n \n #\n # Define your mapping to link both csv and Odoo::\n #\n\n # res.partner is unique by siren and will not be updated if exists\n res_partner = Model('res.partner', fields=[\n Field('name', columns=[1]),\n Field('siren', columns=[2]),\n Field('website', columns=[16]),\n ], update=False, search=['siren'])\n \n # res.country is unique by code and name and will not be updated if exists\n res_country = Model('res.country', fields=[ \n Field('code', columns=[13], default='FR'),\n Field('name', columns=[13], default='FRANCE'),\n ], update=False, search=['code', 'name'])\n\n # res.partner.address is unique by type and partner_id\n res_partner_address = Model('res.partner.address', fields=[\n\n # Simple fields, some with default value and some unique between records\n Field('zip', columns=[9], default='35000'),\n Field('city', columns=[10], default='RENNES'),\n Field('phone', column=[14]),\n Field('fax', columns=[15]),\n Field('email', columns=[17], unique=True, ignore=True),\n Field('cedex', columns=[68]),\n\n # Mixing columns (by concatenation or selection)\n Field('street', columns=[7, 6], method='selection'),\n Field('street2', columns=[8, 5], method='concatenate'),\n\n # Model's relations with res.partner which must exists\n Field('country_id', relation=res_country),\n Field('partner_id', relation=res_partner, required=True),\n\n # Adding a custom value to a missing field in the `csv` file\n Field('type', custom='delivery'),\n ], search=['type', 'partner_id'])\n\n #\n # Finally join objects to the session which starts the import process\n #\n\n # There is no particular needs to also inject res.partner model, as it's \n # already contained as a relation of res.partner.address\n session.bind(odoo, [res_partner_address, ])\n\n #\n # Optionaly: show statistics of records's activities during the importation process\n #\n\n csv2odoo.show_stats()\n\n=========================\nSupported Python versions\n=========================\n\n`csv2odoo` support Python versions 2.7.\n\n=======\nLicense\n=======\n\nThis software is made available under the LGPLv3 license.\n\n===================\nBugs or suggestions\n===================\n\nPlease, feel free to report bugs or suggestions in the `Bug Tracker\n`_!", "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/StefMangin/python-csv2odoo", "keywords": "Odoo import csv data importation migration xml xml-rpc xmlrpc rpc json", "license": "LGPLv3+", "maintainer": null, "maintainer_email": null, "name": "csv2odoo", "package_url": "https://pypi.org/project/csv2odoo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/csv2odoo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/StefMangin/python-csv2odoo" }, "release_url": "https://pypi.org/project/csv2odoo/0.7.5/", "requires_dist": null, "requires_python": null, "summary": "Python CSV to Odoo importation library", "version": "0.7.5" }, "last_serial": 1219460, "releases": { "0.7.4": [ { "comment_text": "", "digests": { "md5": "9ce07c32825f8bf8b95382610cbe177e", "sha256": "8600670c22142be20e842cc1a475002c8bbf5ef25a113eaa64d96244c0e801a2" }, "downloads": -1, "filename": "csv2odoo-0.7.4.tar.gz", "has_sig": false, "md5_digest": "9ce07c32825f8bf8b95382610cbe177e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1849996, "upload_time": "2014-07-09T15:27:51", "url": "https://files.pythonhosted.org/packages/a5/c2/2016c8b9b3837f8590b1686192a6b29be8fc21ca304ac7045286a6008ab0/csv2odoo-0.7.4.tar.gz" } ], "0.7.5": [ { "comment_text": "", "digests": { "md5": "581df44083e004800cc78d3749105f8f", "sha256": "4bbc0e7848ff6b5291b417111995cf87886716a74dd1bb822ba9bad123cf259e" }, "downloads": -1, "filename": "csv2odoo-0.7.5.tar.gz", "has_sig": false, "md5_digest": "581df44083e004800cc78d3749105f8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1847708, "upload_time": "2014-09-10T14:35:18", "url": "https://files.pythonhosted.org/packages/ab/f6/d393152527d59a465b0b2ec7bf4ae96553e47dee06e4f28c63c31497fd51/csv2odoo-0.7.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "581df44083e004800cc78d3749105f8f", "sha256": "4bbc0e7848ff6b5291b417111995cf87886716a74dd1bb822ba9bad123cf259e" }, "downloads": -1, "filename": "csv2odoo-0.7.5.tar.gz", "has_sig": false, "md5_digest": "581df44083e004800cc78d3749105f8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1847708, "upload_time": "2014-09-10T14:35:18", "url": "https://files.pythonhosted.org/packages/ab/f6/d393152527d59a465b0b2ec7bf4ae96553e47dee06e4f28c63c31497fd51/csv2odoo-0.7.5.tar.gz" } ] }