模块迁移
This commit is contained in:
@@ -177,7 +177,7 @@ class SchoolAssignmentSubmission(models.Model):
|
||||
|
||||
def action_open_batch_wizard(self):
|
||||
"""老师批量批改:打开批量打分向导。"""
|
||||
if not self.env.user.has_group('school.group_teacher'):
|
||||
if not self.env.user.has_group('college.group_teacher'):
|
||||
raise UserError(_('只有老师可以进行批量批改。'))
|
||||
return {
|
||||
'name': _('批量批改'),
|
||||
@@ -191,7 +191,7 @@ class SchoolAssignmentSubmission(models.Model):
|
||||
def action_download_attachments(self):
|
||||
"""老师批量下载提交文件:把选中的提交记录的附件打包为 zip,
|
||||
zip 内文件名格式为「学员姓名 + 原文件名」,并触发下载。"""
|
||||
if not self.env.user.has_group('school.group_teacher'):
|
||||
if not self.env.user.has_group('college.group_teacher'):
|
||||
raise UserError(_('只有老师可以批量下载提交文件。'))
|
||||
submissions = self.filtered(lambda s: s.attachment)
|
||||
if not submissions:
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_yuthon_school_course_admin,yuthon.school.course.admin,model_yuthon_school_course,base.group_system,1,1,1,1
|
||||
access_yuthon_school_course_teacher,yuthon.school.course.teacher,model_yuthon_school_course,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_course_student,yuthon.school.course.student,model_yuthon_school_course,school.group_student,1,0,0,0
|
||||
access_yuthon_school_course_teacher,yuthon.school.course.teacher,model_yuthon_school_course,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_course_student,yuthon.school.course.student,model_yuthon_school_course,college.group_student,1,0,0,0
|
||||
access_yuthon_school_student_admin,yuthon.school.student.admin,model_yuthon_school_student,base.group_system,1,1,1,1
|
||||
access_yuthon_school_student_teacher,yuthon.school.student.teacher,model_yuthon_school_student,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_student_student,yuthon.school.student.student,model_yuthon_school_student,school.group_student,1,0,0,0
|
||||
access_yuthon_school_student_teacher,yuthon.school.student.teacher,model_yuthon_school_student,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_student_student,yuthon.school.student.student,model_yuthon_school_student,college.group_student,1,0,0,0
|
||||
access_yuthon_school_teacher_admin,yuthon.school.teacher.admin,model_yuthon_school_teacher,base.group_system,1,1,1,1
|
||||
access_yuthon_school_teacher_teacher,yuthon.school.teacher.teacher,model_yuthon_school_teacher,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_teacher_student,yuthon.school.teacher.student,model_yuthon_school_teacher,school.group_student,1,0,0,0
|
||||
access_yuthon_school_teacher_teacher,yuthon.school.teacher.teacher,model_yuthon_school_teacher,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_teacher_student,yuthon.school.teacher.student,model_yuthon_school_teacher,college.group_student,1,0,0,0
|
||||
access_yuthon_school_class_admin,yuthon.school.class.admin,model_yuthon_school_class,base.group_system,1,1,1,1
|
||||
access_yuthon_school_class_teacher,yuthon.school.class.teacher,model_yuthon_school_class,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_class_student,yuthon.school.class.student,model_yuthon_school_class,school.group_student,1,0,0,0
|
||||
access_yuthon_school_class_teacher,yuthon.school.class.teacher,model_yuthon_school_class,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_class_student,yuthon.school.class.student,model_yuthon_school_class,college.group_student,1,0,0,0
|
||||
access_yuthon_school_progress_admin,yuthon.school.progress.admin,model_yuthon_school_progress,base.group_system,1,1,1,1
|
||||
access_yuthon_school_progress_teacher,yuthon.school.progress.teacher,model_yuthon_school_progress,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_progress_student,yuthon.school.progress.student,model_yuthon_school_progress,school.group_student,1,0,0,0
|
||||
access_yuthon_school_progress_teacher,yuthon.school.progress.teacher,model_yuthon_school_progress,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_progress_student,yuthon.school.progress.student,model_yuthon_school_progress,college.group_student,1,0,0,0
|
||||
access_yuthon_school_assignment_admin,yuthon.school.assignment.admin,model_yuthon_school_assignment,base.group_system,1,1,1,1
|
||||
access_yuthon_school_assignment_teacher,yuthon.school.assignment.teacher,model_yuthon_school_assignment,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_assignment_student,yuthon.school.assignment.student,model_yuthon_school_assignment,school.group_student,1,0,0,0
|
||||
access_yuthon_school_assignment_teacher,yuthon.school.assignment.teacher,model_yuthon_school_assignment,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_assignment_student,yuthon.school.assignment.student,model_yuthon_school_assignment,college.group_student,1,0,0,0
|
||||
access_yuthon_school_assignment_submission_admin,yuthon.school.assignment.submission.admin,model_yuthon_school_assignment_submission,base.group_system,1,1,1,1
|
||||
access_yuthon_school_assignment_submission_teacher,yuthon.school.assignment.submission.teacher,model_yuthon_school_assignment_submission,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_assignment_submission_student,yuthon.school.assignment.submission.student,model_yuthon_school_assignment_submission,school.group_student,1,1,1,0
|
||||
access_yuthon_school_assignment_submission_teacher,yuthon.school.assignment.submission.teacher,model_yuthon_school_assignment_submission,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_assignment_submission_student,yuthon.school.assignment.submission.student,model_yuthon_school_assignment_submission,college.group_student,1,1,1,0
|
||||
access_yuthon_school_assignment_submission_batch_wizard_admin,yuthon.school.assignment.submission.batch.wizard.admin,model_yuthon_school_assignment_submission_batch_wizard,base.group_system,1,1,1,1
|
||||
access_yuthon_school_assignment_submission_batch_wizard_teacher,yuthon.school.assignment.submission.batch.wizard.teacher,model_yuthon_school_assignment_submission_batch_wizard,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_assignment_submission_batch_wizard_teacher,yuthon.school.assignment.submission.batch.wizard.teacher,model_yuthon_school_assignment_submission_batch_wizard,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_course_chapter_admin,yuthon.school.course.chapter.admin,model_yuthon_school_course_chapter,base.group_system,1,1,1,1
|
||||
access_yuthon_school_course_chapter_teacher,yuthon.school.course.chapter.teacher,model_yuthon_school_course_chapter,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_course_chapter_student,yuthon.school.course.chapter.student,model_yuthon_school_course_chapter,school.group_student,1,0,0,0
|
||||
access_yuthon_school_course_chapter_teacher,yuthon.school.course.chapter.teacher,model_yuthon_school_course_chapter,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_course_chapter_student,yuthon.school.course.chapter.student,model_yuthon_school_course_chapter,college.group_student,1,0,0,0
|
||||
access_yuthon_school_course_chapter_attachment_admin,yuthon.school.course.chapter.attachment.admin,model_yuthon_school_course_chapter_attachment,base.group_system,1,1,1,1
|
||||
access_yuthon_school_course_chapter_attachment_teacher,yuthon.school.course.chapter.attachment.teacher,model_yuthon_school_course_chapter_attachment,school.group_teacher,1,1,1,1
|
||||
access_yuthon_school_course_chapter_attachment_student,yuthon.school.course.chapter.attachment.student,model_yuthon_school_course_chapter_attachment,school.group_student,1,0,0,0
|
||||
access_yuthon_school_course_chapter_attachment_teacher,yuthon.school.course.chapter.attachment.teacher,model_yuthon_school_course_chapter_attachment,college.group_teacher,1,1,1,1
|
||||
access_yuthon_school_course_chapter_attachment_student,yuthon.school.course.chapter.attachment.student,model_yuthon_school_course_chapter_attachment,college.group_student,1,0,0,0
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<field name="name">yuthon.school.course.chapter.form.view</field>
|
||||
<field name="model">yuthon.school.course.chapter</field>
|
||||
<field name="priority">30</field>
|
||||
<field name="groups_id" eval="[(4, ref('school.group_teacher')), (4, ref('base.group_system'))]"/>
|
||||
<field name="groups_id" eval="[(4, ref('college.group_teacher')), (4, ref('base.group_system'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group>
|
||||
@@ -35,7 +35,7 @@
|
||||
<field name="name">yuthon.school.course.chapter.study.form</field>
|
||||
<field name="model">yuthon.school.course.chapter</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="groups_id" eval="[(4, ref('school.group_student')), (4, ref('base.group_system'))]"/>
|
||||
<field name="groups_id" eval="[(4, ref('college.group_student')), (4, ref('base.group_system'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
@@ -78,7 +78,7 @@
|
||||
<field name="name">yuthon.school.course.study.form</field>
|
||||
<field name="model">yuthon.school.course</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="groups_id" eval="[(4, ref('school.group_student'))]"/>
|
||||
<field name="groups_id" eval="[(4, ref('college.group_student'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<button name="action_open_edit" type="object"
|
||||
string="编辑章节" icon="fa-pencil"
|
||||
class="btn-link"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
@@ -90,7 +90,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="选课学员" groups="school.group_teacher,base.group_system">
|
||||
<page string="选课学员" groups="college.group_teacher,base.group_system">
|
||||
<field name="student_ids" widget="many2many"
|
||||
context="{'default_name': name}"/>
|
||||
</page>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<list string="作业">
|
||||
<header>
|
||||
<button name="action_publish_batch" type="object" string="批量发布"
|
||||
class="btn-primary" groups="school.group_teacher"/>
|
||||
class="btn-primary" groups="college.group_teacher"/>
|
||||
</header>
|
||||
<field name="name"/>
|
||||
<field name="course_id"/>
|
||||
@@ -124,14 +124,14 @@
|
||||
<button name="action_open_batch_wizard"
|
||||
type="object" string="批量批改"
|
||||
class="btn-primary"
|
||||
groups="school.group_teacher"/>
|
||||
groups="college.group_teacher"/>
|
||||
<button name="action_download_attachments"
|
||||
type="object" string="批量下载附件"
|
||||
class="btn-secondary"
|
||||
groups="school.group_teacher"/>
|
||||
groups="college.group_teacher"/>
|
||||
</header>
|
||||
<field name="assignment_id"/>
|
||||
<field name="student_id" string="姓名" groups="school.group_teacher"/>
|
||||
<field name="student_id" string="姓名" groups="college.group_teacher"/>
|
||||
<field name="score"/>
|
||||
<field name="state"/>
|
||||
<field name="submit_time"/>
|
||||
@@ -165,7 +165,7 @@
|
||||
<div class="small mb-1">
|
||||
作业名:<field name="assignment_id"/>
|
||||
</div>
|
||||
<div class="small mb-1" groups="school.group_teacher">
|
||||
<div class="small mb-1" groups="college.group_teacher">
|
||||
学员:<field name="student_id"/>
|
||||
</div>
|
||||
<div class="small mb-1">
|
||||
@@ -213,7 +213,7 @@
|
||||
<field name="due_date" readonly="1"/>
|
||||
<field name="submit_time" readonly="1"/>
|
||||
</group>
|
||||
<group groups="school.group_teacher">
|
||||
<group groups="college.group_teacher">
|
||||
<field name="score"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -223,7 +223,7 @@
|
||||
<field name="attachment" filename="attachment_filename" readonly="state in ('submitted', 'graded')"/>
|
||||
<field name="attachment_filename" invisible="1"/>
|
||||
</group>
|
||||
<group groups="school.group_teacher">
|
||||
<group groups="college.group_teacher">
|
||||
<field name="feedback"/>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
+12
-12
@@ -16,7 +16,7 @@
|
||||
parent="menu_yuthon_course_root"
|
||||
action="action_yuthon_school_course_my"
|
||||
sequence="10"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
|
||||
<!-- 全部课程:仅老师(课程由老师创建;学生通过「课程学习」入口按选课过滤) -->
|
||||
<menuitem id="menu_yuthon_course_all"
|
||||
@@ -24,7 +24,7 @@
|
||||
parent="menu_yuthon_course_root"
|
||||
action="action_yuthon_school_course_all"
|
||||
sequence="20"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
|
||||
<!-- 课程学习:学生端专用入口(左侧章节目录 + 右侧视频/资料) -->
|
||||
<menuitem id="menu_yuthon_course_study"
|
||||
@@ -32,31 +32,31 @@
|
||||
parent="menu_yuthon_education_root"
|
||||
action="action_yuthon_school_course_study"
|
||||
sequence="11"
|
||||
groups="school.group_student,base.group_system"/>
|
||||
groups="college.group_student,base.group_system"/>
|
||||
|
||||
<!-- ===================== 组织架构(顶级菜单,与「教育」平级,仅老师/管理员) ===================== -->
|
||||
<menuitem id="menu_yuthon_org_root"
|
||||
name="组织架构"
|
||||
sequence="20"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
<menuitem id="menu_yuthon_class"
|
||||
name="班级"
|
||||
parent="menu_yuthon_org_root"
|
||||
action="action_yuthon_school_class"
|
||||
sequence="10"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
<menuitem id="menu_yuthon_teacher"
|
||||
name="老师"
|
||||
parent="menu_yuthon_org_root"
|
||||
action="action_yuthon_school_teacher"
|
||||
sequence="20"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
<menuitem id="menu_yuthon_student"
|
||||
name="学生"
|
||||
parent="menu_yuthon_org_root"
|
||||
action="action_yuthon_school_student"
|
||||
sequence="30"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
|
||||
<!-- ===================== 学习进展(老师/学生各自独立入口,action domain 过滤) ===================== -->
|
||||
<menuitem id="menu_yuthon_progress_teacher"
|
||||
@@ -64,13 +64,13 @@
|
||||
parent="menu_yuthon_education_root"
|
||||
action="action_yuthon_school_progress"
|
||||
sequence="20"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
<menuitem id="menu_yuthon_progress_student"
|
||||
name="学习进展"
|
||||
parent="menu_yuthon_education_root"
|
||||
action="action_yuthon_school_progress_student"
|
||||
sequence="21"
|
||||
groups="school.group_student,base.group_system"/>
|
||||
groups="college.group_student,base.group_system"/>
|
||||
|
||||
<!-- ===================== 作业习题 ===================== -->
|
||||
<menuitem id="menu_yuthon_homework"
|
||||
@@ -83,19 +83,19 @@
|
||||
parent="menu_yuthon_homework"
|
||||
action="action_yuthon_school_assignment"
|
||||
sequence="10"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
<!-- 作业提交:仅学生 -->
|
||||
<menuitem id="menu_yuthon_homework_submit"
|
||||
name="作业提交"
|
||||
parent="menu_yuthon_homework"
|
||||
action="action_yuthon_school_my_submission"
|
||||
sequence="20"
|
||||
groups="school.group_student,base.group_system"/>
|
||||
groups="college.group_student,base.group_system"/>
|
||||
<!-- 作业批改:仅老师(无提交入口) -->
|
||||
<menuitem id="menu_yuthon_homework_grade"
|
||||
name="作业批改"
|
||||
parent="menu_yuthon_homework"
|
||||
action="action_yuthon_school_assignment_submission"
|
||||
sequence="30"
|
||||
groups="school.group_teacher,base.group_system"/>
|
||||
groups="college.group_teacher,base.group_system"/>
|
||||
</odoo>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<list string="学习进展">
|
||||
<field name="course_id"/>
|
||||
<field name="student_id" groups="school.group_teacher"/>
|
||||
<field name="student_id" groups="college.group_teacher"/>
|
||||
<field name="teacher_id"/>
|
||||
<field name="chapter_done"/>
|
||||
<field name="chapter_total"/>
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong><field name="course_id"/></strong>
|
||||
</div>
|
||||
<div class="text-muted small mb-1" groups="school.group_teacher">
|
||||
<div class="text-muted small mb-1" groups="college.group_teacher">
|
||||
学员:<field name="student_id"/>
|
||||
</div>
|
||||
<div class="small mb-1">
|
||||
|
||||
Reference in New Issue
Block a user