openupgradelib


Nameopenupgradelib JSON
Version 3.7.2 PyPI version JSON
download
home_pagehttps://github.com/OCA/openupgradelib
SummaryA library with support functions to be called from Odoo migration scripts.
upload_time2024-12-10 16:39:52
maintainerNone
docs_urlNone
authorOdoo Community Association (OCA)
requires_python!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7
licenseAGPL-3
keywords openupgradelib
VCS
bugtrack_url
requirements wheel coveralls flake8 pep8-naming lxml psycopg2 setuptools
Travis-CI
coveralls test coverage
            .. image:: https://img.shields.io/travis/OCA/openupgradelib.svg
    :target: https://travis-ci.org/OCA/openupgradelib
    :alt: Build Status

.. image:: https://coveralls.io/repos/OCA/openupgradelib/badge.svg?service=github
  :target: https://coveralls.io/github/OCA/openupgradelib
  :alt: Coverage Status

.. image:: https://codeclimate.com/github/OCA/openupgradelib/badges/gpa.svg
   :target: https://codeclimate.com/github/OCA/openupgradelib
   :alt: Code Climate

.. image:: https://img.shields.io/pypi/v/openupgradelib.svg
   :target: https://pypi.python.org/pypi/openupgradelib
   :alt: Pypi Package

===============================
OpenUpgrade Library
===============================

A library with support functions to be called from Odoo migration scripts.

* Free software: AGPL-3 license
* Documentation: https://oca.github.io/openupgradelib

Install
-------

Always get the latest version through:

pip/pip3 install --ignore-installed git+https://github.com/OCA/openupgradelib.git@master

Features
--------

* TODO




History
-------
3.0.0 (2019-09-16)
------------------

* [IMP] SQL version of last_message_post
* [IMP] keep old module's state when merging modules and the target is …
* [ADD] delete_records_safely_by_xml_id
* [FIX] rename_models: Rename correctly ir.property values (without ^)
* [IMP] merge_records: Be more conservative on merge values
* [RFR] No yaml import in Odoo 12
* [ADD] Chunked method
* [ADD] search and replace a single ID across the whole database
* [RFR] Merge with existing method
* [FIX] merge_records: bad column in _change_generic exclusion
* [FIX] merge_records: escape column names in _change_foreign_key_refs
* [FIX] merge_records: unreachable code due to bad condition in _change…
* [IMP] merge_records: align sql queries to better visualization
* [FIX] merge_records: missing argument in _delete_records_sql
* [FIX] merge_records: missing argument in _adjust_merged_values_orm
* [FIX] merge_records: tuples and lists don't sum
* [FIX] _adjust_merged_values_orm: char default case
* [FIX] merge_records (orm): take into account inactive records
* [FIX] _adjust_merged_values_orm: integer default case
* [IMP] merge_records: add adjust values for binary & many2one
* [FIX] merge_records: ensure value in merging many2one and binary types
* [FIX] merge_records: if merging many2many, avoid warning of bad compa…
* [FIX] Solve TypeError in _adjust_merged_values_orm
* [IMP] merge_records: Put exception condition on records to be merged
* [IMP] merge_records: Check which records to be merged exist
* [FIX] merge_records: Handle better translatable fields
* [FIX] Merge records on sql take into account rel tables
* [IMP] openupgrade_merge_records: Improve code for handling m2m tables…
* [FIX] SQL request into moved_fields function
* [FIX] set_defaults: New api adaptation
* [ADD] Clunky travis script to run functional tests across a range of Odoo versions
* [FIX] openupgradelib: Manage null values to avoid TypeError when merging
* [FIX] openupgrade_merge_records: `filter` should be properly applied
* [FIX] openupgrade_merge_records: l[0] is not valid for `filter` object
* [FIX] openupgradelib: _get_existing_records for v11 and above
* [FIX] chunked: Adapt to all supported versions
* [FIX] rename_models
* [IMP] add_fields: Consider corner edges and >= v12
* [IMP] Add XML conversion framework and Bootstrap 3 to 4 converter
* [FIX] update_module_moved_fields: Allow v12
* [IMP] Support multilang updates in Bootstrap 3 to 4 migration
* [FIX] typo in 12.0 tools
* [IMP] rename_models: add mail_message_subtype in rename_models
* [FIX+IMP] convert_string_bootstrap_3to4: Don't try to convert empty columns
* [FIX] merge_recordS: bad query in _change_foreign_key_refs
* [FIX] merge_records: bad query in _change_foreign_key_refs (part 2)
* [FIX] merge_records: reduce queries in _change_foreign_key_refs
* [FIX] Respect preexisting styles and attributes
* [IMP] Allow callable XML replacements
* [IMP] Translate from v11 Slider to v12 Carousel
* [FIX] convert_xml_node: node.attrib doesn't have copy() method
* [FIX] Remove call to `setdefault()`
* [IMP] update_module_names: rename instead of merge case
* [ADD] copy_fields_multilang method
* [FIX] Adapt `logged_query` to work with `psycopg2.sql.SQL` and similar helpers
* [IMP] View translations are special
* [FIX] openupgrade_merge_records: field XML ID v12
* [IMP] For small tables it's perfectly acceptable to drop index and then let Odoo recreate it, but with large tables this scenario is rather costly.
* [IMP] delete_records_safely_by_xml_id: Avoid noisy log if the XML-ID is not found
* [FIX] add_fields: Respect sql_type and build safe query

