Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
4576 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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;



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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

If you uninstall it it will be fixed.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 24
818
3
thg 7 25
2194
3
thg 6 25
2439
1
thg 6 25
2782
2
thg 5 25
2168