odoo - 无法在odoo 14中创建表
问题描述
我刚刚创建了一个具有以下结构的新模块:
mainfolder
-models
--__init__.py
`from . import student`
--student.py
```
from odoo import api, fields, models
class SchoolStudent(models.Model):
_name = "school.student"
_description = "School Student Patient"
name = fields.Char(string='Name', required=True)
age = fields.Char(string='Age')
gender = fields.Selection([
('male', 'Male'),
('female', 'Female'),
('other', 'Other'),
], required=True, default='male')
note = fields.Text(string='Description')
```
-__init__.py
`from . import models`
-__manifest__.py
问题是,当我安装模块时,我在我的数据库中找不到“学生”表,我多次更新了模块,但都是一样的。
请问如何解决这个问题?
谢谢
解决方案
我通知您,我只是通过为模块创建视图和访问权限来解决问题。
谢谢
推荐阅读
- java - 如何将数组中的字符串更改为整数
- r - 如何在R中从一个具有多个条件的数据帧创建多个数据帧
- javascript - 在 waituntil 方法 webdriver.io 上返回 true 或 false
- webpack - 无法使用电子生成器找到依赖关系(node-pre-gyp)
- python - 关于 Python 中决策树代码中的索引的问题
- unit-testing - SilverStripe Sapphire 对 POST 请求的功能测试始终返回 404 状态
- ios - 我收到错误“线程 1:EXC_BREAKPOINT (code=1, subcode=0x102d3c320)”我该如何解决?
- excel - Excel VBA 宏 - Pt2
- r - 如何提取 Col2 与 R 中的任何 Col1 匹配的每一行
- java - 将 Jackson JsonFormat 模式用于自定义日期字符串