Search 1.9 billion lines of Odoo code on GitHub

openupgrade_framework

Author: Odoo Community Association (OCA), Therp BV, Opener B.V., GRAP
License: AGPL-3
Branch: add/14.0/framework_rebase
Repository: OCA/OpenUpgrade
Dependencies: base
Languages: HTML (435, 59.6%), Python (160, 21.9%), and reStructuredText (135, 18.5%)
Other branches: 14.0

<h1 class="title">Openupgrade Framework</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/openupgrade/tree/14.0/openupgrade_framework"><img alt="OCA/openupgrade" src="https://img.shields.io/badge/github-OCA%2Fopenupgrade-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/openupgrade-14-0/openupgrade-14-0-openupgrade_framework"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a></p> <p>This module is a technical module that contains a number of monkeypatches to improve the behaviour of Odoo when migrating your database using the OpenUpgrade migration scripts:</p> <ul class="simple"> <li>Prevent dropping columns or tables in the database when fields or models are obsoleted in the Odoo data model of the target release. After the migration, you can review and delete unused database tables and columns using <cite>database_cleanup</cite>. See <a class="reference external" href="https://odoo-community.org/shop/product/database-cleanup-918">https://odoo-community.org/shop/product/database-cleanup-918</a></li> <li>When data records are deleted during the migration (such as views or other system records), this is done in a secure mode. If the deletion fails because of some unforeseen dependency, the deletion will be cancelled and a message is logged, after which the migration continues.</li> <li>Prevent a number of log messages that do not apply when using OpenUpgrade.</li> <li>Suppress log messages containing instructions for developers of Odoo S.A. with regards to their own set of closed source migration scripts.</li> <li>Suppress log messages about failed view validation, which are to be expected during a migration.</li> <li>Run migration scripts for modules that are installed as new dependencies of upgraded modules (when there are such scripts for those particular modules)</li> </ul> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#installation" id="id1">Installation</a></li> <li><a class="reference internal" href="#configuration" id="id2">Configuration</a></li> <li><a class="reference internal" href="#development" id="id3">Development</a></li> <li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id5">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id6">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li> <li><a class="reference internal" href="#other-credits" id="id8">Other credits</a></li> <li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li> </ul> </li> </ul> </div> <a name="installation"></a> <h2><a class="toc-backref" href="#id1">Installation</a></h2> <p>This module does not need to be installed on a database. It simply needs to be available via your <code>addons-path</code>.</p> <a name="configuration"></a> <h2><a class="toc-backref" href="#id2">Configuration</a></h2> <ul class="simple"> <li>call your odoo instance with the option <code>--load=web,openupgrade_framework</code></li> </ul> <p>or</p> <ul class="simple"> <li>add the key to your configuration file:</li> </ul> <pre> <code lang="shell">[options] server_wide_modules = web,openupgrade_framework</code> </pre> <p>When you load the module in either way of these ways, and you have the <cite>openupgrade_scripts</cite> module in your addons path available, the <cite>--upgrade-path</cite> option of Odoo will be set automatically to the location of the OpenUpgrade migration scripts.</p> <a name="development"></a> <h2><a class="toc-backref" href="#id3">Development</a></h2> <p>The <cite>odoo_patch</cite> folder contains python files in a tree that mimicks the folter tree of the Odoo project. It contains a number of monkey patches to improve the migration of an Odoo database between two major versions.</p> <p>So far, we are able to make everything work without overwriting large blocks of code, but if larger patches need to be added, please use the method described below:</p> <p>To see the patches added, you can use <code>meld</code> tools:</p> <p><code>meld PATH_TO_ODOO_FOLDER/odoo/ PATH_TO_OPENUPGRADE_FRAMEWORK_MODULE/odoo_patch</code></p> <p>To make more easy the diff analysis :</p> <ul class="simple"> <li>Make sure the python files has the same path as the original one.</li> <li>Keep the same indentation as the original file. (using <code>if True:</code> if required)</li> <li>Add the following two lines at the beginning of your file, to avoid flake8 / pylint errors</li> </ul> <pre> <code lang="python"># flake8: noqa # pylint: skip-file</code> </pre> <ul> <li><p class="first">When you want to change the code. add the following tags:</p> <blockquote> <ul class="simple"> <li>For an addition:</li> </ul> </blockquote> </li> </ul> <pre> <code lang="python"># &lt;OpenUpgrade:ADD&gt; some code... # &lt;/OpenUpgrade&gt; * For a change:</code> </pre> <pre> <code lang="python"># &lt;OpenUpgrade:CHANGE&gt; some code... # &lt;/OpenUpgrade&gt; * For a removal:</code> </pre> <pre> <code lang="python"># &lt;OpenUpgrade:REMOVE&gt; # Comment the code, instead of removing it. # &lt;/OpenUpgrade&gt;</code> </pre> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id4">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/openupgrade/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed <a class="reference external" href="https://github.com/OCA/openupgrade/issues/new?body=module:%20openupgrade_framework%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id5">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id6">Authors</a></h3> <ul class="simple"> <li>Therp BV</li> <li>Opener B.V.</li> <li>GRAP</li> </ul> <a name="contributors"></a> <h3><a class="toc-backref" href="#id7">Contributors</a></h3> <ul class="simple"> <li>Stefan Rijnhart &lt;<a class="reference external" href="mailto:stefan&#64;opener.amsterdam">stefan&#64;opener.amsterdam</a>&gt;</li> <li>Sylvain LE GAL &lt;<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>&gt;</li> </ul> <a name="other-credits"></a> <h3><a class="toc-backref" href="#id8">Other credits</a></h3> <p>Many developers have contributed to the OpenUpgrade framework in its previous incarnation. Their original contributions may no longer needed, or they are no longer recognizable in their current form but OpenUpgrade would not have existed at this point without them.</p> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id9">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/openupgrade/tree/14.0/openupgrade_framework">OCA/openupgrade</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>

Dependency Graph