Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4451 Zobrazení

Im not sure what is wrong but I cannot install this module

# -*- coding: utf-8 -*-{ 'name': "New Model",
'summary': """ """,
'description': """ """, 'author': "", 'website': "", 'maintainer': '',
'category': 'Uncategorized', 'version': '0.1',
'depends': ['stock'],
'data': [ 'security/ir.model.access.csv', ],}

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

access_new_model,NewModel,model_new_model,,1,1,1,0

# -*- coding: utf-8 -*-
from odoo import models, fields, api, _
class NewModel(models.Model): 
 _name = "new.model" 
 _description = "New Model"

name = fields.Char() 
quantity = fields.Float() 
stock_move_line_id = fields.Many2one('stock.move.line')


Traceback (most recent call last): File "/home/tony/Documents/odoo15/odoo/http.py", line 654, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/tony/Documents/odoo15/odoo/http.py", line 301, in _handle_exception raise exception.with_traceback(None) from new_cause Exception: Module loading new_model failed: file new_model/security/ir.model.access.csv could not be processed: No matching record found for external id 'model_new_model' in field 'Model' Missing required value for the field 'Model' (model_id)
Avatar
Zrušit
Nejlepší odpověď

Hi,

This error usually occurs when we try to add security to a model that doesn't exist. Please ensure that the model is loaded. You can check in technical-> models and see if your model is present there before adding the security. 


Check the init files and see if the files are properly added.


Hope it helps

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 24
1582
2
bře 23
2404
3
čvn 20
10231
2
bře 20
8595
4
dub 18
3611