forked from OCA/OpenUpgrade
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parent c973596 author 张飞虎 <feihu.zhang@yumtown.com.cn> 1711431231 +0000 committer 张飞虎 <feihu.zhang@yumtown.com.cn> 1717058855 +0000 parent c973596 author 张飞虎 <feihu.zhang@yumtown.com.cn> 1711431231 +0000 committer 张飞虎 <feihu.zhang@yumtown.com.cn> 1717058818 +0000 添加openupgrade_framework代码OCA#4327 增加upgrade_anaylysis_work.txt init base migration script 初步完成base模块的升级脚本 初步添加account模块升级脚本 修复文件名错误 BUG Fix 增加mail模块升级脚本 完成mail升级脚本 初步添加hr升级脚本 完成hr模块升级脚本 完成account模块升级脚本 更新模块清单 添加sale_management升级脚本 修复升级问题 完善project模块升级脚本 增加一堆模块no_update的处理 BUG Fix 暂时移除delivery升级脚本 改进项目升级脚本 添加针对hr_responsible_id字段的处理 增加auth_signup升级脚本 修复mail_alias上的mail_channel数据 添加openupgrade_framework代码OCA#4327 parent c973596 author 张飞虎 <feihu.zhang@yumtown.com.cn> 1711431231 +0000 committer 张飞虎 <feihu.zhang@yumtown.com.cn> 1717058855 +0000 parent c973596 author 张飞虎 <feihu.zhang@yumtown.com.cn> 1711431231 +0000 committer 张飞虎 <feihu.zhang@yumtown.com.cn> 1717058818 +0000 添加openupgrade_framework代码OCA#4327 增加upgrade_anaylysis_work.txt init base migration script 初步完成base模块的升级脚本 初步添加account模块升级脚本 修复文件名错误 BUG Fix 增加mail模块升级脚本 完成mail升级脚本 初步添加hr升级脚本 完成hr模块升级脚本 完成account模块升级脚本 更新模块清单 添加sale_management升级脚本 修复升级问题 完善project模块升级脚本 增加一堆模块no_update的处理 BUG Fix 暂时移除delivery升级脚本 改进项目升级脚本 添加针对hr_responsible_id字段的处理 增加auth_signup升级脚本 修复mail_alias上的mail_channel数据
- Loading branch information
张飞虎
committed
May 30, 2024
1 parent
be57432
commit 93a53bc
Showing
160 changed files
with
7,522 additions
and
4,139 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* call your odoo instance with the option ``--load=base,web,openupgrade_framework`` | ||
|
||
or | ||
|
||
* add the key to your configuration file: | ||
|
||
.. code-block:: shell | ||
[options] | ||
server_wide_modules = web,openupgrade_framework | ||
When you load the module in either way of these ways, and you have the | ||
`openupgrade_scripts` module in your addons path available, the | ||
`--upgrade-path` option of Odoo will be set automatically to the location | ||
of the OpenUpgrade migration scripts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* Stefan Rijnhart <stefan@opener.amsterdam> | ||
* Sylvain LE GAL <https://twitter.com/legalsylvain> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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: | ||
|
||
* 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 `database_cleanup`. See | ||
https://odoo-community.org/shop/product/database-cleanup-918 | ||
* 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. | ||
* Prevent a number of log messages that do not apply when using OpenUpgrade. | ||
* Suppress log messages about failed view validation, which are to be expected | ||
during a migration. | ||
* Run migration scripts for modules that are installed as new dependencies | ||
of upgraded modules (when there are such scripts for those particular | ||
modules) | ||
* Production databases generated with demo data, will be transformed to | ||
non-demo ones. If you want to avoid that, you have to pass through the | ||
environment variable OPENUPGRADE_USE_DEMO, the value "yes". | ||
|
||
For detailed documentation see: | ||
|
||
* https://github.com/OCA/OpenUpgrade/ | ||
* https://oca.github.io/OpenUpgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
The `odoo_patch` folder contains python files in a tree that mimicks the | ||
folder tree of the Odoo project. It contains a number of monkey patches | ||
to improve the migration of an Odoo database between two major versions. | ||
|
||
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: | ||
|
||
To see the patches added, you can use ``meld`` tools: | ||
|
||
``meld PATH_TO_ODOO_FOLDER/odoo/ PATH_TO_OPENUPGRADE_FRAMEWORK_MODULE/odoo_patch`` | ||
|
||
|
||
To make more easy the diff analysis : | ||
|
||
* Make sure the python files has the same path as the original one. | ||
|
||
* Keep the same indentation as the original file. (using ``if True:`` if required) | ||
|
||
* Add the following two lines at the beginning of your file, to avoid flake8 / pylint | ||
errors | ||
|
||
.. code-block:: python | ||
# flake8: noqa | ||
# pylint: skip-file | ||
* When you want to change the code. add the following tags: | ||
|
||
For an addition: | ||
|
||
.. code-block:: python | ||
# <OpenUpgrade:ADD> | ||
some code... | ||
# </OpenUpgrade> | ||
For a change: | ||
|
||
.. code-block:: python | ||
# <OpenUpgrade:CHANGE> | ||
some code... | ||
# </OpenUpgrade> | ||
For a removal: | ||
|
||
.. code-block:: python | ||
# <OpenUpgrade:REMOVE> | ||
# Comment the code, instead of removing it. | ||
# </OpenUpgrade> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module does not need to be installed on a database. | ||
It simply needs to be available via your ``addons-path``. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.