首页 > 解决方案 > 无法在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

问题是,当我安装模块时,我在我的数据库中找不到“学生”表,我多次更新了模块,但都是一样的。

请问如何解决这个问题?

谢谢

标签: odooodoo-14

解决方案


我通知您,我只是通过为模块创建视图和访问权限来解决问题。

谢谢


推荐阅读