Se rendre au contenu
Menu
Cette question a été signalée
5 Réponses
4588 Vues

I hope that someone can help.  

I'm on: Odoo.SH, version 17 and running GitHub and GitHub Code.

I get this error message when I try to view a custom module in the apps. 

(Click on the three dots, module-info)


Error message: Can't fetch record(s) 1121. They might have been deleted.

My manifest file looks like:

{

    'name': 'Management System',

    'version':'1.0',

    'author': 'Noyau',

    'website': 'https://www.noyau.co.za',

    'summary': 'Management for business',

    'description': """Management for business""",

    'category': 'Services',

    'depends':[

        'base',

        'contacts',

        'portal',

    ],

    'data':[

        'security/ir.model.access.csv',

        'views/business_view.xml',

        'views/business_contracts.xml',

        'views/business_finances.xml',

        'views/menu.xml',

    ],

    'installable': True,

    'application': True,

    'license':'LGPL-3',

}

What is the problem?  Why can't I view my custom module?

And none of my scripts want to run (e.g. start date must be less than the end date).  Is this the reason?

Avatar
Ignorer
Meilleure réponse

this is because the module_type field is not set and should default to official, but I think this happens because the database already exists and we have a new module and the module_type field is not set automatically. we can fix this by using a server action.


modules = env['ir.module.module'].search([('module_type', '=', False)])

modules.write({'module_type': 'official'})


or by using sql:


UPDATE ir_module_module set module_type ='offical' where module_type is Null;



Avatar
Ignorer
Meilleure réponse

This might be conflict within when changes source code. You must update database 
'update ir_module_module set module_type='official' where module_type is Null;'
 
This'll be ok. Test it.

Avatar
Ignorer

And how do I update my Odoo.sh database? I am having the same issue

@Maximiliano you can go to shell and type psql from your odoo.sh

Meilleure réponse

I had same probleme on Odoo17, the bug is related to base_import_module module.

If you uninstall it it will be fixed.

Avatar
Ignorer
Meilleure réponse

Apparently, when i tried to open or see the related module through list view it goes with no problem. The issue might related on the kanban view, but not sure though.

Avatar
Ignorer
Auteur Meilleure réponse

Interestingly enough, I tried with nothing in the init file,  just the name and the non-data/non-dynamic entries in the manifest and nothing else (no folders, no anything) and I still got the error.

Update: the record number is the number of my development and the error is a missing file or missing information in a file?

Update: the developer at Odoo said that it might be because there is something going wrong with the module and the installation/app doesn't like it.  

Update: the developer was right... I fixed all of the bits and pieces that I thought was unnecessary (like warnings) and it worked!

Avatar
Ignorer
Publications associées Réponses Vues Activité
0
nov. 24
821
3
juil. 25
2209
3
juin 25
2460
1
juin 25
2844
2
mai 25
2181