跳至内容
菜单
此问题已终结
2 回复
1220 查看

 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,

}



形象
丢弃
编写者 最佳答案

Here my init code in models


from . import payment_acquirer

from . import payment_api





形象
丢弃
最佳答案

'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

形象
丢弃
相关帖文 回复 查看 活动
3
7月 25
2207
1
6月 25
2840
2
5月 25
2181
1
5月 25
1346
1
2月 25
38