diff --git a/openupgrade_framework/README.rst b/openupgrade_framework/README.rst index 2545c428bcb5..15be2b37bf55 100644 --- a/openupgrade_framework/README.rst +++ b/openupgrade_framework/README.rst @@ -28,33 +28,35 @@ Openupgrade Framework |badge1| |badge2| |badge3| |badge4| |badge5| -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". +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 +- https://github.com/OCA/OpenUpgrade/ +- https://oca.github.io/OpenUpgrade **Table of contents** @@ -64,83 +66,82 @@ For detailed documentation see: Installation ============ -This module does not need to be installed on a database. -It simply needs to be available via your ``addons-path``. +This module does not need to be installed on a database. It simply needs +to be available via your ``addons-path``. Configuration ============= -* call your odoo instance with the option ``--load=base,web,openupgrade_framework`` +- call your odoo instance with the option + ``--load=base,web,openupgrade_framework`` or -* add the key to your configuration file: +- add the key to your configuration file: -.. code-block:: shell +.. code:: shell - [options] - server_wide_modules = web,openupgrade_framework + [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 +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. Development =========== -The `odoo_patch` folder contains python files in a tree that mimicks the +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: +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 +- 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 +.. code:: python - # flake8: noqa - # pylint: skip-file + # flake8: noqa + # pylint: skip-file -* When you want to change the code. add the following tags: +- When you want to change the code. add the following tags: For an addition: -.. code-block:: python +.. code:: python - # - some code... - # + # + some code... + # For a change: -.. code-block:: python +.. code:: python - # - some code... - # + # + some code... + # For a removal: -.. code-block:: python +.. code:: python - # - # Comment the code, instead of removing it. - # + # + # Comment the code, instead of removing it. + # Bug Tracker =========== @@ -156,7 +157,7 @@ Credits ======= Authors -~~~~~~~ +------- * Therp BV * Opener B.V. @@ -164,21 +165,21 @@ Authors * Hunki Enterprises BV Contributors -~~~~~~~~~~~~ +------------ -* Stefan Rijnhart -* Sylvain LE GAL +- Stefan Rijnhart +- Sylvain LE GAL Other credits -~~~~~~~~~~~~~ +------------- -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. +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. Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. diff --git a/openupgrade_framework/readme/CONFIGURE.md b/openupgrade_framework/readme/CONFIGURE.md new file mode 100644 index 000000000000..13ef1e5b0946 --- /dev/null +++ b/openupgrade_framework/readme/CONFIGURE.md @@ -0,0 +1,16 @@ +- call your odoo instance with the option + `--load=base,web,openupgrade_framework` + +or + +- add the key to your configuration file: + +``` 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. diff --git a/openupgrade_framework/readme/CONFIGURE.rst b/openupgrade_framework/readme/CONFIGURE.rst deleted file mode 100644 index 8fad427bf4ac..000000000000 --- a/openupgrade_framework/readme/CONFIGURE.rst +++ /dev/null @@ -1,15 +0,0 @@ -* 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. diff --git a/openupgrade_framework/readme/CONTRIBUTORS.md b/openupgrade_framework/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..a108409b034c --- /dev/null +++ b/openupgrade_framework/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Stefan Rijnhart \<\> +- Sylvain LE GAL \<\> diff --git a/openupgrade_framework/readme/CONTRIBUTORS.rst b/openupgrade_framework/readme/CONTRIBUTORS.rst deleted file mode 100644 index d693b699fbb2..000000000000 --- a/openupgrade_framework/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Stefan Rijnhart -* Sylvain LE GAL diff --git a/openupgrade_framework/readme/CREDITS.md b/openupgrade_framework/readme/CREDITS.md new file mode 100644 index 000000000000..fa515612942e --- /dev/null +++ b/openupgrade_framework/readme/CREDITS.md @@ -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. diff --git a/openupgrade_framework/readme/CREDITS.rst b/openupgrade_framework/readme/CREDITS.rst deleted file mode 100644 index c57b7d4144c9..000000000000 --- a/openupgrade_framework/readme/CREDITS.rst +++ /dev/null @@ -1,4 +0,0 @@ -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. diff --git a/openupgrade_framework/readme/DESCRIPTION.md b/openupgrade_framework/readme/DESCRIPTION.md new file mode 100644 index 000000000000..71cb68ac0b99 --- /dev/null +++ b/openupgrade_framework/readme/DESCRIPTION.md @@ -0,0 +1,29 @@ +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 + +- 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: + +- +- diff --git a/openupgrade_framework/readme/DESCRIPTION.rst b/openupgrade_framework/readme/DESCRIPTION.rst deleted file mode 100644 index 96b05a944a01..000000000000 --- a/openupgrade_framework/readme/DESCRIPTION.rst +++ /dev/null @@ -1,27 +0,0 @@ -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 diff --git a/openupgrade_framework/readme/DEVELOP.md b/openupgrade_framework/readme/DEVELOP.md new file mode 100644 index 000000000000..9d4c548862be --- /dev/null +++ b/openupgrade_framework/readme/DEVELOP.md @@ -0,0 +1,50 @@ +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 + +``` python +# flake8: noqa +# pylint: skip-file +``` + +- When you want to change the code. add the following tags: + +For an addition: + +``` python +# +some code... +# +``` + +For a change: + +``` python +# +some code... +# +``` + +For a removal: + +``` python +# +# Comment the code, instead of removing it. +# +``` diff --git a/openupgrade_framework/readme/DEVELOP.rst b/openupgrade_framework/readme/DEVELOP.rst deleted file mode 100644 index c65d2cae05d7..000000000000 --- a/openupgrade_framework/readme/DEVELOP.rst +++ /dev/null @@ -1,52 +0,0 @@ -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 - - # - some code... - # - -For a change: - -.. code-block:: python - - # - some code... - # - -For a removal: - -.. code-block:: python - - # - # Comment the code, instead of removing it. - # diff --git a/openupgrade_framework/readme/INSTALL.md b/openupgrade_framework/readme/INSTALL.md new file mode 100644 index 000000000000..471a1d162ce1 --- /dev/null +++ b/openupgrade_framework/readme/INSTALL.md @@ -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`. diff --git a/openupgrade_framework/readme/INSTALL.rst b/openupgrade_framework/readme/INSTALL.rst deleted file mode 100644 index 020d4947fb63..000000000000 --- a/openupgrade_framework/readme/INSTALL.rst +++ /dev/null @@ -1,2 +0,0 @@ -This module does not need to be installed on a database. -It simply needs to be available via your ``addons-path``. diff --git a/openupgrade_framework/static/description/index.html b/openupgrade_framework/static/description/index.html index f2e1854420b7..e2021e7ca503 100644 --- a/openupgrade_framework/static/description/index.html +++ b/openupgrade_framework/static/description/index.html @@ -369,28 +369,30 @@

