在字段 'Model' 中找不到外部 ID 的匹配记录



这是我的错误

Exception: Module loading helpdesk_module failed: file helpdesk_modulesecurity/ir.model.access.csv could not be processed:
No matching record found for external id ' model_helpdesk' in field 'Model'
No matching record found for external id ' model_tickets_tickets' in field 'Model'
Missing required value for the field 'Model' (model_id)
Missing required value for the field 'Model' (model_id)
这是我的ir.model.access.csv:
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_helpdesk, access.helpdesk, model_helpdesk,,1,1,1,1
access_tickets_tickets, access.tickets_tickets, model_tickets_tickets,,1,1,1,1

这是我的模型:helpdesk.py

from odoo import api, fields, models, _
class Helpdesk(models.Model):
_name = "helpdesk"
_description = "Helpdesk"
tickets = fields.Char('My Tickets')
performance = fields.Char('My Performance')

tickets_tickets.py

from odoo import api, fields, models, _
class TicketsTickets(models.Model):
_name = "tickets.tickets"
_description = "Tickets Tickets"
name = fields.Char("Name", required=True)
helpdesk_team = fields.Char("Helpdesk Team", required=True)
assigned_to = fields.Char("Assigned to", required=True)
customer = fields.Char("Customer", required=True)
company = fields.Char("Company", required=True)
next_activity = fields.Date("Next Activity", required=True)
type = fields.Selection([('question', 'Question'),
('issue', 'Issue'),
('bug', 'Bug'),
('documentation', 'Documentation')], default='issue')

我确实遵循了ooo15文档,但仍然出错

我将ir.model.access.csv文件修改为以下内容,它运行正常:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_helpdesk,helpdesk,model_helpdesk,,1,1,1,1
access_tickets_tickets,tickets_tickets,model_tickets_tickets,,1,1,1,1

但是我看到odoo的教程在这里不起作用

相关内容

  • 没有找到相关文章

最新更新