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

 Someone can help me ? i have this error when i try to install my new module.

"/opt/odoo17/odoo17/odoo/models.py", line 719, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'payment.acquirer' does not exist in registry. The above server error caused the following client error: RPC_ERROR: Odoo Server Error RPC_ERROR at makeErrorFromResponse (http://192.168.90.39:8069/web/assets/debug/web.assets_web.js:27903:19) at XMLHttpRequest. (http://192.168.90.39:8069/web/assets/debug/web.assets_web.js:27951:27 

here my manifest code : 


{

    'name': 'PAYMENT',

    'version': '1.0',

    'category': 'Payment',

    'summary': 'Integration',

    'description': 'Module',

    'depends': ['base', 'payment', 'account'],

    'data': [

        'ir.model.access.csv',

        'views/payment_acquirer_views.xml',

    ],

    'installable': True,

    'application': False,

}



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

Here my init code in models


from . import payment_acquirer

from . import payment_api





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

'depends': [ 'account', 'account_accountant', 'sale', 'purchase' , 'base' ],

It's possible to add more modules to the depends section. 

For data files like ir.model.access.csv, a security folder is required, so the correct path would be security/ir.model.access.csv

Make sure the Model 'payment.acquirer' already exists in models/__init__.py

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 25
2206
1
thg 6 25
2836
2
thg 5 25
2181
1
thg 5 25
1346
1
thg 2 25
38