mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
[ADD] 0_openacademy: add new m
This commit is contained in:
parent
ae315ded4d
commit
cb98f817c5
15 changed files with 383 additions and 0 deletions
4
0_openacademy/models/__init__.py
Normal file
4
0_openacademy/models/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import openacademy_course
|
||||
from . import openacademy_class
|
||||
19
0_openacademy/models/openacademy_class.py
Normal file
19
0_openacademy/models/openacademy_class.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from odoo import models, fields
|
||||
|
||||
class OpenacademyClass(models.Model):
|
||||
_name="openacademy.class"
|
||||
_description = "openacademy class"
|
||||
|
||||
name = fields.Char(string="Class Name",required=True)
|
||||
description = fields.Text()
|
||||
course_id = fields.Many2one('openacademy.course',string="course id") #string course id hiển thị trên giao diện
|
||||
|
||||
class class_add(models.Model):
|
||||
_name="openacademy.class"
|
||||
_inherit = "openacademy.class"
|
||||
room = fields.Char(string="phòng học")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
10
0_openacademy/models/openacademy_course.py
Normal file
10
0_openacademy/models/openacademy_course.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from odoo import models, fields
|
||||
|
||||
class Course(models.Model):
|
||||
_name = 'openacademy.course' #tên trên local là openacademy_course
|
||||
_description = "OpenAcademy Courses"
|
||||
|
||||
name = fields.Char(string="Title", required=True)
|
||||
description = fields.Text()
|
||||
class_ids = fields.One2many("openacademy.class","course_id",string="Class")
|
||||
demo = fields.One2many
|
||||
Loading…
Add table
Add a link
Reference in a new issue