2.0.0 (2018-07-21)
------------------
* [FIX] set_defaults: New api adaptation
* [RVR] Python 3 compatibility
* [IMP] load_data: support update mode where we never try to create records
* [ADD] rename_fields: New method for renaming completely fields
* [ADD] replace_account_types: Replace account types for Odoo 9.0
* [ADD] delete_template_translations: New method for deleting translations of changed templates with noupdate true
* [ADD] disable_invalid_filters
* [FIX] Fix logging with non-ascii characters in exception
* [IMP] rename_models: rename field xmlids
* [ADD] add_fields: Add a field definition
* [ADD] update_module_moved_fields: New method for updating module field when moving a field from one module to another
* [IMP] rename_models: Handle properties that reference to the old model
* [IMP] logged_query: Allow to not logging output if no records affected
* [ADD] merge_records: New method for merging several records into a target one
* [IMP] convert_binary_field_to_attachment: Conversion to attachment on large datasets

1.3.1 (2017-09-01)
------------------
* [FIX] when renaming/deleting a module, rename/delete its xmlid
* Added suggestion for latest version install in docs
* [FIX] support versions without _fields
* [FIX] m2o_to_x2m: Compatible with Odoo v10


1.3.0 (2017-05-01)
------------------
* [IMP] rename_models: Add warning on docstring
* [FIX] update_module_names: Rename non updated XML-ID occurences
* [ADD] convert_binary_field_to_attachment
* [RFR] Local logger; don't force debug level
* [FIX] Adapt code to docstring by passing env by default starting from 10.0
* [FIX] protect openerp imports
* [ADD] new logging decorator

1.2.2 (2016-12-27)
------------------
* New argument merge_modules in update_module_names for merging several
  modules.

1.2.1 (2016-11-07)
------------------
* [FIX] Broken compatibility of 1.2.0 with Odoo 8.0
* [FIX] Fix argument name in migrate __doc__ to actual argument

1.2.0 (2016-10-10)
------------------

* [IMP] Lift constraints
* [IMP] Update module field in ir_model_fields when calling rename_models
* [ADD] allow to create an environment automatically
* [ADD] rename references to the model in mail related records
* [ADD] rename_property
* [IMP] clarifying docstring
* [FIX] doc typo
* [FIX] .travis.yml: remove Python 2.6 test
* [RFR] Move column_exists so it can be used during loading
* [MIG] 10.0 imports

1.1.2 (2016-06-13)
------------------

* [FIX] missing %% in convert_field_to_html()
* [FIX] Remove wrong docs
* [FIX] Avoid broken updates
* [IMP] Add new context manager allow_pgcodes
* [FIX] support OpenERP version that don't have cr.savepoint


1.1.1 (2015-10-30)
------------------

* [IMP] New function 'is_module_installed()'
* [ADD] when renaming a model, also move link in ir_attachment
* [FIX] Compatibility for OpenERP versions prior to 6.1
* [FIX] use correct column name in rename_models
* [IMP] .travis.yml: Add auto-deployment
* [IMP] map_values: Support set & notset selectors

1.1.0 (2015-09-21)
------------------

* [IMP] set_defaults: Don't use ORM by default.
* Remove pip imports which break coverage with pypy3
* Add basic coverage configuration
* Factor out duplicated metadata about package
* [IMP] Google or NymPy docstrings
* [IMP] docstrings `copy_columns`, `rename_columns`
* [IMP] update_module_names: Handle ir_translation
* [FIX] lib for working with old API (<= 7.0)
* [FIX] set_defaults: Cope with inherited fields by delegation

