تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
851 أدوات العرض

I am using the Cybrosis base_accounting_kit  under the community edition of Odoo v16.  It works fine. 

But I have hit what I think might be an issue. I am trying to upgrade to v17 and the OpenUpgrade script is only installing the base kit. I am wondering if it’s an issue with the bas_accounting_kit. I have already downloaded the new one for v17 and placed it in the v17 ooo addons.

Any ideas what I need to check please?


Phil

الصورة الرمزية
إهمال
أفضل إجابة

Hello Phil,

Okay, you're using the cybrosis/base_accounting_kit in Odoo 16 Community, and you're encountering an issue during the OpenUpgrade from v16 to v17 where only the base kit is being installed, even though you've placed the v17 version of the module in your v17 addons path. Here's a breakdown of potential causes and troubleshooting steps:

Understanding the Problem

The OpenUpgrade process relies on upgrade scripts within each module to migrate data and adapt the module to the new Odoo version. If the base_accounting_kit module doesn't have a proper upgrade script for v17, or if the script is failing, OpenUpgrade might skip the module or only install the basic structure without migrating the data.

Troubleshooting Steps

  1. Verify the v17 Module's __manifest__.py:
    • Check version: Ensure the version key in the __manifest__.py file of the v17 base_accounting_kit is correctly set to 17.0.x.x (or whatever the correct version number is for the v17 release).
    • Check depends: Verify that the depends key includes all necessary dependencies for v17. If the module relies on other modules, make sure those are also present and correctly versioned for v17.
    • Check installable and application: Make sure installable is set to True. application should be set to True if it's a full application, or False if it's a technical module.
    • Example:
      {
          'name': 'Base Accounting Kit',
          'version': '17.0.1.0',
          'category': 'Accounting',
          'author': 'Cybrosis',
          'website': 'https://cybrosis.com',
          'license': 'AGPL-3',
          'depends': ['account', 'base'],  # Add any other dependencies
          'data': [
              # Your data files
          ],
          'installable': True,
          'application': True,
      }
      
  2. Check for v17 Upgrade Scripts:
    • Look for openupgrade_scripts Directory: The base_accounting_kit module should have a directory named openupgrade_scripts (or similar) containing Python scripts that handle the upgrade process.
    • Check Script Names: The scripts should be named according to the OpenUpgrade naming convention (e.g., openupgrade_16_0_17_0.py).
    • Examine Script Content: Carefully examine the contents of the upgrade scripts. Look for any errors, missing steps, or code that might be failing during the upgrade.
    • Example Script (openupgrade_16_0_17_0.py):
      from openupgradelib import openupgrade
      
      @openupgrade.migrate()
      def migrate(env, version):
          # Your upgrade logic here
          # Example:
          # openupgrade.rename_fields(env, [('account.account', 'old_field', 'new_field')])
          pass
      
  3. Check the Odoo Upgrade Log:
    • The Odoo upgrade process generates a detailed log that can provide valuable information about any errors or warnings that occurred during the upgrade.
    • Locate the Log: The location of the log file depends on your Odoo installation. It's typically in the Odoo data directory or in a log directory specified in your Odoo configuration file.
    • Search for Errors: Search the log file for any errors or warnings related to the base_accounting_kit module. Look for messages that indicate that the upgrade script failed or that certain data could not be migrated.
    • Analyze the Errors: Analyze the errors to understand the cause of the problem. The error messages might provide clues about missing dependencies, incorrect data types, or other issues.
  4. Check Module Loading Order:
    • In some cases, the order in which modules are loaded during the upgrade can affect the outcome.
    • Explicitly Specify Dependencies: In the __manifest__.py file of the base_accounting_kit module, make sure all dependencies are explicitly listed in the depends key.
    • Try Reordering Modules in addons_path: As a test, try reordering the modules in your addons_path to see if that makes a difference.
  5. Database Constraints and Data Integrity:
    • Sometimes, upgrade issues are caused by database constraints or data integrity problems in the original Odoo 16 database.
    • Check for Constraint Violations: Look for any database constraint violations related to the base_accounting_kit module.
    • Validate Data: Validate the data in the tables used by the base_accounting_kit module to ensure that it's consistent and correct.
  6. OpenUpgrade Configuration:
    • Review your OpenUpgrade configuration file (if you're using one) to ensure that it's correctly configured for the upgrade.
    • Check Module Mapping: If you're using a module mapping file, make sure the base_accounting_kit module is correctly mapped to its v17 version.
  7. Manual Intervention (If Necessary):
    • If you've exhausted all other troubleshooting steps and you're still unable to resolve the issue, you might need to manually intervene in the upgrade process.
    • Disable the Module: As a last resort, you could try disabling the base_accounting_kit module during the upgrade. This would allow the upgrade to proceed without trying to migrate the module.
    • Manual Migration: After the upgrade is complete, you could then try to manually install the v17 version of the module and migrate the data. This would require more technical expertise and a good understanding of the module's data model.

Specific Steps for cybrosis/base_accounting_kit

  1. Contact Cybrosis: The best approach is to contact Cybrosis directly (if possible) and ask them about the v17 upgrade process for the base_accounting_kit module. They might have specific instructions or patches that you need to apply.
  2. Check Cybrosis's Website/Repository: Check Cybrosis's website or the module's repository (if it's open source) for any information about v17 compatibility or upgrade instructions.
  3. Community Forums: Search Odoo community forums or groups for discussions about upgrading the base_accounting_kit module to v17. Other users might have encountered the same issue and found a solution.

