Upgrade - euvm-odoo/internal-documentation GitHub Wiki

Here goes all the info on upgrade...

  • Intro: what is upgrade issue, upgrade projects, maintenance

Pipes and Projects

The Upgrade Services Team deal with tickets from the following pipes:

1. Upgrade Projects

Pipe leader:

When clients wish to upgrade their modules to a newer version of Odoo, a ticket is created for them in this pipe.

2. Upgrade Issues

Pipe leader:

After an Upgrade project is completed, clients may encounter bugs with their upgraded modules. These issues are reported here.

Rolling Release

Rolling release upgrades refer to a new upgrade method where client databases are upgraded automatically to the next version. The Upgrade Services team is responsible for dealing with issues blocking the upgrades.

3. Maintenance / Help

Pipe leader:

Clients who pay for the maintenance of their custom modules can report issues with them, and a Maintenance ticket will be opened.


To learn more about Maintenance tickets, please refer to the Upgrade and Maintanance Team Project Assignment Priorities document. Here you can find the details to look for before assigning yourself to a ticket to work on.

Step by Step Processes

Here are some of the more common processes that you may find whenever you're working on a ticket from any of the Upgrade and Maintenance team projects.

Getting started with Upgrade Projects

Generally, the steps to upgrade a module to a newer version are the following:

  1. Find the code for the modules to be upgraded

  2. Gather as much information about the project as you can

    • How does it work, both functionally and technically?
    • What has changed in newer versions?
  3. Make module installable on a database with the target version

    • Are there any missing fields in models?
    • Can you find and open existing views?
    • Do the templates resemble the original ones?
    • Does the module work as closely as possible as it did in the previous version?
  4. Prepare for the final migration of the production database, and stay available for any issues that might arise.

This process is explained in more detail in the official PSUS Upgrade Process [Technical] document..

Upgrade test server

How to connect to the upgrade server?

Upgrade-specific scripts need to be tested. You can use the Upgrade test server for this purpose.

You’ll need an SSH key to connect to the server. If you don’t have one, you can follow this tutorial on GitHub on how to add an SSH key to your machine.

Note: For some reason, Mac tends to forget SSH keys on startup, denying the connection to the server. This is solved by going to the SSH keys directory and re-adding the key to the SSH agent:

ssh-add <name_of_ssh_key>

Once everything is setup, use the following command to connect to the server:

<gram>@test.upgrade.odoo.com -A

Request a database to test upgrade scripts

Once connected to the upgrade test server, you’ll have to request a test database where you can run your scripts as the database is upgraded. You’ll require the ID number of the upgrade request. You can find it on the upgrade.odoo.com/web website.

Once you have it, you can execute the following command to create a dump of the database that will be upgraded.

odoo-upgrade-restore-request <request ID>

Note: If the “assigned host” field on the upgrade request form page is different from ‘production_master’, then you’ll need to pass the argument -m to use the assigned host that appears on the request

odoo-upgrade-restore-request <request ID> -n <assigned-host>.upgrade.com

The server will download the request data and restore a database. Take note of the template ID which you can use to test your script.

[INFO]::Database <template_id> successfully restored

How to obtain the latest version of your script?

Once connected to the upgrade test server, access the src/upgrade-specific directory, and fetch the most recent contents from GitHub.

cd src/upgrade-specific
git fetch

After that, checkout to your branch and you’re ready to test your script.

I rebased (squashed) my branch before pushing

Standing on the src/upgrade-specific directory inside the upgrade test server, hard reset your branch to its remote on GitHub which contains the latest changes.

~/src/upgrade-specific$ git reset --hard origin/<your_branch>

Perform a test upgrade

After requesting a database to test your upgrade-specific script, and checking out to your branch with the most recent changes, then you can proceed to test the upgrade process. This can take several minutes. Make sure to have a stable Internet connection.

upgrade upgrade --target <target_version> --template <template_id> --contract <client_subscription_code>

How to log notes during the upgrade process?

It’s strongly recommended to write log statements that can help you identify what is happening during the execution of your script. They’re especially useful if the upgrade process fails.

import logging
_logger = logging.getLogger(__name__)

def migrate(cr, version):
    ...

    _logger.info("Logging information")

    ...

Email Templates

You can use these templates to facilitate communication with clients and Business Analysts

Note: Avoid copying and pasting email templates. Always adapt the templates to your customer needs, and make sure to remove any placeholders.

[NOTIF] Started to work on ticket

[ACTION] Request access to repo

Hello, <client name>,

Could you give me access to your project on GitHub so I can start working on it? Here's my GitHub username is <GRAM-odoo>

You can consult the following guide for instructions on adding contributors to GitHub: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository

If you have any questions or need further clarification, please don't hesitate to reach out.

<greeting>,
The Upgrade Services team

[NOTIF] Migration Script created

Hello, <client name>,

I hope you are doing well. Thank you for bringing the issue to our attention. A migration script has been created to automatically correct the error whenever you request a new test database.

If you encounter any other issues, please don't hesitate to inform us.

<greeting>,
The Upgrade Services team

[ACTION] Schedule migration

Hello, <client name>,

To schedule the migration, could you please let us know your preferred date and time? Our available hours are Monday to Thursday, from 9 am to 5 pm CST. Please be aware that your production database will be temporarily unavailable for approximately one to two hours during the migration.

Please feel free to reach out if you have any questions or concerns.

<greeting>,
The Upgrade Services team

[ACTION] Request to open another help ticket

Hello, <client name>,

Thanks for reaching out. Since this inquiry is unrelated to the original ticket, I won't be able to assist any further. To ensure that we provide you with the best support, I recommend submitting a new ticket for this specific issue through our support portal at . Each ticket is tailored to address a single concern, which allows us to assign it to the most suitable expert for prompt assistance and maintain proper tracking.

Should you have any questions regarding the original issue or need further help, please don't hesitate to reach out.

<greeting>
<team>

Specific Information

General

Upgrade Issues

Rolling Releases

Database not found

This occurs when the client’s database is disabled sometime between the creation of the RR ticket and the moment when you started work on it. Report this on the log notes for the related ticket, add a screenshot as evidence, and move the RR ticket to the cancelled stage.

Upgrade already done

Report this on the log notes for the related ticket, add a screenshot as evidence, and move the RR ticket to the cancelled stage.

Upgrade Projects

Maintenance

⚠️ **GitHub.com Fallback** ⚠️