Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG]migrated core module #794

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openeducat_core/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

{
'name': 'OpenEduCat Core',
'version': '17.0.1.0',
'version': '18.0.1.0',
'license': 'LGPL-3',
'category': 'Education',
"sequence": 1,
Expand Down
2 changes: 0 additions & 2 deletions openeducat_core/data/ir_cron_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">weeks</field>
<field name="numbercall">-1</field>
<field name="nextcall" eval="(DateTime.now() + timedelta(days=7)).strftime('%Y-%m-%d %H:%M:%S')"/>
<field eval="False" name="doall"/>
<field name="priority">1000</field>
</record>

Expand Down
7 changes: 3 additions & 4 deletions openeducat_core/models/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ class OpCourse(models.Model):
'unique(code)', 'Code should be unique per course!')]

@api.constrains('parent_id')
def _check_parent_id_recursion(self):
if not self._check_recursion():
raise ValidationError(_('You cannot create recursive Course.'))
return True
def _check_category_recursion(self):
if self._has_cycle():
raise ValidationError(_('You cannot create recursive categories.'))

@api.model
def get_import_templates(self):
Expand Down
6 changes: 2 additions & 4 deletions openeducat_core/views/batch_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
<chatter/>
</form>
</field>
</record>
Expand Down Expand Up @@ -93,6 +90,7 @@
<field name="name">Batches</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.batch</field>
<field name="path">batches</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form,pivot</field>
<field name="search_view_id" ref="view_op_batch_search"/>
Expand Down
1 change: 1 addition & 0 deletions openeducat_core/views/category_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<field name="name">Categories</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.category</field>
<field name="path">categories</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_op_category_search"/>
Expand Down
6 changes: 2 additions & 4 deletions openeducat_core/views/course_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
<chatter/>
</form>
</field>
</record>
Expand Down Expand Up @@ -107,6 +104,7 @@
<field name="name">Courses</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.course</field>
<field name="path">courses</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form,pivot</field>
<field name="search_view_id" ref="view_op_course_search"/>
Expand Down
1 change: 1 addition & 0 deletions openeducat_core/views/department_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<field name="name">Departments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.department</field>
<field name="path">department</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_op_department_search"/>
Expand Down
7 changes: 2 additions & 5 deletions openeducat_core/views/faculty_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
<field name="activity_ids" widget="mail_activity"/>
</div>
<chatter/>
</form>
</field>
</record>
Expand Down Expand Up @@ -205,6 +201,7 @@
<field name="name">Faculties</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.faculty</field>
<field name="path">faculty</field>
<field name="binding_view_types">form</field>
<field name="view_mode">kanban,list,form</field>
<field name="search_view_id" ref="view_op_faculty_search"/>
Expand Down
1 change: 1 addition & 0 deletions openeducat_core/views/op_academic_term_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<field name="name">Academic Term</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.academic.term</field>
<field name="path">academic-term</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_op_academic_term_search"/>
Expand Down
1 change: 1 addition & 0 deletions openeducat_core/views/op_academic_year_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<field name="name">Academic Year</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.academic.year</field>
<field name="path">academic-year</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_op_academic_year_search"/>
Expand Down
6 changes: 2 additions & 4 deletions openeducat_core/views/student_course_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
<chatter/>
</form>
</field>
</record>
Expand Down Expand Up @@ -98,6 +95,7 @@
<field name="name">Student Course Detail</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.student.course</field>
<field name="path">student-course</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form,pivot</field>
<field name="search_view_id" ref="view_op_student_course_search"/>
Expand Down
7 changes: 2 additions & 5 deletions openeducat_core/views/student_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
<field name="activity_ids" widget="mail_activity"/>
</div>
<chatter/>
</form>
</field>
</record>
Expand Down Expand Up @@ -202,6 +198,7 @@
<field name="name">Students</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.student</field>
<field name="path">students</field>
<field name="binding_view_types">form</field>
<field name="view_mode">kanban,list,form</field>
<field name="search_view_id" ref="view_op_student_search"/>
Expand Down
7 changes: 2 additions & 5 deletions openeducat_core/views/subject_registration_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@
readonly = "state != 'draft'"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"
groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
<chatter/>
</form>
</field>
</record>
Expand Down Expand Up @@ -132,6 +128,7 @@
<field name="name">Subject Registration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.subject.registration</field>
<field name="path">subject-registration</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form,graph,pivot</field>
<field name="search_view_id" ref="view_subject_registration_search"/>
Expand Down
6 changes: 2 additions & 4 deletions openeducat_core/views/subject_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
<chatter/>
</form>
</field>
</record>
Expand Down Expand Up @@ -74,6 +71,7 @@
<field name="name">Subjects</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">op.subject</field>
<field name="path">subject</field>
<field name="binding_view_types">form</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_op_subject_search"/>
Expand Down