Python 缺少字段';的必需值时出现问题;对象';(model_id)当我更改权限文件ir.model.access.csv并升级模块时
我已经在odoo 12中创建了自己的模块。我已经更改了权限文件-Python 缺少字段';的必需值时出现问题;对象';(model_id)当我更改权限文件ir.model.access.csv并升级模块时,python,module,permissions,upgrade,odoo-12,Python,Module,Permissions,Upgrade,Odoo 12,我已经在odoo 12中创建了自己的模块。我已经更改了权限文件-ir.model.access.csv。所有代码如下所示 ir.model.access.csv: id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_customer_customer,access.customer.customer,model_customer_customer,base.group_user,1
ir.model.access.csv
。所有代码如下所示
ir.model.access.csv:
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_customer_customer,access.customer.customer,model_customer_customer,base.group_user,1,1,1,0
.型号/型号:
from odoo import models, fields
class CustomerCustomer(models.Model):
_name = 'customer.customer'
name = fields.Char(string= 'Name', required=True)
place = fields.Char(string='Place')
photo = fields.Binary(string='Image')
age = fields.Integer(string='Age')
dob = fields.Date(string='Date of Birth')
当我尝试升级模块并安装从odoo 12创建的模块时,出现错误消息
异常:模块加载自定义客户失败:无法处理文件custom\u customer\security/ir.model.access.csv:
在字段“Object”中未找到外部id“model\u customer\u customer”的匹配记录
缺少字段“对象”(模型id)的必需值
请检查是否已在模型文件夹内的init.py中添加了文件名,还请检查是否已在主init.py文件中添加了模型文件夹。请尝试重新启动服务器,检查init文件是否添加了文件名,从manefest中注释csv文件,然后更新,然后再次取消注释并更新HI,检查您的文件“CustomerCustomer”是否已导入init.py文件是的,您是对的。非常感谢:)