Example: Debugging an Upgrade Script

Let's say you find an error in the Odoo upgrade log that indicates that the openupgrade_16_0_17_0.py script is failing with a KeyError. This suggests that the script is trying to access a field that no longer exists in v17.

To debug this, you would:

  1. Open the openupgrade_16_0_17_0.py script.
  2. Examine the code for the KeyError. Look for code that accesses a dictionary or object using a key that might be missing.
  3. Update the code to handle the missing key. You might need to use a try...except block or check if the key exists before accessing it.
  4. Test the upgrade script again.

Important Notes

  • Backup Your Database: Before attempting any upgrade, always create a backup of your Odoo 16 database. This will allow you to restore your system to its previous state if something goes wrong.
  • Test in a Development Environment: Always test the upgrade process in a development environment before applying it to your production system.
  • Consult with Experts: If you're not comfortable with the upgrade process, consider consulting with an Odoo expert or OpenUpgrade specialist.

By following these steps, you should be able to identify the cause of the OpenUpgrade issue and find a solution to successfully upgrade the base_accounting_kit module to Odoo 17. Remember to test thoroughly and be careful when modifying upgrade scripts or database data.

🚀 Did This Solve Your Problem?

If this answer helped you save time, money, or frustration, consider:

✅ Upvoting (👍) to help others find it faster

✅ Marking as "Best Answer" if it resolved your issue

Your feedback keeps the Odoo community strong! 💪

(Need further customization? Drop a comment—I’m happy to refine the solution!)

الصورة الرمزية
إهمال
أفضل إجابة

Check if OpenUpgrade has migration scripts for base_accounting_kit from v16 to v17.
If not, OpenUpgrade won’t upgrade that module automatically.

Make sure the v17 base_accounting_kit is in your addons path and its __manifest__.py is updated for v17.

Manually upgrade the module after OpenUpgrade runs:
Run:
odoo -d yourdb -u base_accounting_kit --stop-after-init

This will install/upgrade the module in v17.

  1. Check logs for errors or missing dependencies.

If OpenUpgrade lacks migration scripts for the module, you need to either write those scripts or manually upgrade and migrate data.


الصورة الرمزية
إهمال
الكاتب أفضل إجابة

I realise I should include the upgrade script and the log file. I also include the manifest of the database when I back it up after upgrade and the oringinal DB manifest. As you can see, the upgraded DB does not have the full set mof modules and I cannot login. I run of this inside a virtual environment on MACOS v15.5 using Python v3.10.4.


** THE update script

## ./odoo/odoo-bin --conf=./odoo-conf --addons-path=/Users/culverhouse/ODOO_17/odoo/addons --upgrade-path=/Users/culverhouse/ODOO_17/OpenUpgrade/openupgrade_scripts/scripts/ --update all --load=base,web,openupgrade_framework -d Odoo17-PlanktonAnalytics-base-2b


PROBLEM LOADING SCRIPT LOG as it is being parsed as a link. I've tried inserting as a block quote, but that does not fix it. 


**The log shows no errors or warnings.


Manifests of V17 &  V16 databases:-

{

    "odoo_dump": "1",

    "db_name": "Odoo17-PlanktonAnalytics-base-2b",

    "version": "17.0",

    "version_info": [

        17,

        0,

        0,

        "final",

        0,

        ""

    ],

    "major_version": "17.0",

    "pg_version": "14.0",

    "modules": {

        "web_editor": "17.0.1.0",

        "base": "17.0.1.3",

        "base_import_module": "17.0.1.0",

        "iap": "17.0.1.1",

        "web_tour": "17.0.0.1",

        "web_unsplash": "17.0.1.1",

        "web": "17.0.1.0",

        "auth_totp": "17.0.1.0",

        "base_setup": "17.0.1.0",

        "base_import": "17.0.2.0",

        "bus": "17.0.1.0"

    }

}


V16:

{

    "odoo_dump": "1",

    "db_name": "Odoo16-PlanktonAnalytics-base-2b",

    "version": "16.0-20250408",

    "version_info": [

        16,

        0,

        0,

        "final",

        0,

        ""

    ],

    "major_version": "16.0",

    "pg_version": "14.0",

    "modules": {

        "contacts": "16.0.1.0",

        "mrp_repair": "16.0.1.0",

        "maintenance": "16.0.1.0",

        "crm": "16.0.1.8",

        "rating": "16.0.1.1",

        "auth_totp_mail": "16.0.1.0",

        "sale_stock_margin": "16.0.0.1",

        "calendar": "16.0.1.1",

        "data_recycle": "16.0.1.3",

        "mail": "16.0.1.10",

        "hr_contract": "16.0.1.0",

        "hr": "16.0.1.1",

        "note": "16.0.1.0",

        "digest": "16.0.1.1",

        "hr_maintenance": "16.0.1.0",

        "mail_bot": "16.0.1.2",

        "product": "16.0.1.2",

        "crm_sms": "16.0.1.1",

        "sales_team": "16.0.1.1",

        "spreadsheet_account": "16.0.1.0",

        "auth_totp": "16.0.1.0",

        "uom": "16.0.1.0",

        "mail_bot_hr": "16.0.1.0",

        "spreadsheet_dashboard_purchase_stock": "16.0.1.0",

        "sale_purchase": "16.0.1.0",

        "purchase_price_diff": "16.0.1.1",

        "sale_management": "16.0.1.0",

        "base_iban": "16.0.1.0",

        "purchase_stock": "16.0.1.2",

        "spreadsheet_dashboard_stock_account": "16.0.1.0",

        "sale_expense": "16.0.1.0",

        "account_edi_ubl_cii": "16.0.1.0",

        "sale_mrp": "16.0.1.0",

        "purchase_mrp": "16.0.1.0",

        "auth_totp_portal": "16.0.1.0",

        "web_editor": "16.0.1.0",

        "spreadsheet_dashboard_purchase": "16.0.1.0",

        "phone_validation": "16.0.2.1",

        "spreadsheet_dashboard_sale": "16.0.1.0",

        "base_vat": "16.0.1.0",

        "web": "16.0.1.0",

        "product_margin": "16.0.1.0",

        "spreadsheet_dashboard_account": "16.0.1.0",

        "sale_sms": "16.0.1.0",

        "stock_sms": "16.0.1.0",

        "base_import": "16.0.2.0",

        "analytic": "16.0.1.1",

        "web_tour": "16.0.0.1",

        "l10n_uk": "16.0.1.0",

        "sale_purchase_stock": "16.0.1.0",

        "auth_signup": "16.0.1.0",

        "sale_margin": "16.0.1.0",

        "web_kanban_gauge": "16.0.1.0",

        "hr_expense": "16.0.2.0",

        "portal": "16.0.1.0",

        "barcodes": "16.0.2.0",

        "iap_mail": "16.0.1.0",

        "iap_crm": "16.0.1.0",

        "sms": "16.0.2.4",

        "resource": "16.0.1.1",

        "snailmail": "16.0.0.4",

        "http_routing": "16.0.1.0",

        "base_setup": "16.0.1.0",

        "utm": "16.0.1.1",

        "barcodes_gs1_nomenclature": "16.0.1.0",

        "google_gmail": "16.0.1.2",

        "bus": "16.0.1.0",

        "privacy_lookup": "16.0.1.0",

        "account_payment_invoice_online_payment_patch": "16.0.1.0",

        "payment": "16.0.2.0",

        "partner_autocomplete": "16.0.1.1",

        "spreadsheet_dashboard_hr_expense": "16.0.1.0",

        "calendar_sms": "16.0.1.1",

        "portal_rating": "16.0.1.0",

        "base_install_request": "16.0.1.0",

        "hr_org_chart": "16.0.1.0",

        "account_sequence": "16.0.1.0",

        "social_media": "16.0.0.1",

        "spreadsheet_dashboard": "16.0.1.0",

        "spreadsheet": "16.0.1.0",

        "iap": "16.0.1.1",

        "base": "16.0.1.3",

        "purchase": "16.0.1.2",

        "account": "16.0.1.2",

        "account_payment": "16.0.2.0",

        "stock_account": "16.0.1.1",

        "spreadsheet_dashboard_sale_expense": "16.0.1.0",

        "account_qr_code_sepa": "16.0.0.1",

        "sale": "16.0.1.2",

        "mrp_account": "16.0.1.0",

        "stock": "16.0.1.1",

        "dev_purchase_template": "16.0.1.0",

        "mrp": "16.0.2.0",

        "sale_crm": "16.0.1.0",

        "sale_product_configurator": "16.0.1.0",

        "sale_stock": "16.0.1.0",

        "delivery": "16.0.1.0",

        "repair": "16.0.1.0",

        "sale_expense_margin": "16.0.1.0",

        "account_edi": "16.0.1.0"

    }

}

I cannot see where the error is that is preventing the remaining modules from loading. I thought it might be base_accounting_kit, but I am uncertain. I downloaded the v17 version of this module and placed it in the Addons folder.


Any suggestions most welcome,


Phil

الصورة الرمزية
إهمال