1.0.0 (2015-08-10)
------------------

* Rerelease to pypi with proper upload
* Include requirements.txt
* Mark as Beta

0.1.2 (2015-06-23)
------------------

* Rewrite history with git filter-branch
* Remove unneeded files from history
  * openupgrade_loading.py
  * deferred80.py
  * openupgrade_log.py
  * #openupgrade_loading.py#

0.1.1 (2015-05-05)
------------------

* Fixes to the tests
* Add more badges
* Fix pip install issue with required.txt

0.1.0 (2015-05-04)
------------------

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OCA/openupgradelib",
    "name": "openupgradelib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7",
    "maintainer_email": null,
    "keywords": "openupgradelib",
    "author": "Odoo Community Association (OCA)",
    "author_email": "support@odoo-community.org",
    "download_url": "https://files.pythonhosted.org/packages/11/2a/2d2bcd7f272f6c924571b27ce843ac4a91a91f175623b36f77bf20bb3712/openupgradelib-3.7.2.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/travis/OCA/openupgradelib.svg\n    :target: https://travis-ci.org/OCA/openupgradelib\n    :alt: Build Status\n\n.. image:: https://coveralls.io/repos/OCA/openupgradelib/badge.svg?service=github\n  :target: https://coveralls.io/github/OCA/openupgradelib\n  :alt: Coverage Status\n\n.. image:: https://codeclimate.com/github/OCA/openupgradelib/badges/gpa.svg\n   :target: https://codeclimate.com/github/OCA/openupgradelib\n   :alt: Code Climate\n\n.. image:: https://img.shields.io/pypi/v/openupgradelib.svg\n   :target: https://pypi.python.org/pypi/openupgradelib\n   :alt: Pypi Package\n\n===============================\nOpenUpgrade Library\n===============================\n\nA library with support functions to be called from Odoo migration scripts.\n\n* Free software: AGPL-3 license\n* Documentation: https://oca.github.io/openupgradelib\n\nInstall\n-------\n\nAlways get the latest version through:\n\npip/pip3 install --ignore-installed git+https://github.com/OCA/openupgradelib.git@master\n\nFeatures\n--------\n\n* TODO\n\n\n\n\nHistory\n-------\n3.0.0 (2019-09-16)\n------------------\n\n* [IMP] SQL version of last_message_post\n* [IMP] keep old module's state when merging modules and the target is \u2026\n* [ADD] delete_records_safely_by_xml_id\n* [FIX] rename_models: Rename correctly ir.property values (without ^)\n* [IMP] merge_records: Be more conservative on merge values\n* [RFR] No yaml import in Odoo 12\n* [ADD] Chunked method\n* [ADD] search and replace a single ID across the whole database\n* [RFR] Merge with existing method\n* [FIX] merge_records: bad column in _change_generic exclusion\n* [FIX] merge_records: escape column names in _change_foreign_key_refs\n* [FIX] merge_records: unreachable code due to bad condition in _change\u2026\n* [IMP] merge_records: align sql queries to better visualization\n* [FIX] merge_records: missing argument in _delete_records_sql\n* [FIX] merge_records: missing argument in _adjust_merged_values_orm\n* [FIX] merge_records: tuples and lists don't sum\n* [FIX] _adjust_merged_values_orm: char default case\n* [FIX] merge_records (orm): take into account inactive records\n* [FIX] _adjust_merged_values_orm: integer default case\n* [IMP] merge_records: add adjust values for binary & many2one\n* [FIX] merge_records: ensure value in merging many2one and binary types\n* [FIX] merge_records: if merging many2many, avoid warning of bad compa\u2026\n* [FIX] Solve TypeError in _adjust_merged_values_orm\n* [IMP] merge_records: Put exception condition on records to be merged\n* [IMP] merge_records: Check which records to be merged exist\n* [FIX] merge_records: Handle better translatable fields\n* [FIX] Merge records on sql take into account rel tables\n* [IMP] openupgrade_merge_records: Improve code for handling m2m tables\u2026\n* [FIX] SQL request into moved_fields function\n* [FIX] set_defaults: New api adaptation\n* [ADD] Clunky travis script to run functional tests across a range of Odoo versions\n* [FIX] openupgradelib: Manage null values to avoid TypeError when merging\n* [FIX] openupgrade_merge_records: `filter` should be properly applied\n* [FIX] openupgrade_merge_records: l[0] is not valid for `filter` object\n* [FIX] openupgradelib: _get_existing_records for v11 and above\n* [FIX] chunked: Adapt to all supported versions\n* [FIX] rename_models\n* [IMP] add_fields: Consider corner edges and >= v12\n* [IMP] Add XML conversion framework and Bootstrap 3 to 4 converter\n* [FIX] update_module_moved_fields: Allow v12\n* [IMP] Support multilang updates in Bootstrap 3 to 4 migration\n* [FIX] typo in 12.0 tools\n* [IMP] rename_models: add mail_message_subtype in rename_models\n* [FIX+IMP] convert_string_bootstrap_3to4: Don't try to convert empty columns\n* [FIX] merge_recordS: bad query in _change_foreign_key_refs\n* [FIX] merge_records: bad query in _change_foreign_key_refs (part 2)\n* [FIX] merge_records: reduce queries in _change_foreign_key_refs\n* [FIX] Respect preexisting styles and attributes\n* [IMP] Allow callable XML replacements\n* [IMP] Translate from v11 Slider to v12 Carousel\n* [FIX] convert_xml_node: node.attrib doesn't have copy() method\n* [FIX] Remove call to `setdefault()`\n* [IMP] update_module_names: rename instead of merge case\n* [ADD] copy_fields_multilang method\n* [FIX] Adapt `logged_query` to work with `psycopg2.sql.SQL` and similar helpers\n* [IMP] View translations are special\n* [FIX] openupgrade_merge_records: field XML ID v12\n* [IMP] For small tables it's perfectly acceptable to drop index and then let Odoo recreate it, but with large tables this scenario is rather costly.\n* [IMP] delete_records_safely_by_xml_id: Avoid noisy log if the XML-ID is not found\n* [FIX] add_fields: Respect sql_type and build safe query\n\n2.0.0 (2018-07-21)\n------------------\n* [FIX] set_defaults: New api adaptation\n* [RVR] Python 3 compatibility\n* [IMP] load_data: support update mode where we never try to create records\n* [ADD] rename_fields: New method for renaming completely fields\n* [ADD] replace_account_types: Replace account types for Odoo 9.0\n* [ADD] delete_template_translations: New method for deleting translations of changed templates with noupdate true\n* [ADD] disable_invalid_filters\n* [FIX] Fix logging with non-ascii characters in exception\n* [IMP] rename_models: rename field xmlids\n* [ADD] add_fields: Add a field definition\n* [ADD] update_module_moved_fields: New method for updating module field when moving a field from one module to another\n* [IMP] rename_models: Handle properties that reference to the old model\n* [IMP] logged_query: Allow to not logging output if no records affected\n* [ADD] merge_records: New method for merging several records into a target one\n* [IMP] convert_binary_field_to_attachment: Conversion to attachment on large datasets\n\n1.3.1 (2017-09-01)\n------------------\n* [FIX] when renaming/deleting a module, rename/delete its xmlid\n* Added suggestion for latest version install in docs\n* [FIX] support versions without _fields\n* [FIX] m2o_to_x2m: Compatible with Odoo v10\n\n\n1.3.0 (2017-05-01)\n------------------\n* [IMP] rename_models: Add warning on docstring\n* [FIX] update_module_names: Rename non updated XML-ID occurences\n* [ADD] convert_binary_field_to_attachment\n* [RFR] Local logger; don't force debug level\n* [FIX] Adapt code to docstring by passing env by default starting from 10.0\n* [FIX] protect openerp imports\n* [ADD] new logging decorator\n\n1.2.2 (2016-12-27)\n------------------\n* New argument merge_modules in update_module_names for merging several\n  modules.\n\n1.2.1 (2016-11-07)\n------------------\n* [FIX] Broken compatibility of 1.2.0 with Odoo 8.0\n* [FIX] Fix argument name in migrate __doc__ to actual argument\n\n1.2.0 (2016-10-10)\n------------------\n\n* [IMP] Lift constraints\n* [IMP] Update module field in ir_model_fields when calling rename_models\n* [ADD] allow to create an environment automatically\n* [ADD] rename references to the model in mail related records\n* [ADD] rename_property\n* [IMP] clarifying docstring\n* [FIX] doc typo\n* [FIX] .travis.yml: remove Python 2.6 test\n* [RFR] Move column_exists so it can be used during loading\n* [MIG] 10.0 imports\n\n1.1.2 (2016-06-13)\n------------------\n\n* [FIX] missing %% in convert_field_to_html()\n* [FIX] Remove wrong docs\n* [FIX] Avoid broken updates\n* [IMP] Add new context manager allow_pgcodes\n* [FIX] support OpenERP version that don't have cr.savepoint\n\n\n1.1.1 (2015-10-30)\n------------------\n\n* [IMP] New function 'is_module_installed()'\n* [ADD] when renaming a model, also move link in ir_attachment\n* [FIX] Compatibility for OpenERP versions prior to 6.1\n* [FIX] use correct column name in rename_models\n* [IMP] .travis.yml: Add auto-deployment\n* [IMP] map_values: Support set & notset selectors\n\n1.1.0 (2015-09-21)\n------------------\n\n* [IMP] set_defaults: Don't use ORM by default.\n* Remove pip imports which break coverage with pypy3\n* Add basic coverage configuration\n* Factor out duplicated metadata about package\n* [IMP] Google or NymPy docstrings\n* [IMP] docstrings `copy_columns`, `rename_columns`\n* [IMP] update_module_names: Handle ir_translation\n* [FIX] lib for working with old API (<= 7.0)\n* [FIX] set_defaults: Cope with inherited fields by delegation\n\n1.0.0 (2015-08-10)\n------------------\n\n* Rerelease to pypi with proper upload\n* Include requirements.txt\n* Mark as Beta\n\n0.1.2 (2015-06-23)\n------------------\n\n* Rewrite history with git filter-branch\n* Remove unneeded files from history\n  * openupgrade_loading.py\n  * deferred80.py\n  * openupgrade_log.py\n  * #openupgrade_loading.py#\n\n0.1.1 (2015-05-05)\n------------------\n\n* Fixes to the tests\n* Add more badges\n* Fix pip install issue with required.txt\n\n0.1.0 (2015-05-04)\n------------------\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "AGPL-3",
    "summary": "A library with support functions to be called from Odoo migration scripts.",
    "version": "3.7.2",
    "project_urls": {
        "Homepage": "https://github.com/OCA/openupgradelib"
    },
    "split_keywords": [
        "openupgradelib"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6004001b8bae2bef2831aa52cd5437c98b938134c90efecaf55f8e962ce7773",
                "md5": "7d414cc8625c48aa75e4024228572dfa",
                "sha256": "d3bea531226c487e3b90e0d80046c94c5c03886d954579a56f23f25cd84d7514"
            },
            "downloads": -1,
            "filename": "openupgradelib-3.7.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7d414cc8625c48aa75e4024228572dfa",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7",
            "size": 82039,
            "upload_time": "2024-12-10T16:39:49",
            "upload_time_iso_8601": "2024-12-10T16:39:49.957231Z",
            "url": "https://files.pythonhosted.org/packages/c6/00/4001b8bae2bef2831aa52cd5437c98b938134c90efecaf55f8e962ce7773/openupgradelib-3.7.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "112a2d2bcd7f272f6c924571b27ce843ac4a91a91f175623b36f77bf20bb3712",
                "md5": "a5d39b1b23765882ee79c7ff0596e578",
                "sha256": "5f1afc271c4c6ac8634e8302519c32a22efaf5a3b6699999c734ec77ae8a859f"
            },
            "downloads": -1,
            "filename": "openupgradelib-3.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a5d39b1b23765882ee79c7ff0596e578",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7",
            "size": 7847681,
            "upload_time": "2024-12-10T16:39:52",
            "upload_time_iso_8601": "2024-12-10T16:39:52.806012Z",
            "url": "https://files.pythonhosted.org/packages/11/2a/2d2bcd7f272f6c924571b27ce843ac4a91a91f175623b36f77bf20bb3712/openupgradelib-3.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 16:39:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OCA",
    "github_project": "openupgradelib",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "wheel",
            "specs": []
        },
        {
            "name": "coveralls",
            "specs": []
        },
        {
            "name": "flake8",
            "specs": []
        },
        {
            "name": "pep8-naming",
            "specs": []
        },
        {
            "name": "lxml",
            "specs": [
                [
                    "<=",
                    "4.3.4"
                ]
            ]
        },
        {
            "name": "psycopg2",
            "specs": [
                [
                    "==",
                    "2.7.3.1"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "<",
                    "58.0"
                ]
            ]
        }
    ],
    "lcname": "openupgradelib"
}
        
Elapsed time: 0.36466s