Openupgrade Framework

!! source digest: sha256:83623c6be2461288a5aeea7f455a690963d774147e1865128e787d38292484af !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/OpenUpgrade Translate me on Weblate Try me on Runboat

-

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:

+

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 +
  • 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)
  • +
  • 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”.
  • +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:

    @@ -415,13 +417,14 @@

    Openupgrade Framework

    Installation

    -

    This module does not need to be installed on a database. -It simply needs to be available via your addons-path.

    +

    This module does not need to be installed on a database. It simply needs +to be available via your addons-path.

    Configuration

      -
    • call your odoo instance with the option --load=base,web,openupgrade_framework
    • +
    • call your odoo instance with the option +--load=base,web,openupgrade_framework

    or

      @@ -432,26 +435,27 @@

      Configuration

      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 +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.

    Development

    -

    The odoo_patch folder contains python files in a tree that mimicks the +

    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:

    +

    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
    • +
    • 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
     # flake8: noqa
    @@ -507,10 +511,10 @@ 

    Contributors

    Other credits

    -

    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.

    +

    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.

    Maintainers

    diff --git a/openupgrade_scripts/apriori.py b/openupgrade_scripts/apriori.py index 6ac8879e4de2..071163ff92a1 100644 --- a/openupgrade_scripts/apriori.py +++ b/openupgrade_scripts/apriori.py @@ -34,6 +34,8 @@ "website_sale_delivery": "website_sale", "website_sale_loyalty_delivery": "website_sale_loyalty", "website_sale_stock_product_configurator": "website_sale_product_configurator", + # OCA/purchase-workflow + "purchase_discount": "purchase", # OCA/web "web_advanced_search": "web", "web_listview_range_select": "web",