Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2557 Tampilan

I am trying to migrate my customize module which works well on odoo 16 to odoo 17 but I have an error external id not found I tried to check I noticed when I install the module in odoo 17 the reports are not created in reports so what means that the xml code can't find the external id I created the reports manually and it worked now I don't understand why the reports are not automatically created when I install my module yet the reports are in the module

Please help me to sort this out

Thanks in advance

Avatar
Buang
Jawaban Terbai

1. Check Module Dependencies

Ensure that all dependencies required by your module are specified in the __manifest__.py file and that these dependencies are installed before your module. Missing or incorrectly specified dependencies can prevent the proper creation of reports.

pythonCopy code'depends': ['base', 'sale', 'report'],  # Example dependencies

2. Review Data File Loading

Check the __manifest__.py file to confirm that all XML files, especially those defining the reports, are correctly listed under the 'data' or 'qweb' keys:

pythonCopy code'data': [
    'views/report_templates.xml',
    'views/some_other_views.xml',
],
'qweb': [
    'static/src/xml/report_qweb.xml',
],

Make sure that the paths are correct and that the files are actually in those locations in your module directory.

3. Examine Report XML Definitions

Review the XML files where you define the reports. Check for any changes in the report definition syntax between Odoo 16 and Odoo 17. Ensure that the syntax matches what Odoo 17 expects. For instance, the way reports are defined or registered might have changed:

xmlCopy code

4. External IDs and Upgrade Issues

If your module was upgraded or developed in an environment where it was installed before, there might be issues with lingering data or IDs:

  • Ensure that the external IDs used in your XML are unique and not conflicting with existing IDs in the database.
  • If possible, test the installation on a fresh database to see if the issue persists.

5. Debugging Installation

Install your module with debugging logs enabled to catch any errors during the installation. You can do this by running Odoo with log level set to debug:

bashCopy code./odoo-bin --log-level=debug_sql # Provides detailed logging

This can provide insights into what happens when your module's data files are processed.

6. Manual Creation vs. Automatic Creation

Since you mentioned that creating the reports manually works, it suggests that the definitions are mostly correct but might not be processed due to sequencing or dependency issues. Ensure that the module installation process doesn't have interrupted flows or missing steps that could lead to the XML files not being processed.

7. Check Security and Access Rights

Make sure that all necessary security and access rights are defined for the reports. Sometimes, missing access rights can prevent elements from being created or accessed properly.

8. Module Structure and Cyclic Dependencies

Check if there is a cyclic dependency within your module or between your module and others. This can sometimes result in parts of the module not being loaded correctly.

Following these steps should help identify and resolve the issue with reports not being automatically created when you install your module in Odoo 17. If the problem persists, consider reaching out to the Odoo community forums or filing a support ticket with Odoo if you have an enterprise contract.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
4
Jan 25
43026
0
Okt 24
724
0
Okt 24
5
0
Sep 24
769
1
Mei 23
2108