Commit 42bb1a75 by aagusti

tambah examp

1 parent 5d3d8145
Showing 99 changed files with 0 additions and 6762 deletions
=======
School
=======
This module was written to extend the functionality of school to support school management and allow you to get a functionality of school management.
Installation
============
To install this module, you need to:
install 'hr', 'crm', 'account', module
Configuration
=============
To configure this module, you need to:
have a school management functionality.
Usage
=====
To use this module, you need to:
go to apps, then install module to apply this functionality.
Try me on Runbot
Known issues / Roadmap
Bug Tracker
===========
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
=======
Credits
=======
Contributors
============
Serpent Consulting Services PVT. LTD. <http://serpentcs.com>
Maintainer
===========
Serpent Consulting Services PVT. LTD.
This module is maintained by the SerpentCS.
To contribute to this module, please visit http://serpentcs.com.
# See LICENSE file for full copyright and licensing details.
# ----------------------------------------------------------
# A Module for School Management System
# ----------------------------------------------------------
from . import models
from . import wizard
# See LICENSE file for full copyright and licensing details.
{
'name': 'School',
'version': '14.0.1.0.0',
'author': 'Serpent Consulting Services Pvt. Ltd.',
'website': 'http://www.serpentcs.com',
'category': 'School Management',
'license': "AGPL-3",
'complexity': 'easy',
'Summary': 'A Module For School Management',
'images': ['static/description/EMS.jpg'],
'depends': ['hr', 'crm', 'account'],
'data': ['security/school_security.xml',
'security/ir.model.access.csv',
'data/student_sequence.xml',
'wizard/terminate_reason_view.xml',
'wizard/wiz_send_email_view.xml',
'views/student_view.xml',
'views/school_view.xml',
'views/teacher_view.xml',
'views/parent_view.xml',
'wizard/assign_roll_no_wizard.xml',
'wizard/move_standards_view.xml',
'report/report_view.xml',
'report/identity_card.xml',
'views/template_view.xml'],
'demo': ['demo/school_demo.xml'],
'installable': True,
'application': True
}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Sequences For student.code (Student Code) -->
<record id="seq_student_code" model="ir.sequence">
<field name="name">Student code</field>
<field name="code">student.code</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
<!-- Sequences For student.registration (Registration Code) -->
<record id="seq_student_reg" model="ir.sequence">
<field name="name">Student registration code</field>
<field name="code">student.registration</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
<!-- Sequences For student.student (Personal Identification Number) -->
<record id="seq_student_student" model="ir.sequence">
<field name="name">Student</field>
<field name="code">student.student</field>
<field name="prefix">%(year)s/%(month)s/</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
<!-- Sequences For student.document (Student Documents) -->
<record id="seq_student_document" model="ir.sequence">
<field name="name">Document</field>
<field name="code">student.document</field>
<field name="prefix">F</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
<!-- Sequences For document.type (Document Type) -->
<record id="seq_student_sequence" model="ir.sequence">
<field name="name">sequence</field>
<field name="code">document.type</field>
<field name="padding">1</field>
<field name="company_id" eval="False"/>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- School Information -->
<record id="demo_school_1" model="school.school">
<field name="name">West High School</field>
<field name="code">0672</field>
<field name="city">MELBOURNE</field>
<field name="state_id" ref="base.state_au_7"/>
</record>
<record id="demo_school_2" model="school.school">
<field name="name">East High School</field>
<field name="code">0786</field>
<field name="city">ONTARIO</field>
</record>
<record id="demo_school_3" model="school.school">
<field name="name">EverWood High School</field>
<field name="code">0895</field>
<field name="city">LONDON</field>
</record>
<!-- Student Grade Master -->
<record id="demo_student_grade_1" model="grade.master">
<field name="name">Grade System for Finals</field>
</record>
<record id="demo_student_grade_line_1" model="grade.line">
<field name="sequence">1</field>
<field name="grade">A+</field>
<field name="from_mark">90</field>
<field name="to_mark">100</field>
<field name="grade_id" ref="demo_student_grade_1"/>
</record>
<record id="demo_student_grade_line_2" model="grade.line">
<field name="sequence">2</field>
<field name="grade">A</field>
<field name="from_mark">80</field>
<field name="to_mark">89</field>
<field name="grade_id" ref="demo_student_grade_1"/>
</record>
<record id="demo_student_grade_line_3" model="grade.line">
<field name="sequence">3</field>
<field name="grade">A-</field>
<field name="from_mark">70</field>
<field name="to_mark">79</field>
<field name="grade_id" ref="demo_student_grade_1"/>
</record>
<record id="demo_student_grade_line_4" model="grade.line">
<field name="sequence">4</field>
<field name="grade">B+</field>
<field name="from_mark">60</field>
<field name="to_mark">69</field>
<field name="grade_id" ref="demo_student_grade_1"/>
</record>
<record id="demo_student_grade_line_5" model="grade.line">
<field name="sequence">5</field>
<field name="grade">B</field>
<field name="from_mark">50</field>
<field name="to_mark">59</field>
<field name="grade_id" ref="demo_student_grade_1"/>
</record>
<record id="demo_student_grade_line_6" model="grade.line">
<field name="sequence">6</field>
<field name="grade">B-</field>
<field name="from_mark">35</field>
<field name="to_mark">49</field>
<field name="grade_id" ref="demo_student_grade_1"/>
</record>
<record id="demo_student_grade_line_7" model="grade.line">
<field name="sequence">7</field>
<field name="grade">F</field>
<field name="from_mark">00</field>
<field name="to_mark">34</field>
<field name="fail" eval="True"/>
<field name="grade_id" ref="demo_student_grade_1"/>
</record>
<!-- Demo data of room -->
<record id="class_room1" model="class.room">
<field name="name">Room 1</field>
<field name="number">1</field>
</record>
<record id="class_room2" model="class.room">
<field name="name">Room 2</field>
<field name="number">2</field>
</record>
<record id="class_room3" model="class.room">
<field name="name">Room 3</field>
<field name="number">3</field>
</record>
<record id="class_room4" model="class.room">
<field name="name">Room 4</field>
<field name="number">4</field>
</record>
<record id="class_room5" model="class.room">
<field name="name">Room 5</field>
<field name="number">5</field>
</record>
<record id="class_room6" model="class.room">
<field name="name">Room 6</field>
<field name="number">6</field>
</record>
<record id="class_room7" model="class.room">
<field name="name">Room 7</field>
<field name="number">7</field>
</record>
<record id="class_room8" model="class.room">
<field name="name">Room 8</field>
<field name="number">8</field>
</record>
<record id="class_room9" model="class.room">
<field name="name">Room 9</field>
<field name="number">9</field>
</record>
<record id="class_room10" model="class.room">
<field name="name">Room 10</field>
<field name="number">10</field>
</record>
<record id="class_room11" model="class.room">
<field name="name">Room 11</field>
<field name="number">11</field>
</record>
<record id="class_room12" model="class.room">
<field name="name">Room 12</field>
<field name="number">12</field>
</record>
<record id="class_room13" model="class.room">
<field name="name">Room 13</field>
<field name="number">13</field>
</record>
<record id="class_room14" model="class.room">
<field name="name">Room 14</field>
<field name="number">14</field>
</record>
<record id="class_room15" model="class.room">
<field name="name">Room 15</field>
<field name="number">15</field>
</record>
<!--Academic Year Information-->
<record id="demo_academic_year_1" model="academic.year">
<field eval="'Academic Year ' + str((DateTime.today() - relativedelta(years=1)).strftime('%Y'))" name="name"/>
<field eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y')" name="code"/>
<field name="sequence">1</field>
<field name="grade_id" ref="demo_student_grade_1"/>
<field eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-01-01 %H:%M')" name="date_start"/>
<field eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-12-31 %H:%M')" name="date_stop"/>
</record>
<record id="demo_academic_year_2" model="academic.year">
<field eval="'Academic Year ' + str((DateTime.today()).strftime('%Y'))" name="name"/>
<field eval="(DateTime.today()).strftime('%Y')" name="code"/>
<field name="sequence">2</field>
<field name="current" eval="True" />
<field name="grade_id" ref="demo_student_grade_1"/>
<field eval="(DateTime.today()).strftime('%Y-01-01 %H:%M')" name="date_start"/>
<field eval="(DateTime.today()).strftime('%Y-12-31 %H:%M')" name="date_stop"/>
</record>
<record id="demo_academic_year_3" model="academic.year">
<field eval="'Academic Year ' + str((DateTime.today() + relativedelta(years=1)).strftime('%Y'))" name="name"/>
<field eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y')" name="code"/>
<field name="sequence">3</field>
<field name="grade_id" ref="demo_student_grade_1"/>
<field eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-01-01 %H:%M')" name="date_start"/>
<field eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-12-31 %H:%M')" name="date_stop"/>
</record>
<!-- Academic Month -->
<record id="demo_academic_month_previous_1" model="academic.month">
<field name="name">January</field>
<field name="code">JAN</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-01-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-01-31 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_2" model="academic.month">
<field name="name">February</field>
<field name="code">FEB</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-02-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-02-28 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_3" model="academic.month">
<field name="name">March</field>
<field name="code">MAR</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-03-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-03-31 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_4" model="academic.month">
<field name="name">April</field>
<field name="code">APR</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-04-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-04-30 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_5" model="academic.month">
<field name="name">May</field>
<field name="code">MAY</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-05-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-05-31 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_6" model="academic.month">
<field name="name">June</field>
<field name="code">JUN</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-06-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-06-30 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_7" model="academic.month">
<field name="name">July</field>
<field name="code">JUL</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-07-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-07-31 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_8" model="academic.month">
<field name="name">August</field>
<field name="code">AUG</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-08-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-08-31 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_9" model="academic.month">
<field name="name">September</field>
<field name="code">SEP</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-09-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-09-30 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_10" model="academic.month">
<field name="name">October</field>
<field name="code">OCT</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-10-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-10-31 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_11" model="academic.month">
<field name="name">November</field>
<field name="code">NOV</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-11-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-11-30 %H:%M')"/>
</record>
<record id="demo_academic_month_previous_12" model="academic.month">
<field name="name">December</field>
<field name="code">DEC</field>
<field name="year_id" ref="school.demo_academic_year_1"/>
<field name="date_start" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-12-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-12-31 %H:%M')"/>
</record>
<record id="demo_academic_month_current_1" model="academic.month">
<field name="name">January</field>
<field name="code">JAN</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-01-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-01-31 %H:%M')"/>
</record>
<record id="demo_academic_month_current_2" model="academic.month">
<field name="name">February</field>
<field name="code">FEB</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-02-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-02-28 %H:%M')"/>
</record>
<record id="demo_academic_month_current_3" model="academic.month">
<field name="name">March</field>
<field name="code">MAR</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-03-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-03-31 %H:%M')"/>
</record>
<record id="demo_academic_month_current_4" model="academic.month">
<field name="name">April</field>
<field name="code">APR</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-04-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-04-30 %H:%M')"/>
</record>
<record id="demo_academic_month_current_5" model="academic.month">
<field name="name">May</field>
<field name="code">MAY</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-05-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-05-31 %H:%M')"/>
</record>
<record id="demo_academic_month_current_6" model="academic.month">
<field name="name">June</field>
<field name="code">JUN</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-06-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-06-30 %H:%M')"/>
</record>
<record id="demo_academic_month_current_7" model="academic.month">
<field name="name">July</field>
<field name="code">JUL</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-07-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-07-31 %H:%M')"/>
</record>
<record id="demo_academic_month_cur_8" model="academic.month">
<field name="name">August</field>
<field name="code">AUG</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-08-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-08-31 %H:%M')"/>
</record>
<record id="demo_academic_month_current_9" model="academic.month">
<field name="name">September</field>
<field name="code">SEP</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-09-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-09-30 %H:%M')"/>
</record>
<record id="demo_academic_month_current_10" model="academic.month">
<field name="name">October</field>
<field name="code">OCT</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-10-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-10-31 %H:%M')"/>
</record>
<record id="demo_academic_month_current_11" model="academic.month">
<field name="name">November</field>
<field name="code">NOV</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-11-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-11-30 %H:%M')"/>
</record>
<record id="demo_academic_month_current_12" model="academic.month">
<field name="name">December</field>
<field name="code">DEC</field>
<field name="year_id" ref="school.demo_academic_year_2"/>
<field name="date_start" eval="(DateTime.today()).strftime('%Y-12-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today()).strftime('%Y-12-31 %H:%M')"/>
</record>
<record id="demo_academic_month_next_1" model="academic.month">
<field name="name">January</field>
<field name="code">JAN</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-01-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-01-31 %H:%M')"/>
</record>
<record id="demo_academic_month_next_2" model="academic.month">
<field name="name">February</field>
<field name="code">FEB</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-02-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-02-28 %H:%M')"/>
</record>
<record id="demo_academic_month_next_3" model="academic.month">
<field name="name">March</field>
<field name="code">MAR</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-03-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-03-31 %H:%M')"/>
</record>
<record id="demo_academic_month_next_4" model="academic.month">
<field name="name">April</field>
<field name="code">APR</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-04-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-04-30 %H:%M')"/>
</record>
<record id="demo_academic_month_next_5" model="academic.month">
<field name="name">May</field>
<field name="code">MAY</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-05-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-05-31 %H:%M')"/>
</record>
<record id="demo_academic_month_next_6" model="academic.month">
<field name="name">June</field>
<field name="code">JUN</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-06-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-06-30 %H:%M')"/>
</record>
<record id="demo_academic_month_next_7" model="academic.month">
<field name="name">July</field>
<field name="code">JUL</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-07-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-07-31 %H:%M')"/>
</record>
<record id="demo_academic_month_next_8" model="academic.month">
<field name="name">August</field>
<field name="code">AUG</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-08-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-08-31 %H:%M')"/>
</record>
<record id="demo_academic_month_next_9" model="academic.month">
<field name="name">September</field>
<field name="code">SEP</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-09-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-09-30 %H:%M')"/>
</record>
<record id="demo_academic_month_next_10" model="academic.month">
<field name="name">October</field>
<field name="code">OCT</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-10-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-10-31 %H:%M')"/>
</record>
<record id="demo_academic_month_next_11" model="academic.month">
<field name="name">November</field>
<field name="code">NOV</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-11-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-11-30 %H:%M')"/>
</record>
<record id="demo_academic_month_next_12" model="academic.month">
<field name="name">December</field>
<field name="code">DEC</field>
<field name="year_id" ref="school.demo_academic_year_3"/>
<field name="date_start" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-12-01 %H:%M')"/>
<field name="date_stop" eval="(DateTime.today() + relativedelta(years=1)).strftime('%Y-12-31 %H:%M')"/>
</record>
<!--Standard Information-->
<record id="demo_standard_standard_1" model="standard.standard">
<field name="name">10th</field>
<field name="code">FRT</field>
<field name="sequence">1</field>
</record>
<record id="demo_standard_standard_2" model="standard.standard">
<field name="name">11th</field>
<field name="code">SCN</field>
<field name="sequence">2</field>
</record>
<record id="demo_standard_standard_3" model="standard.standard">
<field name="name">12th</field>
<field name="code">THR</field>
<field name="sequence">3</field>
</record>
<!--Standard Medium Information-->
<record id="demo_standard_medium_1" model="standard.medium">
<field name="name">English</field>
<field name="code">ENG</field>
<field name="sequence">1</field>
</record>
<record id="demo_standard_medium_2" model="standard.medium">
<field name="name">French</field>
<field name="code">FRENCH</field>
<field name="sequence">2</field>
</record>
<record id="demo_standard_medium_3" model="standard.medium">
<field name="name">Urdu</field>
<field name="code">URDU</field>
<field name="sequence">3</field>
</record>
<!--Standard Division Information-->
<record id="demo_standard_division_1" model="standard.division">
<field name="name">A</field>
<field name="code">A</field>
<field name="sequence">1</field>
</record>
<record id="demo_standard_division_2" model="standard.division">
<field name="name">B</field>
<field name="code">B</field>
<field name="sequence">2</field>
</record>
<!-- Subject Information -->
<record id="demo_subject_subject_1" model="subject.subject">
<field name="name">Mathematics</field>
<field name="code">MAT</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6,0,[ref('demo_school_teacher_1'),ref('demo_school_teacher_3')])]"/> -->
</record>
<record id="demo_subject_subject_2" model="subject.subject">
<field name="name">Science</field>
<field name="code">SCN</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6, 0, [ref('demo_school_teacher_1'),ref('demo_school_teacher_3')])]"/> -->
</record>
<record id="demo_subject_subject_3" model="subject.subject">
<field name="name">English</field>
<field name="code">ENG</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6, 0, [ref('demo_school_teacher_1'),ref('demo_school_teacher_2')])]"/> -->
</record>
<record id="demo_subject_subject_4" model="subject.subject">
<field name="name">Social Science</field>
<field name="code">SOS</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6, 0, [ref('demo_school_teacher_1'),ref('demo_school_teacher_2')])]"/> -->
</record>
<record id="demo_subject_subject_5" model="subject.subject">
<field name="name">Computer</field>
<field name="code">CMP</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6, 0, [ref('demo_school_teacher_1'),ref('demo_school_teacher_2')])]"/> -->
</record>
<record id="demo_subject_subject_6" model="subject.subject">
<field name="name">Sport</field>
<field name="code">PET</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6, 0, [ref('demo_school_teacher_2'),ref('demo_school_teacher_3')])]"/> -->
</record>
<record id="demo_subject_subject_7" model="subject.subject">
<field name="name">Music</field>
<field name="code">MS</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6, 0, [])]"/> -->
</record>
<record id="demo_subject_subject_8" model="subject.subject">
<field name="name">Philosophy</field>
<field name="code">PH</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="standard_ids" eval="[(6,0,[ref('demo_standard_standard_1'),ref('demo_standard_standard_2'),ref('demo_standard_standard_3')])]"/>
<!-- <field name="teacher_ids" eval="[(6, 0, [])]"/> -->
</record>
<!-- School Standard -->
<record id="demo_school_standard_1" model="school.standard">
<field name="standard_id" ref="demo_standard_standard_1"/>
<field name="division_id" ref="demo_standard_division_1"/>
<field name="medium_id" ref="demo_standard_medium_1"/>
<field name="school_id" ref="demo_school_1"/>
<!-- <field name="user_id" ref="demo_school_teacher_1"/> -->
<field name="name">10th-A</field>
<field name="class_room_id" ref="class_room1"/>
<field name="capacity">30</field>
<field name="subject_ids" eval="[(6,0,[ref('demo_subject_subject_1'),ref('demo_subject_subject_2'),ref('demo_subject_subject_3'),ref('demo_subject_subject_4'),ref('demo_subject_subject_5'),ref('demo_subject_subject_6')])]"/>
</record>
<record id="demo_school_standard_2" model="school.standard">
<field name="standard_id" ref="demo_standard_standard_2"/>
<field name="division_id" ref="demo_standard_division_2"/>
<field name="medium_id" ref="demo_standard_medium_2"/>
<field name="school_id" ref="demo_school_1"/>
<!-- <field name="user_id" ref="demo_school_teacher_2"/> -->
<field name="class_room_id" ref="class_room2"/>
<field name="name">11th-B</field>
<field name="capacity">30</field>
<field name="subject_ids" eval="[(6,0,[ref('demo_subject_subject_1'),ref('demo_subject_subject_2'),ref('demo_subject_subject_3'),ref('demo_subject_subject_4'),ref('demo_subject_subject_6'),ref('demo_subject_subject_7')])]"/>
</record>
<record id="demo_school_standard_3" model="school.standard">
<field name="standard_id" ref="demo_standard_standard_3"/>
<field name="division_id" ref="demo_standard_division_1"/>
<field name="medium_id" ref="demo_standard_medium_3"/>
<field name="school_id" ref="demo_school_1"/>
<!-- <field name="user_id" ref="demo_school_teacher_3"/> -->
<field name="class_room_id" ref="class_room3"/>
<field name="name">12th-A</field>
<field name="capacity">30</field>
<field name="subject_ids" eval="[(6,0,[ref('demo_subject_subject_1'),ref('demo_subject_subject_2'),ref('demo_subject_subject_3'),ref('demo_subject_subject_4'),ref('demo_subject_subject_7'),ref('demo_subject_subject_8')])]"/>
</record>
<!-- School Teacher Information-->
<record id="demo_school_teacher_1" model="school.teacher">
<field name="name">Winely</field>
<field name="work_email">winely@demo.com</field>
<field name="school_id" ref="demo_school_1"/>
<field name="standard_id" ref="demo_school_standard_1"/>
<field eval="[(6,0,[ref('demo_subject_subject_1'),ref('demo_subject_subject_2'),ref('demo_subject_subject_3'),ref('demo_subject_subject_4'),ref('demo_subject_subject_5')])]" name="subject_id"/>
</record>
<record id="demo_school_teacher_2" model="school.teacher">
<field name="name">Peter White</field>
<field name="work_email">peter@demo.com</field>
<field name="school_id" ref="demo_school_1"/>
<field name="standard_id" ref="demo_school_standard_2"/>
<field eval="[(6,0,[ref('demo_subject_subject_5'),ref('demo_subject_subject_3'),ref('demo_subject_subject_4'),ref('demo_subject_subject_6')])]" name="subject_id"/>
</record>
<record id="demo_school_teacher_3" model="school.teacher">
<field name="name">Winparker Gabriel</field>
<field name="work_email">winparker@demo.com</field>
<field name="school_id" ref="demo_school_1"/>
<field name="standard_id" ref="demo_school_standard_1"/>
<field eval="[(6,0,[ref('demo_subject_subject_1'),ref('demo_subject_subject_2'),ref('demo_subject_subject_6')])]" name="subject_id"/>
</record>
<!-- Subject elective -->
<record id="demo_elective_subject_1" model="subject.elective">
<field name="name">Elective Group 1</field>
<field name="subject_ids" eval="[(6, 0, [ref('school.demo_subject_subject_8')])]"/>
</record>
<record id="demo_elective_subject_2" model="subject.elective">
<field name="name">Elective Group 2</field>
<field name="subject_ids" eval="[(6, 0, [ref('school.demo_subject_subject_5')])]"/>
</record>
<record id="demo_elective_subject_3" model="subject.elective">
<field name="name">Elective Group 3</field>
<field name="subject_ids" eval="[(6, 0, [ref('school.demo_subject_subject_6')])]"/>
</record>
<record id="demo_elective_subject_4" model="subject.elective">
<field name="name">Elective Group 4</field>
<field name="subject_ids" eval="[(6, 0, [ref('school.demo_subject_subject_7')])]"/>
</record>
<!-- Student Informations -->
<record id="demo_student_student_4" model="student.student">
<field name="name">Maria</field>
<field name="middle">Samuel</field>
<field name="last">Snell</field>
<field name="student_code">0672/2018/001</field>
<field name="year" ref="demo_academic_year_3"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=13)).strftime('%Y-11-02 %H:%M')"/>
<field name="gender">female</field>
<field name="roll_no">12</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.uk"/>
<field name="city">London</field>
<field name="standard_id" ref="demo_school_standard_1"/>
<field name="division_id" ref="demo_standard_division_1"/>
<field name="medium_id" ref="demo_standard_medium_1"/>
</record>
<function model="student.student" name="admission_done" eval="[[ref('demo_student_student_4')]]"/>
<record id="demo_student_student_5" model="student.student">
<field name="name">John</field>
<field name="middle">William</field>
<field name="last">Smith</field>
<field name="student_code">0671/2016/002</field>
<field name="year" ref="demo_academic_year_1"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=15)).strftime('%Y-03-24 %H:%M')"/>
<field name="gender">male</field>
<field name="roll_no">2</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.uk"/>
<field name="city">Manchester</field>
<field name="standard_id" ref="demo_school_standard_2"/>
<field name="division_id" ref="demo_standard_division_2"/>
<field name="medium_id" ref="demo_standard_medium_2"/>
</record>
<function model="student.student" name="admission_done" eval="[[ref('demo_student_student_5')]]"/>
<record id="demo_student_student_6" model="student.student">
<field name="name">Alexander</field>
<field name="middle">Robert</field>
<field name="last">Martin</field>
<field name="student_code">0671/2017/003</field>
<field name="year" ref="demo_academic_year_2"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=14)).strftime('%Y-05-12 %H:%M')"/>
<field name="gender">male</field>
<field name="roll_no">2</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.uk"/>
<field name="city">Headingly</field>
<field name="standard_id" ref="demo_school_standard_3"/>
<field name="division_id" ref="demo_standard_division_1"/>
<field name="medium_id" ref="demo_standard_medium_3"/>
</record>
<function model="student.student" name="admission_done" eval="[[ref('demo_student_student_6')]]"/>
<record id="demo_student_student_7" model="student.student">
<field name="name">Sarah</field>
<field name="middle">Isaac</field>
<field name="last">Elmer</field>
<field name="student_code">0673/2017/004</field>
<field name="year" ref="demo_academic_year_2"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=13)).strftime('%Y-06-02 %H:%M')"/>
<field name="gender">female</field>
<field name="roll_no">3</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.za"/>
<field name="city">Johesburg</field>
<field name="standard_id" ref="demo_school_standard_1"/>
<field name="division_id" ref="demo_standard_division_1"/>
<field name="medium_id" ref="demo_standard_medium_1"/>
</record>
<function model="student.student" name="admission_done" eval="[[ref('demo_student_student_7')]]"/>
<record id="demo_student_student_8" model="student.student">
<field name="name">Lucy</field>
<field name="middle">William</field>
<field name="last">Brown</field>
<field name="student_code">0674/2017/005</field>
<field name="year" ref="demo_academic_year_3"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=15)).strftime('%Y-06-06 %H:%M')"/>
<field name="gender">female</field>
<field name="roll_no">3</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.za"/>
<field name="city">CapeTown</field>
<field name="standard_id" ref="demo_school_standard_2"/>
<field name="division_id" ref="demo_standard_division_2"/>
<field name="medium_id" ref="demo_standard_medium_2"/>
</record>
<function model="student.student" name="admission_done" eval="[[ref('demo_student_student_8')]]"/>
<record id="demo_student_student_1" model="student.student">
<field name="name">Mary</field>
<field name="middle">Daniel</field>
<field name="last">Richardson</field>
<field name="state">draft</field>
<field name="year" ref="demo_academic_year_1"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=11)).strftime('%Y-04-03 %H:%M')"/>
<field name="gender">female</field>
<field name="roll_no">1</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.au"/>
<field name="city">Melbourne</field>
<field name="standard_id" ref="demo_school_standard_1"/>
<field name="division_id" ref="demo_standard_division_1"/>
<field name="medium_id" ref="demo_standard_medium_1"/>
</record>
<record id="demo_student_student_2" model="student.student">
<field name="name">William</field>
<field name="middle">Joseph</field>
<field name="last">Lee</field>
<field name="state">draft</field>
<field name="year" ref="demo_academic_year_2"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=12)).strftime('%Y-02-14 %H:%M')"/>
<field name="gender">male</field>
<field name="roll_no">1</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.au"/>
<field name="city">Sydney</field>
<field name="standard_id" ref="demo_school_standard_2"/>
<field name="division_id" ref="demo_standard_division_2"/>
<field name="medium_id" ref="demo_standard_medium_2"/>
</record>
<record id="demo_student_student_3" model="student.student">
<field name="name">Jacob</field>
<field name="middle">Caleb</field>
<field name="last">Clark</field>
<field name="state">draft</field>
<field name="year" ref="demo_academic_year_1"/>
<field name="pid">New</field>
<field name="date_of_birth" eval="(DateTime.today() - relativedelta(years=11)).strftime('%Y-09-24 %H:%M')"/>
<field name="gender">male</field>
<field name="roll_no">1</field>
<field name="school_id" ref="demo_school_1"/>
<field name="country_id" ref="base.au"/>
<field name="city">Adelaide</field>
<field name="standard_id" ref="demo_school_standard_3"/>
<field name="division_id" ref="demo_standard_division_2"/>
<field name="medium_id" ref="demo_standard_medium_3"/>
</record>
<!-- Student Parent Information -->
<record id="demo_student_parent_1" model="school.parent">
<field name="name">Jim Davis</field>
<field name="email">jim.davis@example.com</field>
<field eval="[(6,0,[ref('demo_student_student_5')])]" name="student_id"/>
</record>
<record id="demo_student_parent_2" model="school.parent">
<field name="name">Carol Amidon</field>
<field name="email">carol.amidon@example.com</field>
<field eval="[(6,0,[ref('demo_student_student_6')])]" name="student_id"/>
</record>
<record id="demo_student_parent_3" model="school.parent">
<field name="name">Linda Kellian</field>
<field name="email">linda@kellian@example.com</field>
<field eval="[(6,0,[ref('demo_student_student_7')])]" name="student_id"/>
</record>
<record id="demo_student_parent_4" model="school.parent">
<field name="name">Harold Placek</field>
<field name="email">harold.placek@example.com</field>
<field eval="[(6,0,[ref('demo_student_student_8')])]" name="student_id"/>
</record>
<record id="demo_student_parent_6" model="school.parent">
<field name="name">Jessie Warner</field>
<field name="email">jessie.warner@example.com</field>
<field eval="[(6,0,[ref('demo_student_student_6')])]" name="student_id"/>
</record>
<!-- Student Religion/caste -->
<record id="demo_student_cast_1" model="student.cast">
<field name="name">Hindu</field>
</record>
<record id="demo_student_cast_2" model="student.cast">
<field name="name">Muslim</field>
</record>
<record id="demo_student_cast_3" model="student.cast">
<field name="name">Christian</field>
</record>
<record id="demo_student_cast_4" model="student.cast">
<field name="name">Punjabi</field>
</record>
<record id="demo_student_cast_5" model="student.cast">
<field name="name">Parsi</field>
</record>
<!-- Student Document Type -->
<record id="demo_student_document_1" model="document.type">
<field name="doc_type">SSC Marksheet</field>
</record>
<record id="demo_student_document_2" model="document.type">
<field name="doc_type">HSC Marksheet</field>
</record>
<record id="demo_student_document_3" model="document.type">
<field name="doc_type">Gradution Marksheet</field>
</record>
<record id="demo_student_document_4" model="document.type">
<field name="doc_type">Degree certificate</field>
</record>
<record id="demo_student_document_5" model="document.type">
<field name="doc_type">Leving Certificate</field>
</record>
<record id="demo_student_document_6" model="document.type">
<field name="doc_type">Caste certificate</field>
</record>
<record id="demo_student_document_7" model="document.type">
<field name="doc_type">Other certificate</field>
</record>
<!-- student.news -->
<record id="demo_student_news_desc_1" model="student.news">
<field name="subject">Education Information</field>
<field eval="(DateTime.today()) + relativedelta(days= 3)" name="date"/>
</record>
</data>
</odoo>
# See LICENSE file for full copyright and licensing details.
# ----------------------------------------------------------
# A Module to School Management System
# ----------------------------------------------------------
from . import school
from . import student
from . import teacher
from . import parent
from . import res_users
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ParentRelation(models.Model):
'''Defining a Parent relation with child.'''
_name = "parent.relation"
_description = "Parent-child relation information"
name = fields.Char("Relation name", required=True,
help='Parent relation with student')
class SchoolParent(models.Model):
'''Defining a Teacher information.'''
_name = 'school.parent'
_description = 'Parent Information'
partner_id = fields.Many2one('res.partner', 'User ID', ondelete="cascade",
delegate=True, required=True,
help='Partner which is user over here')
relation_id = fields.Many2one('parent.relation', 'Relation with Child',
help='Parent relation with child')
student_id = fields.Many2many('student.student', 'students_parents_rel',
'students_parent_id', 'student_id',
'Children',
help='Student of the following parent')
standard_id = fields.Many2many('school.standard',
'school_standard_parent_rel',
'class_parent_id', 'class_id',
'Academic Class',
help='''Class of the student
of following parent''')
stand_id = fields.Many2many('standard.standard',
'standard_standard_parent_rel',
'standard_parent_id', 'standard_id',
'Academic Standard',
help='''Standard of the student
of following parent''')
teacher_id = fields.Many2one('school.teacher', 'Teacher',
related="standard_id.user_id", store=True,
help='Teacher of a student')
@api.onchange('student_id')
def onchange_student_id(self):
"""Onchange Method for Student."""
standard_ids = [student.standard_id.id
for student in self.student_id]
if standard_ids:
stand_ids = [student.standard_id.standard_id.id
for student in self.student_id]
self.standard_id = [(6, 0, standard_ids)]
self.stand_id = [(6, 0, stand_ids)]
@api.model
def create(self, vals):
"""Inherited create method to assign values in
the users record to maintain the delegation"""
parent_rec = super(SchoolParent, self).create(vals)
parent_grp_id = self.env.ref('school.group_school_parent')
emp_grp = self.env.ref('base.group_user')
parent_group_ids = [emp_grp.id, parent_grp_id.id]
user_vals = {'name': parent_rec.name,
'login': parent_rec.email,
'email': parent_rec.email,
'partner_id': parent_rec.partner_id.id,
'groups_id': [(6, 0, parent_group_ids)]
}
self.env['res.users'].create(user_vals)
return parent_rec
@api.onchange('state_id')
def onchange_state(self):
"""Onchange Method for State."""
if self.state_id:
self.country_id = self.state_id.country_id.id or False
# See LICENSE file for full copyright and licensing details.
from odoo import api, models
class ResUsers(models.Model):
_inherit = "res.users"
@api.model
def create(self, vals):
"""Inherit Method to create user of group teacher or parent."""
vals.update({'employee_ids': False})
user_rec = super(ResUsers, self).create(vals)
if self._context.get('teacher_create', False):
teacher_grp_id = self.env.ref('school.group_school_teacher')
user_base_grp = self.env.ref('base.group_user')
contact_create = self.env.ref('base.group_partner_manager')
teacher_group_ids = [user_base_grp.id, teacher_grp_id.id,
contact_create.id]
user_rec.write({'groups_id': [(6, 0, teacher_group_ids)],
'company_id': self._context.get('school_id'),
'company_ids': [(4, self._context.get('school_id'))
]})
return user_rec
# See LICENSE file for full copyright and licensing details.
# import time
import calendar
import re
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from odoo.tools.translate import _
EM = (r"[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$")
def emailvalidation(email):
"""Check valid email."""
if email:
email_regex = re.compile(EM)
if not email_regex.match(email):
raise ValidationError(_("This seems not to be valid email.\
Please enter email in correct format!"))
class AcademicYear(models.Model):
'''Defines an academic year.'''
_name = "academic.year"
_description = "Academic Year"
_order = "sequence"
sequence = fields.Integer('Sequence', required=True,
help="Sequence order you want to see this year.")
name = fields.Char('Name', required=True, help='Name of academic year')
code = fields.Char('Code', required=True, help='Code of academic year')
date_start = fields.Date('Start Date', required=True,
help='Starting date of academic year')
date_stop = fields.Date('End Date', required=True,
help='Ending of academic year')
month_ids = fields.One2many('academic.month', 'year_id', 'Months',
help="Related Academic months")
grade_id = fields.Many2one('grade.master', "Grade", help='Grade')
current = fields.Boolean('Current', help="Set Active Current Year")
description = fields.Text('Description', help='Description')
@api.model
def next_year(self, sequence):
'''This method assign sequence to years'''
year_rec = self.search([('sequence', '>', sequence)], order='id',
limit=1)
if year_rec:
return year_rec.id or False
def name_get(self):
'''Method to display name and code'''
return [(rec.id, ' [' + rec.code + ']' + rec.name) for rec in self]
def generate_academicmonth(self):
"""Generate academic months."""
interval = 1
month_obj = self.env['academic.month']
for data in self:
start_date = data.date_start
while start_date < data.date_stop:
end_date = start_date + relativedelta(months=interval, days=-1)
if end_date > data.date_stop:
end_date = data.date_stop
month_obj.create({
'name': start_date.strftime('%B'),
'code': start_date.strftime('%m/%Y'),
'date_start': start_date,
'date_stop': end_date,
'year_id': data.id,
})
start_date = start_date + relativedelta(months=interval)
@api.constrains('date_start', 'date_stop')
def _check_academic_year(self):
'''Method to check start date should be greater than end date
also check that dates are not overlapped with existing academic
year'''
new_start_date = self.date_start
new_stop_date = self.date_stop
delta = new_stop_date - new_start_date
if delta.days > 365 and not calendar.isleap(new_start_date.year):
raise ValidationError(_(
"The duration of the academic year is invalid."))
if (self.date_stop and self.date_start and
self.date_stop < self.date_start):
raise ValidationError(_(
"The start date of the academic year should be less than end date."))
for old_ac in self.search([('id', 'not in', self.ids)]):
# Check start date should be less than stop date
if (old_ac.date_start <= self.date_start <= old_ac.date_stop or
old_ac.date_start <= self.date_stop <= old_ac.date_stop):
raise ValidationError(_(
"Error! You cannot define overlapping academic years."))
@api.constrains('current')
def check_current_year(self):
'''Constraint on active current year'''
current_year_rec = self.search_count([('current', '=', True)])
if current_year_rec >= 2:
raise ValidationError(_(
"Error! You cannot set two current year active!"))
class AcademicMonth(models.Model):
'''Defining a month of an academic year.'''
_name = "academic.month"
_description = "Academic Month"
_order = "date_start"
name = fields.Char('Name', required=True, help='Name of Academic month')
code = fields.Char('Code', required=True, help='Code of Academic month')
date_start = fields.Date('Start of Period', required=True,
help='Starting of academic month')
date_stop = fields.Date('End of Period', required=True,
help='Ending of academic month')
year_id = fields.Many2one('academic.year', 'Academic Year', required=True,
help="Related academic year ")
description = fields.Text('Description', help='Description')
_sql_constraints = [
('month_unique', 'unique(date_start, date_stop, year_id)',
'Academic Month should be unique!'),
]
@api.constrains('year_id', 'date_start', 'date_stop')
def _check_year_limit(self):
'''Method to check year limit'''
if self.year_id and self.date_start and self.date_stop:
if (self.year_id.date_stop < self.date_stop or
self.year_id.date_stop < self.date_start or
self.year_id.date_start > self.date_start or
self.year_id.date_start > self.date_stop):
raise ValidationError(_(
"Some of the months periods overlap or is not in the academic year!"))
@api.constrains('date_start', 'date_stop')
def check_months(self):
'''Method to check duration of date'''
if (self.date_stop and self.date_start and
self.date_stop < self.date_start):
raise ValidationError(_(
"End of Period date should be greater than Start of Periods Date!"))
"""Check start date should be less than stop date."""
exist_month_rec = self.search([('id', 'not in', self.ids)])
for old_month in exist_month_rec:
if old_month.date_start <= \
self.date_start <= old_month.date_stop \
or old_month.date_start <= \
self.date_stop <= old_month.date_stop:
raise ValidationError(_(
"Error! You cannot define overlapping months!"))
class StandardMedium(models.Model):
''' Defining a medium(ENGLISH, HINDI, GUJARATI) related to standard'''
_name = "standard.medium"
_description = "Standard Medium"
_order = "sequence"
sequence = fields.Integer('Sequence', required=True,
help='Sequence of the record')
name = fields.Char('Name', required=True,
help='Medium of the standard')
code = fields.Char('Code', required=True,
help='Medium code')
description = fields.Text('Description', help='Description')
class StandardDivision(models.Model):
'''Defining a division(A, B, C) related to standard'''
_name = "standard.division"
_description = "Standard Division"
_order = "sequence"
sequence = fields.Integer('Sequence', required=True,
help='Sequence of the record')
name = fields.Char('Name', required=True,
help='Division of the standard')
code = fields.Char('Code', required=True,
help='Standard code')
description = fields.Text('Description', help='Description')
class StandardStandard(models.Model):
'''Defining Standard Information.'''
_name = 'standard.standard'
_description = 'Standard Information'
_order = "sequence"
sequence = fields.Integer('Sequence', required=True,
help='Sequence of the record')
name = fields.Char('Name', required=True,
help='Standard name')
code = fields.Char('Code', required=True,
help='Code of standard')
description = fields.Text('Description', help='Description')
@api.model
def next_standard(self, sequence):
'''This method check sequence of standard'''
stand_rec = self.search([('sequence', '>', sequence)], order='id',
limit=1)
return stand_rec.id or False
class SchoolStandard(models.Model):
'''Defining a standard related to school.'''
_name = 'school.standard'
_description = 'School Standards'
_rec_name = "standard_id"
@api.depends('standard_id', 'school_id', 'division_id', 'medium_id',
'school_id')
def _compute_student(self):
'''Compute student of done state'''
student_obj = self.env['student.student']
for rec in self:
rec.student_ids = student_obj.\
search([('standard_id', '=', rec.id),
('school_id', '=', rec.school_id.id),
('division_id', '=', rec.division_id.id),
('medium_id', '=', rec.medium_id.id),
('state', '=', 'done')])
@api.depends('subject_ids')
def _compute_subject(self):
'''Method to compute subjects.'''
for rec in self:
rec.total_no_subjects = len(rec.subject_ids)
@api.depends('student_ids')
def _compute_total_student(self):
'''Method to compute total student.'''
for rec in self:
rec.total_students = len(rec.student_ids)
@api.depends("capacity", "total_students")
def _compute_remain_seats(self):
'''Method to compute remaining seats.'''
for rec in self:
rec.remaining_seats = rec.capacity - rec.total_students
school_id = fields.Many2one('school.school', 'School', required=True,
help='School of the following standard')
standard_id = fields.Many2one('standard.standard', 'Standard',
required=True, help='Standard')
division_id = fields.Many2one('standard.division', 'Division',
required=True, help='Standard division')
medium_id = fields.Many2one('standard.medium', 'Medium', required=True,
help='Medium of the standard')
subject_ids = fields.Many2many('subject.subject', 'subject_standards_rel',
'subject_id', 'standard_id', 'Subject',
help='Subjects of the standard')
user_id = fields.Many2one('school.teacher', 'Class Teacher',
help='Teacher of the standard')
student_ids = fields.One2many('student.student', 'standard_id',
'Student In Class',
compute='_compute_student', store=True,
help='Students which are in this standard'
)
color = fields.Integer('Color Index', help='Index of color')
cmp_id = fields.Many2one('res.company', 'Company Name',
related='school_id.company_id', store=True,
help='Company_id of the school')
syllabus_ids = fields.One2many('subject.syllabus', 'standard_id',
'Syllabus',
help='Syllabus of the following standard')
total_no_subjects = fields.Integer('Total No of Subject',
compute="_compute_subject",
help='Total subjects in the standard')
name = fields.Char('Name', help='Standard name')
capacity = fields.Integer("Total Seats", help='Standard capacity')
total_students = fields.Integer("Total Students",
compute="_compute_total_student",
store=True,
help='Total students of the standard')
remaining_seats = fields.Integer("Available Seats",
compute="_compute_remain_seats",
store=True,
help='Remaining seats of the standard')
class_room_id = fields.Many2one('class.room', 'Room Number',
help='Class room of the standard')
@api.onchange('standard_id', 'division_id')
def onchange_combine(self):
'''Onchange to assign name respective of it's standard and division'''
self.name = str(self.standard_id.name
) + '-' + str(self.division_id.name)
@api.constrains('standard_id', 'division_id')
def check_standard_unique(self):
"""Method to check unique standard."""
standard_search = self.env['school.standard'].search([
('standard_id', '=', self.standard_id.id),
('division_id', '=', self.division_id.id),
('school_id', '=', self.school_id.id),
('id', 'not in', self.ids)])
if standard_search:
raise ValidationError(_("Division and class should be unique!"))
def unlink(self):
"""Method to check unique standard."""
for rec in self:
if rec.student_ids or rec.subject_ids or rec.syllabus_ids:
raise ValidationError(_(
"You cannot delete as it has reference with student, subject or syllabus!"))
return super(SchoolStandard, self).unlink()
@api.constrains('capacity')
def check_seats(self):
"""Method to check seats."""
if self.capacity <= 0:
raise ValidationError(_("Total seats should be greater than 0!"))
def name_get(self):
'''Method to display standard and division'''
return [(rec.id, rec.standard_id.name + '[' + rec.division_id.name +
']') for rec in self]
class SchoolSchool(models.Model):
''' Defining School Information'''
_name = 'school.school'
_description = 'School Information'
_rec_name = "com_name"
@api.model
def _lang_get(self):
'''Method to get language'''
languages = self.env['res.lang'].search([])
return [(language.code, language.name) for language in languages]
company_id = fields.Many2one('res.company', 'Company', ondelete="cascade",
required=True, delegate=True,
help='Company_id of the school')
com_name = fields.Char('School Name', related='company_id.name',
store=True, help='School name')
code = fields.Char('Code', required=True, help='School code')
standards = fields.One2many('school.standard', 'school_id',
'Standards', help='School standard')
lang = fields.Selection(_lang_get, 'Language',
help='''If the selected language is loaded in the
system, all documents related to this partner
will be printed in this language.
If not, it will be English.''')
required_age = fields.Integer("Student Admission Age Required", default=6,
help='''Minimum required age for
student admission''')
@api.model
def create(self, vals):
'''Inherited create method to assign company_id to school'''
res = super(SchoolSchool, self).create(vals)
main_company = self.env.ref('base.main_company')
res.company_id.parent_id = main_company.id
return res
class SubjectSubject(models.Model):
'''Defining a subject '''
_name = "subject.subject"
_description = "Subjects"
name = fields.Char('Name', required=True, help='Subject name')
code = fields.Char('Code', required=True, help='Subject code')
maximum_marks = fields.Integer("Maximum marks",
help='Maximum marks of the subject can get')
minimum_marks = fields.Integer("Minimum marks", help='''Required minimum
marks of the subject''')
weightage = fields.Integer("WeightAge", help='Weightage of the subject')
teacher_ids = fields.Many2many('school.teacher', 'subject_teacher_rel',
'subject_id', 'teacher_id', 'Teachers',
help='Teachers of the following subject')
standard_ids = fields.Many2many('standard.standard', string='Standards',
help='''Standards in which the
following subject taught''')
standard_id = fields.Many2one('standard.standard', 'Class',
help='''Class in which the following
subject taught''')
is_practical = fields.Boolean('Is Practical',
help='Check this if subject is practical.')
elective_id = fields.Many2one('subject.elective',
help='''Elective subject respective
the following subject''')
student_ids = fields.Many2many('student.student',
'elective_subject_student_rel',
'subject_id', 'student_id', 'Students',
help='Students who choose this subject')
@api.constrains("maximum_marks", "minimum_marks")
def check_marks(self):
"""Method to check marks."""
if self.minimum_marks >= self.maximum_marks:
raise ValidationError(
_(
"""Configure Maximum marks greater than minimum marks!"""
)
)
class SubjectSyllabus(models.Model):
'''Defining a syllabus'''
_name = "subject.syllabus"
_description = "Syllabus"
_rec_name = "subject_id"
standard_id = fields.Many2one('school.standard', 'Standard',
help='Standard which had this subject')
subject_id = fields.Many2one('subject.subject', 'Subject', help='Subject')
syllabus_doc = fields.Binary("Syllabus Doc",
help="Attach syllabus related to Subject")
class SubjectElective(models.Model):
''' Defining Subject Elective '''
_name = 'subject.elective'
_description = "Elective Subject"
name = fields.Char("Name", help='Elective subject name')
subject_ids = fields.One2many('subject.subject', 'elective_id',
'Elective Subjects', help='''Subjects of the
respective elective subject''')
class MotherTongue(models.Model):
"""Defining mother tongue."""
_name = 'mother.toungue'
_description = "Mother Toungue"
name = fields.Char("Mother Tongue", help='Language name')
class StudentAward(models.Model):
"""Defining student award."""
_name = 'student.award'
_description = "Student Awards"
award_list_id = fields.Many2one('student.student', 'Student',
help='Students who about to get the award')
name = fields.Char('Award Name', help='Award name')
description = fields.Char('Description', help='Description')
class AttendanceType(models.Model):
"""Defining attendance type."""
_name = "attendance.type"
_description = "School Type"
name = fields.Char('Name', required=True, help='Attendance type name')
code = fields.Char('Code', required=True, help='Attendance type code')
class StudentDocument(models.Model):
"""Defining Student document."""
_name = 'student.document'
_description = "Student Document"
_rec_name = "doc_type"
doc_id = fields.Many2one('student.student', 'Student',
help='Student of the following doc')
file_no = fields.Char('File No', readonly="1",
default=lambda obj: obj.env[
'ir.sequence'].next_by_code('student.document'),
help='File no of the document')
submited_date = fields.Date('Submitted Date',
help='Document submitted date')
doc_type = fields.Many2one('document.type', 'Document Type', required=True,
help='Document type')
file_name = fields.Char('File Name', help='File name')
return_date = fields.Date('Return Date', help='Document return date')
new_datas = fields.Binary('Attachments', help='Attachments of the document')
class DocumentType(models.Model):
''' Defining a Document Type(SSC,Leaving)'''
_name = "document.type"
_description = "Document Type"
_rec_name = "doc_type"
_order = "seq_no"
seq_no = fields.Char('Sequence', readonly=True,
default=lambda self: _('New'),
help='Sequence of the document')
doc_type = fields.Char('Document Type', required=True,
help='Document type')
@api.model
def create(self, vals):
if vals.get('seq_no', _('New')) == _('New'):
vals['seq_no'] = self.env['ir.sequence'].next_by_code(
'document.type') or _('New')
return super(DocumentType, self).create(vals)
class StudentDescription(models.Model):
''' Defining a Student Description'''
_name = 'student.description'
_description = "Student Description"
des_id = fields.Many2one('student.student', 'Student Ref.',
help='Student record from students')
name = fields.Char('Name', help='Description name')
description = fields.Char('Description', help='Student description')
class StudentDescipline(models.Model):
"""Definign student dscipline."""
_name = 'student.descipline'
_description = "Student Discipline"
student_id = fields.Many2one('student.student', 'Student',
help='Student')
teacher_id = fields.Many2one('school.teacher', 'Teacher',
help='Teacher who examine the student')
date = fields.Date('Date', help='Date')
class_id = fields.Many2one('standard.standard', 'Class',
help='Class of student')
note = fields.Text('Note', help='Discipline Note')
action_taken = fields.Text('Action Taken',
help='Action taken against discipline')
class StudentHistory(models.Model):
"""Defining Student History."""
_name = "student.history"
_description = "Student History"
student_id = fields.Many2one('student.student', 'Student',
help='Related Student')
academice_year_id = fields.Many2one('academic.year', 'Academic Year',
help='Academice Year')
standard_id = fields.Many2one('school.standard', 'Standard',
help='Standard of the following student')
percentage = fields.Float("Percentage", readonly=True,
help='Percentage of the student')
result = fields.Char('Result', readonly=True,
help='Result of the student')
class StudentCertificate(models.Model):
"""Defining student certificate."""
_name = "student.certificate"
_description = "Student Certificate"
student_id = fields.Many2one('student.student', 'Student',
help='Related student')
description = fields.Char('Description', help='Description')
certi = fields.Binary('Certificate', required=True,
help='Student certificate')
class StudentReference(models.Model):
''' Defining a student reference information '''
_name = "student.reference"
_description = "Student Reference"
reference_id = fields.Many2one('student.student', 'Student',
help='Student reference')
name = fields.Char('First Name', required=True,
help='Student name')
middle = fields.Char('Middle Name', required=True,
help='Student middle name')
last = fields.Char('Surname', required=True,
help='Student last name')
designation = fields.Char('Designation', required=True,
help='Student designation')
phone = fields.Char('Phone', required=True, help='Student phone')
gender = fields.Selection([('male', 'Male'), ('female', 'Female')],
'Gender', help='Student gender')
class StudentPreviousSchool(models.Model):
''' Defining a student previous school information '''
_name = "student.previous.school"
_description = "Student Previous School"
previous_school_id = fields.Many2one('student.student', 'Student',
help='Related student')
name = fields.Char('Name', required=True,
help='Student previous school name')
registration_no = fields.Char('Registration No.', required=True,
help='Student registration number')
admission_date = fields.Date('Admission Date',
help='Student admission date')
exit_date = fields.Date('Exit Date',
help='Student previous school exit date')
course_id = fields.Many2one('standard.standard', 'Course', required=True,
help='Student gender')
add_sub = fields.One2many('academic.subject', 'add_sub_id', 'Add Subjects',
help='Student gender')
@api.constrains('admission_date', 'exit_date')
def check_date(self):
new_dt = fields.Date.today()
if (self.admission_date and self.admission_date >= new_dt) or (
self.exit_date and self.exit_date >= new_dt):
raise ValidationError(_(
"Your admission date and exit date should be less than current date!"))
if (self.admission_date and self.exit_date) and (
self.admission_date > self.exit_date):
raise ValidationError(_(
"Admission date should be less than exit date in previous school!"))
class AcademicSubject(models.Model):
''' Defining a student previous school information '''
_name = "academic.subject"
_description = "Student Previous School"
add_sub_id = fields.Many2one('student.previous.school', 'Add Subjects',
invisible=True,
help='Select student previous school')
name = fields.Char('Name', required=True,
help='Enter previous school name')
maximum_marks = fields.Integer("Maximum marks", help='Enter maximum mark')
minimum_marks = fields.Integer("Minimum marks", help='Enter minimum marks')
class StudentFamilyContact(models.Model):
''' Defining a student emergency contact information '''
_name = "student.family.contact"
_description = "Student Family Contact"
@api.depends('relation', 'stu_name')
def _compute_get_name(self):
for rec in self:
relative_name = rec.name
if rec.stu_name:
rec.relative_name = rec.stu_name.name
rec.relative_name = relative_name
family_contact_id = fields.Many2one('student.student', 'Student Ref.',
help='Enter related student')
rel_name = fields.Selection([('exist', 'Link to Existing Student'),
('new', 'Create New Relative Name')],
'Related Student', help="Select Name",
required=True)
user_id = fields.Many2one('res.users', 'User ID', ondelete="cascade",
help='Enter related user of the student')
stu_name = fields.Many2one('student.student', 'Existing Student',
help="Select Student From Existing List")
name = fields.Char('Relative Name', help='Enter relative name')
relation = fields.Many2one('student.relation.master', 'Relation',
required=True,
help='Select student relation with member')
phone = fields.Char('Phone', required=True,
help='Enter family member contact')
email = fields.Char('E-Mail', help='Enter student email')
relative_name = fields.Char(compute='_compute_get_name', string='Name',
help='Enter student family member name')
class StudentRelationMaster(models.Model):
''' Student Relation Information '''
_name = "student.relation.master"
_description = "Student Relation Master"
name = fields.Char('Name', required=True, help="Enter Relation name")
seq_no = fields.Integer('Sequence', help='Relation sequence')
class GradeMaster(models.Model):
"""Defining grade master."""
_name = 'grade.master'
_description = "Grade Master"
name = fields.Char('Grade', required=True, help='Grade name')
grade_ids = fields.One2many('grade.line', 'grade_id', 'Grade Lines',
help='Grade which are consider in this.')
class GradeLine(models.Model):
"""Defining grade line."""
_name = 'grade.line'
_description = "Grades"
_rec_name = 'grade'
from_mark = fields.Integer('From Marks', required=True,
help='The grade will starts from this marks.')
to_mark = fields.Integer('To Marks', required=True,
help='The grade will ends to this marks.')
grade = fields.Char('Grade', required=True, help="Grade")
sequence = fields.Integer('Sequence', help="Sequence order of the grade.")
fail = fields.Boolean('Fail', help='''If fail field is set to True,
it will allow you to set the grade as fail.''')
grade_id = fields.Many2one("grade.master", 'Grade Ref.',
help='Related grade')
name = fields.Char('Name', help='Grade name')
@api.constrains('from_mark', 'to_mark')
def check_marks(self):
'''Method to check overlapping of Marks'''
for rec in self:
if (rec.to_mark < rec.from_mark):
raise ValidationError(_(
"To Marks should be greater than From Marks!"))
for line in self.search([('grade_id', '=', rec.grade_id.id),
('id', '!=', rec.id)]):
if (line.from_mark <= rec.from_mark <= line.to_mark or
line.from_mark <= rec.to_mark <= line.to_mark):
raise ValidationError(_(
"Error! You cannot define overlapping Marks!"))
class StudentNews(models.Model):
"""Defining studen news."""
_name = 'student.news'
_description = 'Student News'
_rec_name = 'subject'
_order = 'date asc'
subject = fields.Char('Subject', required=True,
help='Subject of the news.')
description = fields.Text('Description', help="Description")
date = fields.Datetime('Expiry Date', help='Expiry date of the news.')
user_ids = fields.Many2many('res.users', 'user_news_rel', 'id', 'user_ids',
'User News',
help='Name to whom this news is related.')
color = fields.Integer('Color Index', default=0, help='Color index')
@api.constrains("date")
def checknews_dates(self):
"""Check news date."""
new_date = fields.datetime.today()
if self.date < new_date:
raise ValidationError(_(
"Configure expiry date greater than current date!"))
def news_update(self):
'''Method to send email to student for news update'''
emp_obj = self.env['hr.employee']
obj_mail_server = self.env['ir.mail_server']
user = self.env.user
# Check if out going mail configured
mail_server_ids = obj_mail_server.search([])
if not mail_server_ids:
raise UserError(_('User Email Configuration!,\n'
"Outgoing mail server not specified!"))
mail_server_record = mail_server_ids[0]
email_list = []
# Check email is defined in student
for news in self:
if news.user_ids and news.date:
email_list = [news_user.email for news_user in news.user_ids
if news_user.email]
if not email_list:
raise UserError(_('User Email Configuration!,\n'
"Email not found in users !"))
# Check email is defined in user created from employee
else:
for employee in emp_obj.search([]):
if employee.work_email:
email_list.append(employee.work_email)
elif employee.user_id and employee.user_id.email:
email_list.append(employee.user_id.email)
if not email_list:
raise UserError(_('Email Configuration!,\n'
"Email not defined!"))
news_date = news.date
# Add company name while sending email
company = user.company_id.name or ''
body = """Hi,<br/><br/>
This is a news update from <b>%s</b> posted at %s<br/>
<br/> %s <br/><br/>
Thank you.""" % (company,
news_date.strftime(
DEFAULT_SERVER_DATETIME_FORMAT),
news.description or '')
smtp_user = mail_server_record.smtp_user or False
# Check if mail of outgoing server configured
if not smtp_user:
raise UserError(_('Email Configuration,\n'
"Kindly,Configure Outgoing Mail Server!"))
notification = 'Notification for news update.'
# Configure email
message = obj_mail_server.build_email(email_from=smtp_user,
email_to=email_list,
subject=notification,
body=body,
body_alternative=body,
reply_to=smtp_user,
subtype='html')
# Send Email configured above with help of send mail method
obj_mail_server.send_email(message=message,
mail_server_id=mail_server_ids[0].id)
return True
class StudentReminder(models.Model):
"""Defining student reminder."""
_name = 'student.reminder'
_description = "Student Reminder"
@api.model
def check_user(self):
'''Method to get default value of logged in Student'''
return self.env['student.student'].search([
('user_id', '=', self._uid)]).id
stu_id = fields.Many2one('student.student', 'Student Name', required=True,
default=check_user, help='Relative student')
name = fields.Char('Title', help='Reminder name')
date = fields.Date('Date', help='Reminder date')
description = fields.Text('Description',
help='Description of the reminder')
color = fields.Integer('Color Index', default=0, help='Color index')
class StudentCast(models.Model):
"""Defining student cast."""
_name = "student.cast"
_description = "Student Cast"
name = fields.Char("Name", required=True, help='Student cast')
class ClassRoom(models.Model):
"""Defining class room."""
_name = "class.room"
_description = "Class Room"
name = fields.Char("Name", help='Class room name')
number = fields.Char("Room Number", help='Class room number')
class Report(models.Model):
_inherit = "ir.actions.report"
def render_template(self, template, values=None):
student_rec = self.env['student.student'].\
browse(self._context.get('student_id', False))
if student_rec and student_rec.state == 'draft':
raise ValidationError(_(
"You cannot print report forstudent in unconfirm state!"))
return super(Report, self).render_template(template, values)
# See LICENSE file for full copyright and licensing details.
import base64
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.modules import get_module_resource
from . import school
# from lxml import etree
# added import statement in try-except because when server runs on
# windows operating system issue arise because this library is not in Windows.
try:
from odoo.tools import image_colorize
except:
image_colorize = False
class StudentStudent(models.Model):
'''Defining a student information.'''
_name = 'student.student'
_table = "student_student"
_description = 'Student Information'
@api.model
def _search(self, args, offset=0, limit=None, order=None, count=False,
access_rights_uid=None):
'''Method to get student of parent having group teacher'''
teacher_group = self.env.user.has_group('school.group_school_teacher')
parent_grp = self.env.user.has_group('school.group_school_parent')
login_user_rec = self.env.user
name = self._context.get('student_id')
if name and teacher_group and parent_grp:
parent_login_stud_rec = self.env['school.parent'].search([
('partner_id', '=', login_user_rec.partner_id.id)])
childrens = parent_login_stud_rec.student_id
args.append(('id', 'in', childrens.ids))
return super(StudentStudent, self)._search(
args=args, offset=offset, limit=limit, order=order, count=count,
access_rights_uid=access_rights_uid)
@api.depends('date_of_birth')
def _compute_student_age(self):
'''Method to calculate student age'''
current_dt = fields.Date.today()
for rec in self:
rec.age = 0
if rec.date_of_birth and rec.date_of_birth < current_dt:
start = rec.date_of_birth
age_calc = ((current_dt - start).days / 365)
# Age should be greater than 0
if age_calc > 0.0:
rec.age = age_calc
@api.model
def _default_image(self):
'''Method to get default Image'''
image_path = get_module_resource('hr', 'static/src/img',
'default_image.png')
return base64.b64encode(open(image_path, 'rb').read())
@api.depends('state')
def _compute_teacher_user(self):
'''Compute teacher boolean field if user form teacher group'''
teacher = self.env.user.has_group("school.group_school_teacher")
for rec in self:
rec.teachr_user_grp = False
if teacher and rec.state == 'done':
rec.teachr_user_grp = True
@api.model
def check_current_year(self):
'''Method to get default value of logged in Student'''
res = self.env['academic.year'].search([('current', '=', True)])
if not res:
raise ValidationError(_(
"There is no current Academic Year defined!\
Please contact Administator!"))
return res.id
family_con_ids = fields.One2many('student.family.contact',
'family_contact_id',
'Family Contact Detail',
states={'done': [('readonly', True)]},
help='Select the student family contact')
user_id = fields.Many2one('res.users', 'User ID', ondelete="cascade",
required=True, delegate=True,
help='Select related user of the student')
student_name = fields.Char('Student Name', related='user_id.name',
store=True, readonly=True,
help='Student Name')
pid = fields.Char('Student ID', required=True,
default=lambda self: _('New'),
help='Personal IDentification Number')
reg_code = fields.Char('Registration Code',
help='Student Registration Code')
student_code = fields.Char('Student Code', help='Enter student code')
contact_phone = fields.Char('Phone no.', help='Enter student phone no.')
contact_mobile = fields.Char('Mobile no', help='Enter student mobile no.')
roll_no = fields.Integer('Roll No.', readonly=True,
help='Enter student roll no.')
photo = fields.Binary('Photo', default=_default_image,
help='Attach student photo')
year = fields.Many2one('academic.year', 'Academic Year', readonly=True,
default=check_current_year,
help='Select academic year')
cast_id = fields.Many2one('student.cast', 'Religion/Caste',
help='Select student cast')
relation = fields.Many2one('student.relation.master', 'Relation',
help='Select student relation')
admission_date = fields.Date('Admission Date', default=fields.Date.today(),
help='Enter student admission date')
middle = fields.Char('Middle Name', required=True,
states={'done': [('readonly', True)]},
help='Enter student middle name')
last = fields.Char('Surname', required=True,
states={'done': [('readonly', True)]},
help='Enter student last name')
gender = fields.Selection([('male', 'Male'), ('female', 'Female')],
'Gender', states={'done': [('readonly', True)]},
help='Select student gender')
date_of_birth = fields.Date('BirthDate', required=True,
states={'done': [('readonly', True)]},
help='Enter student date of birth')
mother_tongue = fields.Many2one('mother.toungue', "Mother Tongue",
help='Select student mother tongue')
age = fields.Integer(compute='_compute_student_age', string='Age',
readonly=True, help='Enter student age')
maritual_status = fields.Selection([('unmarried', 'Unmarried'),
('married', 'Married')],
'Marital Status',
states={'done': [('readonly', True)]},
help='Select student maritual status')
reference_ids = fields.One2many('student.reference', 'reference_id',
'References',
states={'done': [('readonly', True)]},
help='Enter student references')
previous_school_ids = fields.One2many('student.previous.school',
'previous_school_id',
'Previous School Detail',
states={'done': [(
'readonly', True)]},
help='Enter student school details')
doctor = fields.Char('Doctor Name', states={'done': [('readonly', True)]},
help='Enter doctor name for student medical details')
designation = fields.Char('Designation', help='Enter doctor designation')
doctor_phone = fields.Char('Contact No.', help='Enter doctor phone')
blood_group = fields.Char('Blood Group', help='Enter student blood group')
height = fields.Float('Height', help="Hieght in C.M")
weight = fields.Float('Weight', help="Weight in K.G")
eye = fields.Boolean('Eyes', help='Eye for medical info')
ear = fields.Boolean('Ears', help='Eye for medical info')
nose_throat = fields.Boolean('Nose & Throat',
help='Nose & Throat for medical info')
respiratory = fields.Boolean('Respiratory',
help='Respiratory for medical info')
cardiovascular = fields.Boolean('Cardiovascular',
help='Cardiovascular for medical info')
neurological = fields.Boolean('Neurological',
help='Neurological for medical info')
muskoskeletal = fields.Boolean('Musculoskeletal',
help='Musculoskeletal for medical info')
dermatological = fields.Boolean('Dermatological',
help='Dermatological for medical info')
blood_pressure = fields.Boolean('Blood Pressure',
help='Blood pressure for medical info')
remark = fields.Text('Remark', states={'done': [('readonly', True)]},
help='Remark can be entered if any')
school_id = fields.Many2one('school.school', 'School',
states={'done': [('readonly', True)]},
help='Select school')
state = fields.Selection([('draft', 'Draft'),
('done', 'Done'),
('terminate', 'Terminate'),
('cancel', 'Cancel'),
('alumni', 'Alumni')],
'Status', readonly=True, default="draft",
help='State of the student registration form')
history_ids = fields.One2many('student.history', 'student_id', 'History',
help='Enter student history')
certificate_ids = fields.One2many('student.certificate', 'student_id',
'Certificate',
help='Enter student certificates')
student_discipline_line = fields.One2many('student.descipline',
'student_id', 'Descipline',
help='''Enter student
descipline info''')
document = fields.One2many('student.document', 'doc_id', 'Documents',
help='Attach student documents')
description = fields.One2many('student.description', 'des_id',
'Description', help='Description')
award_list = fields.One2many('student.award', 'award_list_id',
'Award List', help='Student award list')
stu_name = fields.Char('First Name', related='user_id.name',
readonly=True, help='Enter student first name')
Acadamic_year = fields.Char('Year', related='year.name',
help='Academic Year', readonly=True)
division_id = fields.Many2one('standard.division', 'Division',
help='Select student standard division')
medium_id = fields.Many2one('standard.medium', 'Medium',
help='Select student standard medium')
standard_id = fields.Many2one('school.standard', 'Class',
help='Select student standard')
parent_id = fields.Many2many('school.parent', 'students_parents_rel',
'student_id',
'students_parent_id', 'Parent(s)',
states={'done': [('readonly', True)]},
help='Enter student parents')
terminate_reason = fields.Text('Reason',
help='Enter student terminate reason')
active = fields.Boolean(default=True,
help='Activate/Deactivate student record')
teachr_user_grp = fields.Boolean("Teacher Group",
compute="_compute_teacher_user",
help='Activate/Deactivate teacher group')
active = fields.Boolean(default=True,
help='Activate/Deactivate student record')
@api.model
def create(self, vals):
'''Method to create user when student is created'''
if vals.get('pid', _('New')) == _('New'):
vals['pid'] = self.env['ir.sequence'
].next_by_code('student.student'
) or _('New')
if vals.get('pid', False):
vals['login'] = vals['pid']
vals['password'] = vals['pid']
else:
raise UserError(_(
"Error! PID not valid so record will not be saved."))
if vals.get('company_id', False):
company_vals = {'company_ids': [(4, vals.get('company_id'))]}
vals.update(company_vals)
if vals.get('email'):
school.emailvalidation(vals.get('email'))
res = super(StudentStudent, self).create(vals)
teacher = self.env['school.teacher']
for data in res.parent_id:
teacher_rec = teacher.search([('stu_parent_id', '=', data.id)])
for record in teacher_rec:
record.write({'student_id': [(4, res.id, None)]})
# Assign group to student based on condition
emp_grp = self.env.ref('base.group_user')
if res.state == 'draft':
admission_group = self.env.ref('school.group_is_admission')
new_grp_list = [admission_group.id, emp_grp.id]
res.user_id.write({'groups_id': [(6, 0, new_grp_list)]})
elif res.state == 'done':
done_student = self.env.ref('school.group_school_student')
group_list = [done_student.id, emp_grp.id]
res.user_id.write({'groups_id': [(6, 0, group_list)]})
return res
def write(self, vals):
'''Inherited method write to assign
student to their respective teacher'''
teacher = self.env['school.teacher']
if vals.get('parent_id'):
for parent in vals.get('parent_id')[0][2]:
teacher_rec = teacher.search([('stu_parent_id', '=', parent)])
for data in teacher_rec:
data.write({'student_id': [(4, self.id)]})
return super(StudentStudent, self).write(vals)
@api.constrains('date_of_birth')
def check_age(self):
'''Method to check age should be greater than 6'''
current_dt = fields.Date.today()
if self.date_of_birth:
start = self.date_of_birth
age_calc = ((current_dt - start).days / 365)
# Check if age less than required age
if age_calc < self.school_id.required_age:
raise ValidationError(_(
"Age of student should be greater than %s years!"% (\
self.school_id.required_age)))
def set_to_draft(self):
'''Method to change state to draft'''
self.state = 'draft'
def set_alumni(self):
'''Method to change state to alumni'''
student_user = self.env['res.users']
for rec in self:
rec.state = 'alumni'
rec.standard_id._compute_total_student()
user = student_user.search([('id', '=', rec.user_id.id)])
rec.active = False
if user:
user.active = False
def set_done(self):
'''Method to change state to done'''
self.state = 'done'
def admission_draft(self):
'''Set the state to draft'''
self.state = 'draft'
def set_terminate(self):
'''Set the state to terminate'''
self.state = 'terminate'
def cancel_admission(self):
'''Set the state to cancel.'''
self.state = 'cancel'
def admission_done(self):
'''Method to confirm admission'''
school_standard_obj = self.env['school.standard']
ir_sequence = self.env['ir.sequence']
student_group = self.env.ref('school.group_school_student')
emp_group = self.env.ref('base.group_user')
for rec in self:
if not rec.standard_id:
raise ValidationError(_("Please select class!"))
if rec.standard_id.remaining_seats <= 0:
raise ValidationError(_('Seats of class %s are full'
) % rec.standard_id.standard_id.name)
domain = [('school_id', '=', rec.school_id.id)]
# Checks the standard if not defined raise error
if not school_standard_obj.search(domain):
raise UserError(_(
"Warning! The standard is not defined in school!"))
# Assign group to student
rec.user_id.write({'groups_id': [(6, 0, [emp_group.id,
student_group.id])]})
# Assign roll no to student
number = 1
for rec_std in rec.search(domain):
rec_std.roll_no = number
number += 1
# Assign registration code to student
reg_code = ir_sequence.next_by_code('student.registration')
registation_code = (str(rec.school_id.state_id.name) + str('/') +
str(rec.school_id.city) + str('/') +
str(rec.school_id.name) + str('/') +
str(reg_code))
stu_code = ir_sequence.next_by_code('student.code')
student_code = (str(rec.school_id.code) + str('/') +
str(rec.year.code) + str('/') +
str(stu_code))
rec.write({'state': 'done',
'admission_date': fields.Date.today(),
'student_code': student_code,
'reg_code': registation_code})
return True
# See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class SchoolTeacher(models.Model):
'''Defining a Teacher information.'''
_name = 'school.teacher'
_description = 'Teacher Information'
_inherit = ['mail.thread', 'mail.activity.mixin']
employee_id = fields.Many2one('hr.employee', 'Employee ID',
ondelete="cascade",
delegate=True, required=True,
help='Enter related employee')
standard_id = fields.Many2one('school.standard',
"Responsibility of Academic Class",
help="Standard for which the teacher\
responsible for.")
stand_id = fields.Many2one('standard.standard', "Course",
related="standard_id.standard_id", store=True,
help='''Select standard which are
assigned to teacher''')
subject_id = fields.Many2many('subject.subject', 'subject_teacher_rel',
'teacher_id', 'subject_id',
'Course-Subjects',
help='Select subject of teacher')
school_id = fields.Many2one('school.school', "Campus",
help='Select school')
category_ids = fields.Many2many('hr.employee.category',
'teacher_category_rel', 'emp_id',
'categ_id', 'Tags',
help='Select employee category')
department_id = fields.Many2one('hr.department', 'Department',
help='Select department')
is_parent = fields.Boolean('Is Parent',
help='Select this if it parent')
stu_parent_id = fields.Many2one('school.parent', 'Related Parent',
help='Enter student parent')
student_id = fields.Many2many('student.student',
'students_teachers_parent_rel',
'teacher_id', 'student_id',
'Children', help='Select student')
phone_numbers = fields.Char("Phone Number", help='Student PH no')
@api.onchange('standard_id')
def _onchange_standard_id(self):
for rec in self:
if rec.standard_id:
rec.school_id = rec.standard_id.school_id.id
@api.onchange('is_parent')
def _onchange_isparent(self):
"""Onchange method for is parent"""
if self.is_parent:
self.stu_parent_id = False
self.student_id = False
@api.onchange('stu_parent_id')
def _onchangestudent_parent(self):
"""Onchange method for student parent records"""
stud_list = []
if self.stu_parent_id and self.stu_parent_id.student_id:
for student in self.stu_parent_id.student_id:
stud_list.append(student.id)
self.student_id = [(6, 0, stud_list)]
@api.model
def create(self, vals):
"""Inherited create method to assign value to users for delegation"""
teacher_id = super(SchoolTeacher, self).create(vals)
user_obj = self.env['res.users']
user_vals = {'name': teacher_id.name,
'login': teacher_id.work_email,
'email': teacher_id.work_email,
}
ctx_vals = {'teacher_create': True,
'school_id': teacher_id.school_id.company_id.id}
user_rec = user_obj.with_context(ctx_vals).create(user_vals)
teacher_id.employee_id.write({'user_id': user_rec.id})
# if vals.get('is_parent'):
# self.parent_crt(teacher_id)
return teacher_id
# Removing this code because of issue faced due to email id of the
# user is same for parent and Teacher, and system will not allow it.
# now user shuld create Parent record first and then select it in
# related parent in Teacher Profile. - Anu Patel (24/03/2021)
# def parent_crt(self, manager_id):
# """Method to create parent record based on parent field"""
# stu_parent = []
# if manager_id.stu_parent_id:
# stu_parent = manager_id.stu_parent_id
# if not stu_parent:
# emp_user = manager_id.employee_id
# students = [stu.id for stu in manager_id.student_id]
# parent_vals = {'name': manager_id.name,
# 'email': emp_user.work_email,
# 'user_ids': [(6, 0, [emp_user.user_id.id])],
# 'partner_id': emp_user.user_id.partner_id.id,
# 'student_id': [(6, 0, students)]}
# stu_parent = self.env['school.parent'].with_context().create(parent_vals)
# manager_id.write({'stu_parent_id': stu_parent.id})
# user = stu_parent.user_ids
# user_rec = user[0]
# parent_grp_id = self.env.ref('school.group_school_parent')
# groups = parent_grp_id
# if user_rec.groups_id:
# groups = user_rec.groups_id
# groups += parent_grp_id
# group_ids = [group.id for group in groups]
# user_rec.write({'groups_id': [(6, 0, group_ids)]})
def write(self, vals):
"""Inherited write method to assign groups based on parent field"""
# if vals.get('is_parent'):
# self.parent_crt(self)
if vals.get('student_id'):
self.stu_parent_id.write({'student_id': vals.get('student_id')})
if not vals.get('is_parent'):
user_rec = self.employee_id.user_id
ir_obj = self.env['ir.model.data']
parent_grp_id = ir_obj.get_object('school', 'group_school_parent')
groups = parent_grp_id
if user_rec.groups_id:
groups = user_rec.groups_id
groups -= parent_grp_id
group_ids = [group.id for group in groups]
user_rec.write({'groups_id': [(6, 0, group_ids)]})
return super(SchoolTeacher, self).write(vals)
@api.onchange('address_id')
def onchange_address_id(self):
"""Onchange method for address."""
self.work_phone = self.address_id.phone or False,
self.mobile_phone = self.address_id.mobile or False
@api.onchange('department_id')
def onchange_department_id(self):
"""Onchange method for deepartment."""
self.parent_id = (self.department_id and
self.department_id.manager_id and
self.department_id.manager_id.id) or False
@api.onchange('user_id')
def onchange_user(self):
"""Onchange method for user."""
if self.user_id:
self.name = self.name or self.user_id.name
self.work_email = self.user_id.email
self.image = self.image or self.user_id.image
@api.onchange('school_id')
def onchange_school(self):
"""Onchange method for school."""
self.address_id = self.school_id.company_id.partner_id.id or \
False
self.mobile_phone = self.school_id.company_id.partner_id.mobile or \
False
self.work_location = self.school_id.company_id.partner_id.city or \
False
self.work_email = self.school_id.company_id.partner_id.email or False
phone = self.school_id.company_id.partner_id.phone or False
self.work_phone = phone or False
self.phone_numbers = phone or False
phone = self.school_id.company_id.partner_id.phone or False
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="identity_card">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page" style="height: 2px;">
<div class="oe_structure"/>
<br/>
<br/>
<br/>
<br/>
<br/>
<t t-foreach="o" t-as="student">
<br/><br/><br/>
<table width="25%" height="50px" style="border: 3px solid black;">
<tr>
<td width="100%" align="center" height="30">
<strong>
<span t-field="student.school_id.name" />
</strong>
</td>
</tr>
<tr>
<td align="center">
<img t-if="student.photo" t-att-src="'data:image/png;base64,%s' % to_text(student.photo)"
style="height:120px;width=120px" />
</td>
</tr>
<tr>
<td height="10px"></td>
</tr>
<tr>
<td align="center" height="30px">
<strong>
<span t-field="student.name" />
</strong>
<strong>
<span t-field="student.middle" />
</strong>
<strong>
<span t-field="student.last" />
</strong>
</td>
</tr>
<tr>
<td height="130">
<table width="100%">
<tr>
<td style="font-family: 'Helvetica';padding-left:20px;">
<strong>Roll No.</strong>
</td>
<td>
<strong>: </strong>
</td>
<td>
<span t-field="student.roll_no" />
</td>
</tr>
<tr>
<td style="font-family: 'Helvetica';padding-left:20px;">
<strong>Standard</strong>
</td>
<td>
<strong>: </strong>
</td>
<td>
<span t-field="student.standard_id.standard_id.name"/>
</td>
</tr>
<tr>
<td style="font-family: 'Helvetica';padding-left:20px;">
<strong>Division</strong>
</td>
<td>
<strong>: </strong>
</td>
<td>
<span t-field="student.standard_id.division_id.name"/>
</td>
</tr>
<tr>
<td style="font-family: 'Helvetica';padding-left:20px;">
<strong>Medium</strong>
</td>
<td>
<strong>: </strong>
</td>
<td>
<span t-field="student.medium_id.name" />
</td>
</tr>
<tr>
<td style="font-family: 'Helvetica';padding-left:20px;">
<strong>BirthDate</strong>
</td>
<td>
<strong>: </strong>
</td>
<td>
<span t-field="student.date_of_birth" />
</td>
</tr>
<tr>
<td style="font-family: 'Helvetica';padding-left:20px;">
<strong>Blood Group</strong>
</td>
<td>
<strong>: </strong>
</td>
<td>
<span t-field="student.blood_group" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</t>
</div>
</t>
</t>
</t>
</template>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="report_student_student" model="ir.actions.report">
<field name="name">Identity Card</field>
<field name="model">student.student</field>
<field name="binding_model_id" ref="model_student_student"/>
<field name="report_type">qweb-pdf</field>
<field name="report_name">school.identity_card</field>
<field name="report_file">school.identity_card</field>
<field name="binding_type">report</field>
<field name="groups_id" eval="[(4, ref('school.group_school_administration')),
(4, ref('school.group_school_teacher')),
(4, ref('school.group_school_student'))]"/>
</record>
</odoo>
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_academic_year_admin,academic.year,model_academic_year,group_school_administration,1,1,1,1
access_academic_month_admin,academic.month,model_academic_month,group_school_administration,1,1,1,1
access_standard_medium_admin,standard.medium,model_standard_medium,group_school_administration,1,1,1,1
access_standard_division_admin,standard.division,model_standard_division,group_school_administration,1,1,1,1
access_subject_subject_admin,subject.subject,model_subject_subject,group_school_administration,1,1,1,1
access_school_school_admin,school.school,model_school_school,group_school_administration,1,1,1,1
access_standard_standard_admin,standard.standard,model_standard_standard,group_school_administration,1,1,1,1
access_school_standard_admin,school.standard,model_school_standard,group_school_administration,1,1,1,1
access_student_student_admin,student.student,model_student_student,group_school_administration,1,1,1,1
access_hr_employee_admin,school.teacher,model_school_teacher,group_school_administration,1,1,1,1
access_res_partner_admin,school.parent,model_school_parent,group_school_administration,1,1,1,1
access_student_reference_admin,student.reference,model_student_reference,group_school_administration,1,1,1,1
access_student_previous_school_admin,student.previous.school,model_student_previous_school,group_school_administration,1,1,1,1
access_subject_elective_admin,subject.elective,model_subject_elective,group_school_administration,1,1,1,1
access_mother_toungue_admin,mother.toungue,model_mother_toungue,group_school_administration,1,1,1,1
access_student_award_admin,student.award,model_student_award,group_school_administration,1,1,1,1
access_attendance_type_admin,attendance.type,model_attendance_type,group_school_administration,1,1,1,1
access_student_document_admin,student.document,model_student_document,group_school_administration,1,1,1,1
access_document_type_admin,document.type,model_document_type,group_school_administration,1,1,1,1
access_student_description_admin,student.description,model_student_description,group_school_administration,1,1,1,1
access_student_descipline_admin,student.descipline,model_student_descipline,group_school_administration,1,1,1,1
access_student_history_admin,student.history,model_student_history,group_school_administration,1,1,1,1
access_student_certificate_admin,student.certificate,model_student_certificate,group_school_administration,1,1,1,1
access_academic_subject_admin,academic.subject,model_academic_subject,group_school_administration,1,1,1,1
access_student_family_contact_admin,student.family.contact,model_student_family_contact,group_school_administration,1,1,1,1
access_student_relation_master_admin,student.relation.master,model_student_relation_master,group_school_administration,1,1,1,1
access_grade_master_admin,grade.master,model_grade_master,group_school_administration,1,1,1,1
access_grade_line_admin,grade.line,model_grade_line,group_school_administration,1,1,1,1
access_admin_news_admin,student.news,school.model_student_news,group_school_administration,1,1,1,1
access_admin_reminder_admin,student.reminder,school.model_student_reminder,group_school_administration,1,1,1,1
access_student_cast_admin,student.cast,model_student_cast,group_school_administration,1,1,1,1
access_res_users_admin,res.users,base.model_res_users,group_school_administration,1,1,1,1
access_subject_syllabus_admin,subject.syllabus,model_subject_syllabus,group_school_administration,1,1,1,1
access_academic_year_parent,academic.year,model_academic_year,group_school_parent,1,0,0,0
access_academic_month_parent,academic.month,model_academic_month,group_school_parent,1,0,0,0
access_standard_medium_parent,standard.medium,model_standard_medium,group_school_parent,1,0,0,0
access_standard_division_parent,standard.division,model_standard_division,group_school_parent,1,0,0,0
access_subject_subject_parent,subject.subject,model_subject_subject,group_school_parent,1,0,0,0
access_school_school_parent,school.school,model_school_school,group_school_parent,1,0,0,0
access_standard_standard_parent,standard.standard,model_standard_standard,group_school_parent,1,0,0,0
access_school_standard_parent,school.standard,model_school_standard,group_school_parent,1,0,0,0
access_student_student_parent,student.student,model_student_student,group_school_parent,1,0,0,0
access_subject_elective_parent,subject.elective,model_subject_elective,group_school_parent,1,0,0,0
access_mother_toungue_parent,mother.toungue,model_mother_toungue,group_school_parent,1,0,0,0
access_student_award_parent,student.award,model_student_award,group_school_parent,1,0,0,0
access_attendance_type_parent,attendance.type,model_attendance_type,group_school_parent,1,0,0,0
access_student_document_parent,student.document,model_student_document,group_school_parent,1,0,0,0
access_document_type_parent,document.type,model_document_type,group_school_parent,1,0,0,0
access_student_description_parent,student.description,model_student_description,group_school_parent,1,0,0,0
access_student_descipline_parent,student.descipline,model_student_descipline,group_school_parent,1,0,0,0
access_student_history_parent,student.history,model_student_history,group_school_parent,1,0,0,0
access_student_certificate_parent,student.certificate,model_student_certificate,group_school_parent,1,0,0,0
access_res_partner_parent,school.parent,model_school_parent,group_school_parent,1,1,0,0
access_academic_subject_parent,academic.subject,model_academic_subject,group_school_parent,1,0,0,0
access_student_family_contact_parent,student.family.contact,model_student_family_contact,group_school_parent,1,0,0,0
access_student_relation_master_parent,student.relation.master,model_student_relation_master,group_school_parent,1,0,0,0
access_grade_master_parent,grade.master,model_grade_master,group_school_parent,1,0,0,0
access_grade_line_parent,grade.line,model_grade_line,group_school_parent,1,0,0,0
access_teacher_reminder_parent,student.reminder,model_student_reminder,group_school_parent,1,0,0,0
access_student_cast_parent,student.cast,model_student_cast,group_school_parent,1,0,0,0
access_hr_employee_parent,school.teacher,model_school_teacher,group_school_parent,1,0,0,0
access_student_reference_parent,student.reference,model_student_reference,group_school_parent,1,0,0,0
access_student_previous_school_parent,student.previous.school,model_student_previous_school,group_school_parent,1,0,0,0
access_parent_news_parent,student.news,model_student_news,group_school_parent,1,0,0,0
access_subject_syllabus_parent,subject.syllabus,model_subject_syllabus,group_school_parent,1,0,0,0
access_res_users_parents,res.users,base.model_res_users,group_school_parent,1,0,0,0
access_standard_medium_student,standard.medium,school.model_standard_medium,group_school_student,1,0,0,0
access_subject_subject_student,subject.subject,school.model_subject_subject,group_school_student,1,0,0,0
access_school_school_student,school.school,school.model_school_school,group_school_student,1,0,0,0
access_hr_employee_student,school.teacher,model_school_teacher,group_school_student,1,0,0,0
access_subject_elective_student,subject.elective,model_subject_elective,group_school_student,1,0,0,0
access_mother_toungue_student,mother.toungue,school.model_mother_toungue,group_school_student,1,0,0,0
access_attendance_type_student,attendance.type,model_attendance_type,group_school_student,1,0,0,0
access_document_type_student,document.type,model_document_type,group_school_student,1,0,0,0
access_res_partner_student,school.parent,model_school_parent,group_school_student,1,0,0,0
access_academic_subject_student,academic.subject,model_academic_subject,group_school_student,1,0,0,0
access_student_relation_master_student,student.relation.master,model_student_relation_master,group_school_student,1,1,0,0
access_student_cast_student,student.cast,school.model_student_cast,group_school_student,1,1,0,0
access_student_history_stu,student.history,school.model_student_history,group_school_student,1,0,0,0
access_student_descipline_student,student.descipline,model_student_descipline,group_school_student,1,0,0,0
access_student_document_student,student.document,model_student_document,group_school_student,1,0,0,0
access_student_reminder_student,student.reminder,model_student_reminder,group_school_student,1,1,1,1
access_student_description_student,student.description,school.model_student_description,group_school_student,1,0,0,0
access_student_news_student,student.news,model_student_news,group_school_student,1,1,1,0
access_student_certificate_studnet,student.certificate,school.model_student_certificate,group_school_student,1,0,0,0
access_student_award_student,student.award,school.model_student_award,group_school_student,1,0,0,0
access_student_previous_school_student,student.previous.school,school.model_student_previous_school,group_school_student,1,0,0,0
access_student_family_contact_student,student.family.contact,school.model_student_family_contact,group_school_student,1,0,0,0
access_student_reference_student,student.reference,school.model_student_reference,group_school_student,1,0,0,0
access_student_student_user,student.student,school.model_student_student,group_school_student,1,0,0,0
access_academic_month_student,academic.month,school.model_academic_month,group_school_student,1,0,0,0
access_academic_year_student,academic.year,school.model_academic_year,group_school_student,1,0,0,0
access_grade_master_sudent,grade.master,school.model_grade_master,group_school_student,1,0,0,0
access_standard_division_student,standard.division,school.model_standard_division,group_school_student,1,0,0,0
access_standard_standard_student,standard.standard,school.model_standard_standard,group_school_student,1,0,0,0
access_grade_line_student,grade.line,school.model_grade_line,group_school_student,1,0,0,0
access_school_standard_user_student,school.standard,school.model_school_standard,group_school_student,1,0,0,0
access_subject_syllabus_student,subject.syllabus,model_subject_syllabus,group_school_student,1,0,0,0
access_academic_year_teacher,academic.year,model_academic_year,group_school_teacher,1,0,0,0
access_academic_month_teacher,academic.month,model_academic_month,group_school_teacher,1,0,0,0
access_standard_medium_teacher,standard.medium,model_standard_medium,group_school_teacher,1,1,1,0
access_standard_division_teacher,standard.division,model_standard_division,group_school_teacher,1,1,1,0
access_subject_subject_teacher,subject.subject,model_subject_subject,group_school_teacher,1,0,0,0
access_school_school_teacher,school.school,model_school_school,group_school_teacher,1,0,0,0
access_standard_standard_teacher,standard.standard,model_standard_standard,group_school_teacher,1,1,1,0
access_school_standard_teacher,school.standard,model_school_standard,group_school_teacher,1,0,0,0
access_student_student_teacher,student.student,model_student_student,group_school_teacher,1,1,0,0
access_subject_elective_teacher,subject.elective,model_subject_elective,group_school_teacher,1,1,1,0
access_hr_employee_teacher,school.teacher,model_school_teacher,group_school_teacher,1,1,0,0
access_student_reference_teacher,student.reference,model_student_reference,group_school_teacher,1,1,1,0
access_student_previous_school_teacher,student.previous.school,model_student_previous_school,group_school_teacher,1,1,1,0
access_mother_toungue_teacher,mother.toungue,model_mother_toungue,group_school_teacher,1,0,0,0
access_attendance_type_teacher,attendance.type,model_attendance_type,group_school_teacher,1,1,1,0
access_student_award_teacher,student.award,model_student_award,group_school_teacher,1,1,1,0
access_student_document_teacher,student.document,model_student_document,group_school_teacher,1,1,1,0
access_document_type_teacher,document.type,model_document_type,group_school_teacher,1,1,1,0
access_student_description_teacher,student.description,model_student_description,group_school_teacher,1,1,1,0
access_res_partner_teacher,school.parent,model_school_parent,group_school_teacher,1,0,0,0
access_student_descipline_teacher,student.descipline,model_student_descipline,group_school_teacher,1,1,1,0
access_student_history_teacher,student.history,model_student_history,group_school_teacher,1,1,1,0
access_student_certificate_teacher,student.certificate,model_student_certificate,group_school_teacher,1,1,1,0
access_academic_subject_teacher,academic.subject,model_academic_subject,group_school_teacher,1,1,1,0
access_student_family_contact_teacher,student.family.contact,model_student_family_contact,group_school_teacher,1,0,0,0
access_student_relation_master_teacher,student.relation.master,model_student_relation_master,group_school_teacher,1,0,0,0
access_grade_master_teacher,grade.master,model_grade_master,group_school_teacher,1,1,1,0
access_grade_line_teacher,grade.line,model_grade_line,group_school_teacher,1,1,1,0
access_student_cast_teacher,student.cast,model_student_cast,group_school_teacher,1,0,0,0
access_teacher_news_teacher,student.news,model_student_news,group_school_teacher,1,1,1,1
access_teacher_reminder_teacher,student.reminder,model_student_reminder,group_school_teacher,1,1,1,1
access_subject_syllabus_teacher,subject.syllabus,model_subject_syllabus,group_school_teacher,1,1,1,0
access_resource_resource_teacher,resource.resource,resource.model_resource_resource,group_school_teacher,1,1,0,0
access_res_users_teacher,res.users,base.model_res_users,group_school_teacher,1,1,0,0
access_student_in_admission,student.student,model_student_student,group_is_admission,1,0,0,0
access_standard_medium_student_is_admission,standard.medium,school.model_standard_medium,group_is_admission,1,0,0,0
access_subject_subject_student_is_admission,subject.subject,school.model_subject_subject,group_is_admission,1,0,0,0
access_school_school_student_is_admission,school.school,school.model_school_school,group_is_admission,1,0,0,0
access_hr_employee_student_is_admissions,school.teacher,model_school_teacher,group_is_admission,1,0,0,0
access_subject_elective_student_is_admissions,subject.elective,model_subject_elective,group_is_admission,1,0,0,0
access_mother_toungue_student_is_admission,mother.toungue,school.model_mother_toungue,group_is_admission,1,0,0,0
access_attendance_type_student_is_admission,attendance.type,model_attendance_type,group_is_admission,1,0,0,0
access_document_type_student_is_admission,document.type,model_document_type,group_is_admission,1,0,0,0
access_res_partner_student_isadmission,school.parent,model_school_parent,group_is_admission,1,0,0,0
access_academic_subject_student_is_admission,academic.subject,model_academic_subject,group_is_admission,1,0,0,0
access_student_relation_master_student_is_admission,student.relation.master,model_student_relation_master,group_is_admission,1,1,0,0
access_student_cast_student_is_admision,student.cast,school.model_student_cast,group_is_admission,1,1,0,0
access_student_history_stu_admission,student.history,school.model_student_history,group_is_admission,1,0,0,0
access_student_descipline_student_is_addmision,student.descipline,model_student_descipline,group_is_admission,1,0,0,0
access_student_document_student_admission,student.document,model_student_document,group_is_admission,1,0,0,0
access_student_reminder_student_is_admission,student.reminder,model_student_reminder,group_is_admission,1,1,1,1
access_student_description_student_is_admissions,student.description,school.model_student_description,group_is_admission,1,0,0,0
access_student_news_student_in_admission,student.news,model_student_news,group_is_admission,1,0,0,0
access_student_certificate_studnet_in_admission,student.certificate,school.model_student_certificate,group_is_admission,1,0,0,0
access_student_award_student_admission,student.award,school.model_student_award,group_is_admission,1,0,0,0
access_student_previous_school_student_is_admision,student.previous.school,school.model_student_previous_school,group_is_admission,1,0,0,0
access_student_family_contact_student_isadmission,student.family.contact,school.model_student_family_contact,group_is_admission,1,0,0,0
access_student_reference_student_admissions,student.reference,school.model_student_reference,group_is_admission,1,0,0,0
access_student_student_user_in_admisions,student.student,school.model_student_student,group_is_admission,1,1,0,0
access_academic_month_student_is_admission,academic.month,school.model_academic_month,group_is_admission,1,0,0,0
access_academic_year_student_admissionss,academic.year,school.model_academic_year,group_is_admission,1,0,0,0
access_grade_master_sudent_admission_school,grade.master,school.model_grade_master,group_is_admission,1,0,0,0
access_standard_division_student_is_school_admission,standard.division,school.model_standard_division,group_is_admission,1,0,0,0
access_standard_standard_student_admission_school,standard.standard,school.model_standard_standard,group_is_admission,1,0,0,0
access_grade_line_student_admission_is,grade.line,school.model_grade_line,group_is_admission,1,0,0,0
access_school_standard_user_student_inadmission_school,school.standard,school.model_school_standard,group_is_admission,1,0,0,0
access_subject_syllabus_student_admission_student,subject.syllabus,model_subject_syllabus,group_is_admission,1,0,0,0
access_class_room_teacher,class.room,model_class_room,group_school_teacher,1,0,0,0
access_class_room_admin,class.room,model_class_room,group_school_administration,1,1,1,1
access_parent_relation_admin,parent.relation,school.model_parent_relation,group_school_administration,1,1,1,1
access_parent_relation_student,parent.relation,school.model_parent_relation,group_school_student,1,0,0,0
access_parent_relation_parent_grp,parent.relation,school.model_parent_relation,group_school_parent,1,1,1,0
access_parent_relation_teacher_grp,parent.relation,school.model_parent_relation,group_school_teacher,1,0,0,0
,,,,,,,
access_assign_roll_no,assign.roll.no,model_assign_roll_no,group_school_administration,1,1,1,1
access_move_standards,move.standards,model_move_standards,group_school_administration,1,1,1,1
access_terminate_reason,terminate.reason,model_terminate_reason,group_school_administration,1,1,1,1
access_send_mail,send.mail,model_send_email,group_school_administration,1,1,1,1
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="module_category_school" model="ir.module.category">
<field name="name">School Management</field>
<field name="sequence">22</field>
</record>
<record id="group_school_administration" model="res.groups">
<field name="name">School Administrator</field>
<field name="category_id" ref="module_category_school"/>
<field name="users" eval="[(4, ref('base.user_root')),(4, ref('base.user_admin'))]"/>
</record>
<record id="group_school_teacher" model="res.groups">
<field name="name">School Teacher</field>
<field name="category_id" ref="module_category_school"/>
</record>
<record id="group_school_student" model="res.groups">
<field name="name">School Student</field>
<field name="category_id" ref="module_category_school"/>
</record>
<record id="group_school_parent" model="res.groups">
<field name="name">Student Parent</field>
<field name="category_id" ref="module_category_school"/>
</record>
<record id="group_is_admission" model="res.groups">
<field name="name">In Admission</field>
<field name="category_id" ref="module_category_school"/>
</record>
<!-- Rule For Creating Personal School Record As A Teacher, Student & Parent-->
<record id="rule_personal_school_record" model="ir.rule">
<field name="name">Rule Personal School Record</field>
<field name="model_id" ref="model_school_school"/>
<field name="domain_force">['|','|',('company_id.child_ids', 'child_of', [user.company_id.id]),('company_id', 'child_of', [user.company_id.id]),('company_id', '=', False)]</field>
<field name="groups" eval="[(4, ref('group_school_teacher')),(4, ref('group_school_student')),(4, ref('group_school_parent'))]"/>
</record>
<!-- Rule For Student Profile Record As A Student -->
<record id="rule_student_profile_record_as_student" model="ir.rule">
<field name="name">Rule Student Profile Record As A Student</field>
<field name="model_id" ref="model_student_student"/>
<field name="global" eval="True"/>
<field name="domain_force">[('user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('group_school_student'))]"/>
</record>
<!-- Rule For Student Profile Record As An Administrator -->
<record id="rule_student_profile_record_as_admin" model="ir.rule">
<field name="name">Rule Student Profile Record As An Administrator</field>
<field name="model_id" ref="model_student_student"/>
<field name="global" eval="True"/>
<field name="domain_force"> ['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
<field name="groups" eval="[(4, ref('group_school_administration'))]"/>
</record>
<!-- Rule For Student Profile Record As A Teacher -->
<record id="rule_student_profile_record_as_teacher" model="ir.rule">
<field name="name">Rule Student Profile Record As A Teacher</field>
<field name="model_id" ref="model_student_student"/>
<field name="global" eval="True"/>
<field name="domain_force">[('company_id','=',user.company_id.id)]</field>
<field name="groups" eval="[(4, ref('group_school_teacher'))]"/>
</record>
<!-- Rule For Student Profile Record As A Parent -->
<!-- <record id="rule_student_profile_record_as_parent" model="ir.rule"> -->
<!-- <field name="name">Rule Student Profile Record As A Parent</field> -->
<!-- <field name="model_id" ref="model_student_student"/> -->
<!-- <field name="global" eval="True"/> -->
<!-- <field name="domain_force"> [('id','in', user.partner_id.student_ids.ids)]</field> -->
<!-- <field name="groups" eval="[(4, ref('group_school_parent'))]"/> -->
<!-- </record> -->
<record id="rule_student_profile_record_as_parent" model="ir.rule">
<field name="name">Rule Student Profile Record As A Parent</field>
<field name="model_id" ref="model_student_student"/>
<field name="global" eval="True"/>
<field name="domain_force"> [('parent_id.partner_id','=',user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('group_school_parent'))]"/>
</record>
<!-- Rule For School Standard Record As An Administrator -->
<record id="rule_school_standard_record_as_admin" model="ir.rule">
<field name="name">Rule School Standard Record As An Administrator</field>
<field name="model_id" ref="model_school_standard"/>
<field name="global" eval="True"/>
<field name="domain_force"> ['|','|',('cmp_id.child_ids','child_of',[user.company_id.id]),('cmp_id','child_of',[user.company_id.id]),('cmp_id','=',False)]</field>
<field name="groups" eval="[(4, ref('group_school_administration'))]"/>
</record>
<!-- Record Rule teacher can see standards related to school -->
<record id="rule_school_standard_teacher" model="ir.rule">
<field name="name">Teacher School Standard Record Rule</field>
<field name="model_id" ref="model_school_standard"/>
<field name="global" eval="True"/>
<field name="domain_force">[('school_id.company_id','=',user.company_id.id)]</field>
<field name="groups" eval="[(4, ref('group_school_teacher'))]"/>
</record>
<!-- Rule For News Update Record As A Student & Teacher -->
<record id="rule_student_news_update_record" model="ir.rule">
<field name="name">Rule News Update Record</field>
<field name="model_id" ref="model_student_news"/>
<field name="global" eval="True"/>
<field name="domain_force">[('user_ids.id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_student')),(4, ref('school.group_school_teacher'))]"/>
</record>
<!-- Record Rule parents can see reminder of own child -->
<record id="parents_reminder_record_rule" model="ir.rule">
<field name="name">Parents Reminder Record Rule</field>
<field name="model_id" ref="model_student_reminder"/>
<field name="global" eval="True"/>
<field name="domain_force">[('stu_id.parent_id.partner_id','=',user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_parent'))]"/>
</record>
<!-- Record Rule student can see reminder of their own -->
<record id="student_reminder_record_rule" model="ir.rule">
<field name="name">Student Remainder Record Rule</field>
<field name="model_id" ref="model_student_reminder"/>
<field name="global" eval="True"/>
<field name="domain_force">[('stu_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_student'))]"/>
</record>
<!-- Rule For School Teacher -->
<!-- <record id="rule_school_teacher_own" model="ir.rule"> -->
<!-- <field name="name">Rule School Teacher Self</field> -->
<!-- <field name="model_id" ref="hr.model_hr_employee"/> -->
<!-- <field name="global" eval="True"/> -->
<!-- <field name="domain_force"> [('user_id','=',user.id)]</field> -->
<!-- <field name="groups" eval="[(4, ref('school.group_school_teacher'))]"/> -->
<!-- </record> -->
<record id="rule_personal_school_teacher" model="ir.rule">
<field name="name">Rule Personal teacher Record</field>
<field name="model_id" ref="model_school_teacher"/>
<field name="domain_force">[('employee_id.user_id.id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('group_school_teacher'))]"/>
</record>
<!-- Rule For Parent Profile Record As A Parent -->
<record id="rule_school_parents" model="ir.rule">
<field name="name">Rule Parent Profile Record As A Parent</field>
<field name="model_id" ref="model_school_parent"/>
<field name="global" eval="True"/>
<field name="domain_force"> [('partner_id','=', user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_parent'))]"/>
</record>
<!-- Record Rule student can see own parent -->
<record id="rule_stud_parent" model="ir.rule">
<field name="name">Record rule student can see own parent</field>
<field name="model_id" ref="model_school_parent"/>
<field name="global" eval="True"/>
<field name="domain_force"> [('student_id.user_id','=', user.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_student'))]"/>
</record>
<!-- Rule For Student Profile Record in Adminssion -->
<record id="rule_student_profile_record_as_student_in_admisssion" model="ir.rule">
<field name="name">Rule Student Profile Record As A Student for in Adminssion </field>
<field name="model_id" ref="model_student_student"/>
<field name="global" eval="True"/>
<field name="domain_force">[('user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('group_is_admission'))]"/>
</record>
</data>
</odoo>
<section class="oe_container oe_dark">
<div class='oe_row oe_cover'>
<a href="http://www.serpentcs.com" target="new" ><img src="serpent_logo.png" align="right"></a>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B">School Management Made Easy</h2><br>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Configuration of School in just a few clicks
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="school_config.gif">
</div>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Create and Configure your school, classes, subjects and mediums from one screen. Academic year wise management of school.
</p>
</div>
</div>
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Student Management
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<p class='oe_mt32'>
Drive your Student operations from admission registers to student profiles with all the information
you need, easily accessible. Keep track of students, school, automate reminder, news
and update on Dash board when they have things to do.
</p>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="newschool.gif">
</div>
</div>
</div>
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Fully Integrated
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="student_info.gif">
</div>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
The information your need, where you need it<br/><br/>
Saving time for review student's personal info, family info, awards, certificates and remarks
related information; they are all conveniently accessible when
viewing student.
</p>
</div>
</div>
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Your Grade System
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<p class='oe_mt32'>
Load and Manage grade system of your school.
</p>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="04_grade_system.png">
</div>
</div>
</div>
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Students Reminder
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="05_new_updates.png">
</div>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Manage and Get reminders about things going to be happen.
</p>
</div>
</div>
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Teacher Profile
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<p class='oe_mt32'>
Manage teacher profile and subjects assigned to teacher.
</p>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="teacher2.gif">
</div>
</div>
</div>
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Parents Profile
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="parents.png">
</div>
</div>
<div class="oe_span6">
<p class='oe_mt32'>
Manage parent profile of the student.
</p>
</div>
</div>
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h4 class="oe_slogan" style="margin-top:20px;margin-bottom:20px">
<span class="label label-class" style="background:#875A7B;color:#ffffff">
Student Identity Card
</span>
</h4>
<h2 class="oe_slogan"></h2>
<div class="oe_span6">
<p class='oe_mt32'>
User can print Identity Card of student.
</p>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="identitycard.png">
</div><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
</div>
<div class="oe_row" style="background:#f3f0f0;padding-top: 2px;padding-bottom: 2px">
<h3 class="oe_slogan">Easy to use</h3>
<div class="oe_centeralign oe_mt32">
<a href="http://serpentcs.in/product/education-management-system" class="oe_button oe_big oe_tacky" target="_blank">Demo of System</a>
<br/><br/>
</div>
</div>
</section>
<section class="oe_container">
<table style="font-family: 'Helvetica Neue', Helvetica, Arial,sans-serif;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td colspan="2" style="font-size:16px; color:#d74930; font-weight:bold;" width="100%" align="center">
<span class="fa fa-certificate fa-1x" style="color:#697582;">Check out our various Odoo Services below</span>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
<table style="font-size:11px; color:#697582; line-height:20px;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/consulting" style="color:#697582; text-decoration:none;">Odoo Consulting</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/gap-analysis" style="color:#697582; text-decoration:none;">Gap Analysis and BPR</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/implementation" style="color:#697582; text-decoration:none;">Odoo Implementation</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/ecommerce-integrations/magento-integration" style="color:#697582; text-decoration:none;">Integration with E-Commerce</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/trainings/openerp-odoo-technical-training" style="color:#697582; text-decoration:none;">Odoo Technical Training</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/offshore-development-partnership" style="color:#697582; text-decoration:none;">Offshore & Onsite Development</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/odoo-packages/odoo-support-package" style="color:#697582; text-decoration:none;">Support and Maintenance</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/hire-odoo-openerp-developer" style="color:#697582; text-decoration:none;">Hire Dedicated Odoo Developer</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/ecommerce-integrations/paymentech-elavon-paypal-integration" style="color:#697582; text-decoration:none;">Payment Gateway Integrations</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/trainings/openerpodoo-functional-training" style="color:#697582; text-decoration:none;">Odoo Functional Training</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/community/aios-mobile-client" style="color:#697582; text-decoration:none;">Odoo Mobile App Development</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.odooqa.com/page/manual-functional-testing" style="color:#697582; text-decoration:none;">Odoo Manual Testing</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.odooqa.com/page/automated-functional-testing" style="color:#697582; text-decoration:none;">Odoo Automated Testing</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/ecommerce-integrations/fedex-ups-usps-integration" style="color:#697582; text-decoration:none;">Integration with Shipping API</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/installation-and-hosting" style="color:#697582; text-decoration:none;">Installation & Hosting</a></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2" style="font-size:16px; color:#d74930; font-weight:bold;" width="100%" align="center">
<span class="fa fa-certificate fa-1x" style="color:#697582;">Check out our various Odoo Based Products</span>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
<table style="font-size:11px; color:#697582; line-height:20px;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="20%"><span class="fa fa-coffee fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/restaurant-management-system" style="color:#697582; text-decoration:none;">Restaurant Management</a></span></td>
<td width="20%"><span class="fa fa-building fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/property-management-system" style="color:#697582; text-decoration:none;">Property Management</a></span></td>
<td width="20%"><span class="fa fa-plane fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/visa-management-system" style="color:#697582; text-decoration:none;">Visa Agency Management</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/odoo-singapore-localization" style="color:#697582; text-decoration:none;">Singapore Localization</a></span></td>
<td width="20%"><span class="fa fa-graduation-cap fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/education-management-system" style="color:#697582; text-decoration:none;">School, University Management</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-cubes fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/construction-management-system" style="color:#697582; text-decoration:none;">Construction Management</a></span></td>
<td width="20%"><span class="fa fa-bus fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/fleet-management-systems" style="color:#697582; text-decoration:none;">Fleet Management</a></span></td>
<td width="20%"><span class="fa fa-stethoscope fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/healthcare-management-software" style="color:#697582; text-decoration:none;">Medical ERP</a></span></td>
<td width="20%"><span class="fa fa-hotel fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/hotel-management-system" style="color:#697582; text-decoration:none;">Hotel Management</a></span></td>
<td width="20%"><span class="fa fa-users fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/human-resource-management-system" style="color:#697582; text-decoration:none;">Human Resource Management</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-map-marker fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/odoo-fieldstaff-tracking-system" style="color:#697582; text-decoration:none;">Field Service Management</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/spa-salon-management-system" style="color:#697582; text-decoration:none;">Spa & Salone Management</a></span></td>
<td width="20%"><span class="fa fa-phone fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/odoo-ringcentral-integration" style="color:#697582; text-decoration:none;">Ringcentral telephone integration</a></span></td>
<td width="20%"><span class="fa fa-heart fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/customer-relationship-management" style="color:#697582; text-decoration:none;">Customer Relationship Management</a></span></td>
<td width="20%"><span class="fa fa-user fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/talent-management-system" style="color:#697582; text-decoration:none;">Talent Management</a></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2" style="font-size:16px; color:#d74930; font-weight:bold;" width="100%" align="center">
<span class="fa fa-certificate fa-1x" style="color:#697582;">For any questions, support and development contact us.</span>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
<table style="font-size:11px; color:#697582; line-height:20px;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="38%"><span class="fa fa-whatsapp fa-1x" style="color:#697582;"> (+91) 98793-54457, (+91) 90334-72982 </span>
<span class="fa fa-phone fa-1x" style="color:#697582;"> +91-79-2975-0867</span></td>
<td width="17%"><span class="fa fa-envelope fa-1x" style="color:#697582;"> <a href="mailto:contact@serpentcs.com" style="color:#697582; text-decoration:none;">contact@serpentcs.com</a></span></td>
<td width="15%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com" style="color:#697582; text-decoration:none;">www.serpentcs.com</a></span></td>
<td width="15%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.in" style="color:#697582; text-decoration:none;">www.serpentcs.in</a></span></td>
<td width="15%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.odooqa.com" style="color:#697582; text-decoration:none;">www.odooqa.com</a></span></td>
</tr>
<tr>
<td width="38%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> WhatsApp, Telegram or Call 24X7</span></td>
<td width="17%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> Help! Send Mail</span></td>
<td width="15%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> Browse our Services</span></td>
<td width="15%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> Browse our Products</span></td>
<td width="15%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> QA Services</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr colspan="2">
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr colspan="2">
<td colspan="2" style="padding-top:9px;">
<a href="https://www.facebook.com/Serpent-Consulting-Services-Pvt-Ltd-299017730141795/" style="text-decoration:none;"><img src="fb.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://twitter.com/Serpent_CS" style="text-decoration:none;"><img src="twitter.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://www.linkedin.com/company-beta/2435682/" style="text-decoration:none;"><img src="in.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://www.youtube.com/user/husendaudi123/videos" style="text-decoration:none;"><img src="youtube.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://www.instagram.com/explore/tags/serpentcs/"style="text-decoration:none;"><img src="insta.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="http://www.serpentcs.com"style="text-decoration:none;"><img src="serpent32.png" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="http://www.serpentcs.in"style="text-decoration:none;"><img src="serpent32.png" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="http://www.odooqa.com"style="text-decoration:none;"><img src="odooqa32.png" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
</td>
</tr>
<tr colspan="2">
<td colspan="2" style="font-size:8px; color:#697582; line-height:15px;padding-top:10px; text-align:justify;">
</td>
</tr>
</tbody>
</table>
</section>
\ No newline at end of file \ No newline at end of file
.o_column_quick_create {
display:none
}
.o_column_delete {
display:none !important;
}
# See LICENSE file for full copyright and licensing details.
# ----------------------------------------------------------
# A Module to School Management System
# ----------------------------------------------------------
from . import test_school
# See LICENSE file for full copyright and licensing details.
from odoo.tests import common
class TestSchool(common.TransactionCase):
def setUp(self):
super(TestSchool, self).setUp()
self.student_student_obj = self.env['student.student']
self.teacher_obj = self.env['school.teacher']
self.parent_obj = self.env['school.parent']
self.school_school_obj = self.env['school.school']
self.school_standard_obj = self.env['school.standard']
self.res_company_obj = self.env['res.company']
self.assign_roll_obj = self.env['assign.roll.no']
self.school_id = self.env.ref('school.demo_school_1')
self.standard_medium = self.env.ref('school.demo_standard_medium_1')
self.year = self.env.ref('school.demo_academic_year_2')
self.currency_id = self.env.ref('base.INR')
self.sch = self.env.ref('school.demo_school_1')
self.country_id = self.env.ref('base.in')
self.std = self.env.ref('school.demo_standard_standard_1')
self.state_id = self.env.ref('base.state_in_gj')
self.subject1 = self.env.ref('school.demo_subject_subject_1')
self.subject2 = self.env.ref('school.demo_subject_subject_2')
self.student_student = self.env.ref('school.demo_student_student_2')
self.student_done = self.env.ref('school.demo_student_student_6')
self.parent = self.env.ref('school.demo_student_parent_1')
student_list = [self.student_done.id]
self.student_student._compute_student_age()
self.student_student.check_age()
self.student_student.admission_done()
self.student_student.set_alumni()
self.parent.student_id = [(6, 0, student_list)]
# Create academic Year
self.academic_year_obj = self.env['academic.year']
self.academic_year = self.academic_year_obj.\
create({'sequence': 7,
'code': '2012',
'name': '2012 Year',
'date_start': '2012-01-01',
'date_stop': '2012-12-31'
})
self.academic_year._check_academic_year()
self.academic_month_obj = self.env['academic.month']
# Academic month created
self.academic_month = self.academic_month_obj.\
create({'name': 'May',
'code': 'may',
'date_start': '2012-05-01',
'date_stop': '2012-05-31',
'year_id': self.academic_year.id
})
self.academic_month._check_duration()
self.academic_month._check_year_limit()
self.assign_roll_no = self.assign_roll_obj.\
create({'standard_id': self.std.id,
'medium_id': self.standard_medium.id
})
self.assign_roll_no.assign_rollno()
def test_school(self):
self.assertEqual(self.student_student.school_id,
self.student_student.standard_id.school_id)
<?xml version="1.0" ?>
<odoo>
<data>
<!-- search View Of Parent's Profiles -->
<record id="view_school_parent_search" model="ir.ui.view">
<field name="name">school.parent.search</field>
<field name="model">school.parent</field>
<field name="arch" type="xml">
<search string="Search Parent">
<field name="name" filter_domain="['|','|',('display_name','ilike',self),('ref','=',self),('email','ilike',self)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
</search>
</field>
</record>
<!-- tree View Of Parent's Profiles -->
<record id="view_school_parent_tree" model="ir.ui.view">
<field name="name">school.parent.tree</field>
<field name="model">school.parent</field>
<field name="arch" type="xml">
<tree string="Parents">
<field name="name"/>
<field name="relation_id"/>
<field name="phone"/>
<field name="email"/>
<field name="city"/>
<field name="country_id"/>
</tree>
</field>
</record>
<!-- Form View Of Parent's Profiles -->
<record id="view_school_parent_form" model="ir.ui.view">
<field name="name">school.parent.form</field>
<field name="model">school.parent</field>
<field name="arch" type="xml">
<form string="Parents">
<sheet>
<field name="type" invisible="1"/>
<!-- <field name="image" widget="image" class="oe_avatar" options="{&quot;preview_image&quot;: &quot;image_medium&quot;, &quot;size&quot;: [90, 90]}"/> -->
<div class="oe_title">
<h1>
<field name="name" default_focus="1" placeholder="Name" attrs="{'required' : [('type', '=', 'contact')]}"/>
</h1>
</div>
<div>
<label for="relation_id"/>
<field name="relation_id"/>
</div>
<group>
<group string="Postal Address" name="postal_address">
<label for="street" string="Address"/>
<div class="o_address_format">
<field name="street" placeholder="Street..." class="o_address_street"/>
<field name="street2" placeholder="Street 2..." class="o_address_street"/>
<field name="city" placeholder="City" class="o_address_city"/>
<field name="state_id" class="o_address_state" placeholder="State"
options="{&quot;no_open&quot;: True}"
context="{'country_id': country_id, 'zip': zip}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
<field name="country_id" placeholder="Country" class="o_address_country"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
</div>
</group>
<group string="Communication" name="communication">
<field name="phone" widget="phone"/>
<field name="mobile" widget="phone"/>
<field name="user_ids" invisible="1"/>
<field name="email" widget="email" required="1"/>
<field name="title" options="{&quot;no_open&quot;: True}"/>
<field name="lang"/>
<field name="category_id" widget="many2many_tags" placeholder="Tags..."/>
</group>
</group>
<notebook>
<page name="children" string="Children">
<field name="student_id" colspan="4" domain="[('state','=','done')]"/>
</page>
<page name="internal_notes" string="Internal Notes">
<field name="comment" placeholder="Internal note..."/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Action View Of school parent-->
<record id="action_school_parent_form" model="ir.actions.act_window">
<field name="name">Parent Profile</field>
<field name="res_model">school.parent</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="menu_res_partner_form" name="Parents" parent="menu_students_parents"
action="action_school_parent_form" sequence="33"
groups="school.group_school_administration,school.group_school_student,school.group_school_teacher,school.group_school_parent"/>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Form View Of Student Reminder -->
<record id="view_student_reminder_form_2" model="ir.ui.view">
<field name="name">student.reminder.form</field>
<field name="model">student.reminder</field>
<field name="arch" type="xml">
<form string="Student Reminder">
<sheet>
<separator string="Reminder" />
<group col="4" colspan="4">
<field name="stu_id" widget="selection" placeholder="Student" domain="[('state','=','done')]"/>
<field name="date" placeholder="Select Date" />
<field name="name" placeholder="Reminder Title" required="1"/>
<newline />
<field name="description" colspan="4" placeholder="Description"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Kanban View Of Student Reminder -->
<record id="student_reminder_kanban_view" model="ir.ui.view">
<field name="name">Student KANBAN</field>
<field name="model">student.reminder</field>
<field name="arch" type="xml">
<kanban default_group_by="date">
<field name="name" />
<field name="date" />
<field name="color" />
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card {{record.group_fancy==1 ? 'oe_kanban_card_fancy' : ''}} oe_kanban_global_click_edit oe_semantic_html_override">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<ul class="oe_dropdown_menu">
<li>
<a type="edit">Edit...</a>
</li>
<li>
<a type="delete">Delete</a>
</li>
<li>
<ul class="oe_kanban_colorpicker" data-field="color" />
</li>
</ul>
</div>
<div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
<table class="oe_kanban_table">
<tr>
<td class="oe_kanban_title1" align="left" valign="middle" style="padding-left:10px;">
<h4>
<a type="open">
<field name="date" />
<field name="name" />
</a>
</h4>
</td>
</tr>
</table>
<br />
</div>
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
<table class="oe_kanban_table">
<tr width="300">
<td valign="top" align="left" style="padding-left:10px;">
<table>
<tr>
<td>Name :</td>
<td style="padding-left:10px;">
<b>
<field name="name" />
</b>
</td>
</tr>
<tr>
<td>Date : </td>
<td style="padding-left:10px;">
<b>
<field name="date" />
</b>
</td>
</tr>
<tr>
<td>Description : </td>
<td style="padding-left:10px;">
<b>
<field name="description" />
</b>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
<div class="oe_kanban_left" style="margin-left:10px;">
<br />
<a role="button" string="Edit" class="btn btn-sm btn-default fa fa-pencil" type="edit" aria-label="edit" title="edit"/>
<a role="button" string="Change Color" icon="color-picker" type="color" name="color" />
</div>
<br class="oe_kanban_clear" />
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Form View Of School Information -->
<record id="view_school_school_form" model="ir.ui.view">
<field name="name">school.school.form</field>
<field name="model">school.school</field>
<field name="arch" type="xml">
<form string="School Information">
<sheet>
<separator string="School Configuration" />
<group col="4" colspan="4">
<field name="name" string="Name" placeholder="School Name" />
<field name="code" placeholder="Code" />
</group>
<group>
<label for="street" string="Address" />
<div class="o_address_format">
<field name="street" class="o_address_street" placeholder="Street..." />
<field name="street2" class="o_address_street" placeholder="Street2..." />
<field name="city" class="o_address_city" placeholder="City" required="1" />
<field name="state_id" class="o_address_state" domain="[('country_id','=',country_id)]" required="1" placeholder="State" options="{&quot;no_open&quot;: true}" />
<field name="zip" class="o_address_zip" placeholder="ZIP" />
<field name="country_id" class="o_address_city,oe_no_button" placeholder="Country" options="{&quot;no_open&quot;: true}" required="1"/>
</div>
</group>
<group col="4" colspan="4">
<field name="currency_id" placeholder="Select Or Create Currency" />
<field name="lang" placeholder="Language"/>
<field name="required_age" required="1"/>
</group>
<notebook colspan="4">
<page string="Standards">
<field name="standards" nolabel="1" colspan="4" readonly="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of School Information -->
<record id="view_school_school_tree" model="ir.ui.view">
<field name="name">school.school.tree</field>
<field name="model">school.school</field>
<field name="arch" type="xml">
<tree string="School Information">
<field name="name" string="School Name" />
<field name="code" />
</tree>
</field>
</record>
<!-- Form View Of School Attendace -->
<record id="view_school_attendance_form" model="ir.ui.view">
<field name="name">school.attendance.form</field>
<field name="model">attendance.type</field>
<field name="arch" type="xml">
<form string="Standard Information">
<separator string="Attendance Type" />
<group col="4" colspan="2">
<field name="name" placeholder="name"/>
<field name="code" placeholder="code"/>
</group>
</form>
</field>
</record>
<!-- Form View Of School Standard Information -->
<record id="view_school_standard_form" model="ir.ui.view">
<field name="name">school.standard.form</field>
<field name="model">school.standard</field>
<field name="arch" type="xml">
<form string="Standard Information">
<sheet>
<separator string="Standard Information" />
<group col="4" colspan="4">
<field name="standard_id" widget="selection" placeholder="Standard"/>
<field name="division_id" widget="selection" placeholder="Division"/>
<field name="medium_id" widget="selection" placeholder="Medium"/>
<field name="school_id" widget="selection" placeholder="School"/>
<field name="user_id" placeholder="Select Faculty Name"
widget="selection"/>
<field name="capacity"/>
<field name="total_students"/>
<field name="remaining_seats"/>
<field name="class_room_id" options="{&quot;no_create&quot;: True}"/>
<field name="name" invisible="1"/>
<field name="total_no_subjects" invisible="1"/>
</group>
<notebook colspan="4">
<page string="Students" name="students">
<field name="student_ids" nolabel="1" colspan="4">
<tree string="Student Information">
<field name="roll_no" />
<field name="name" />
<field name="year" />
<field name="state" invisible="1" />
</tree>
<form string="Student Information">
<group col="4" colspan="4">
<field name="roll_no" />
<field name="name" placeholder="Name" />
<field name="year" placeholder="Year" />
<field name="state" invisible="1" />
</group>
</form>
</field>
</page>
<page string="Subjects">
<field name="subject_ids" nolabel="1" colspan="4" string="Add Subjects" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
</page>
<page string="Syllabus" attrs="{'invisible': [('total_no_subjects', '&lt;', 1)]}">
<group>
<field name="syllabus_ids" nolabel="1" colspan="4" context="{'default_standard_id':standard_id}">
<tree editable="top" string="Syllabs">
<field name="standard_id" invisible="1"/>
<field name="subject_id" required="1"
widget="selection"/>
<field name="syllabus_doc" required="1"/>
</tree>
<form string="Syllabus">
<group>
<field name="subject_id" required="1"/>
<field name="syllabus_doc" required="1"/>
</group>
</form>
</field>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of School Standard Information -->
<record id="view_school_standard_tree" model="ir.ui.view">
<field name="name">school.standard.tree</field>
<field name="model">school.standard</field>
<field name="arch" type="xml">
<tree string="Standard Information">
<field name="standard_id"/>
<field name="user_id"/>
<field name="division_id"/>
<field name="medium_id"/>
<field name="remaining_seats"/>
</tree>
</field>
</record>
<!-- Kanban View Of School Standard Information -->
<record id="school_standard_kanban_view" model="ir.ui.view">
<field name="name">school.standard.kanban</field>
<field name="model">school.standard</field>
<field name="arch" type="xml">
<kanban default_group_by="standard_id">
<field name="school_id" />
<field name="standard_id" />
<field name="division_id" />
<field name="medium_id" />
<field name="user_id" />
<field name="color" />
<templates>
<t t-name="kanban-box">
<t t-set="color" t-value="kanban_color(record.color.raw_value || record.school_id.value)" />
<div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
<div class="oe_kanban_box oe_kanban_color_border">
<div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
<table class="oe_kanban_table">
<tr>
<td class="oe_kanban_title1" align="left" valign="middle">
<div>
School :-
<field name="school_id" /></div>
</td>
</tr>
</table>
</div>
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
<table class="oe_kanban_table">
<tr>
<td valign="top" align="left">
<div class="oe_kanban_title2">
<div>
Class Teacher :-
<field name="user_id" /></div>
</div>
<div class="oe_kanban_title3">
<div>
Standard :-
<field name="standard_id" /></div>
<div>
Division :-
<field name="division_id" /></div>
<div>
Medium :-
<field name="medium_id" /></div>
</div>
</td>
</tr>
</table>
</div>
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
<div class="oe_kanban_left">
<a role="button" string="Edit" class="btn btn-sm btn-default fa fa-pencil" type="edit" aria-label="edit" />
<a role="button" string="Delete" class="btn btn-sm btn-default fa fa-trash" type="delete" aria-label="delete"/>
<a role="button" string="Change Color" icon="color-picker" type="color" name="color" />
</div>
<br class="oe_kanban_clear" />
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Search View Of School Standard Information -->
<record id="view_student_student_search" model="ir.ui.view">
<field name="name">school.standard.search</field>
<field name="model">school.standard</field>
<field name="arch" type="xml">
<search string="Standard Information">
<group col="10" colspan="4">
<field name="standard_id" />
<field name="user_id" />
<field name="division_id" />
<field name="medium_id" />
</group>
<newline />
<group expand="0" string="Group By..." colspan="12" col="10">
<filter name="school" string="School" help="By School" context="{'group_by':'school_id'}" />
<filter name="class" string="Class" help="By Class" context="{'group_by':'standard_id'}" />
<filter name="division" string="Division" help="By Division" context="{'group_by':'division_id'}" />
<filter name="medium" string="Medium" help="By Medium" context="{'group_by':'medium_id'}" />
</group>
</search>
</field>
</record>
<!-- Tree View Of Student Caste -->
<record id="view_student_caste_tree" model="ir.ui.view">
<field name="name">student.caste.tree</field>
<field name="model">student.cast</field>
<field name="arch" type="xml">
<tree string="Caste Information" editable="bottom">
<field name="name" placeholder="Enter Name"/>
</tree>
</field>
</record>
<!-- Form View Of Student Caste -->
<record id="view_student_caste_form" model="ir.ui.view">
<field name="name">student.caste.form</field>
<field name="model">student.cast</field>
<field name="arch" type="xml">
<form string="Caste Information">
<sheet>
<group>
<field name="name" placeholder="Religion" />
</group>
</sheet>
</form>
</field>
</record>
<!-- Action Of Form & Tree Views Of Student Caste -->
<record id="action_student_cast_form_7" model="ir.actions.act_window">
<field name="name">Religion/Caste</field>
<field name="res_model">student.cast</field>
<field name="view_mode">tree,form</field>
</record>
<!-- From View Of Grade System -->
<record id="view_grade_form" model="ir.ui.view">
<field name="name">grade.master.form</field>
<field name="model">grade.master</field>
<field name="arch" type="xml">
<form string="Grade">
<sheet>
<group col="2" colspan="2" string="Grade">
<field name="name" string="Grade Names" placeholder="Enter GradeName"/>
</group>
<newline />
<field name="grade_ids" nolabel="1" colspan="4">
<tree>
<field name="sequence" />
<field name="from_mark" />
<field name="to_mark" />
<field name="grade" />
</tree>
<form>
<group>
<field name="sequence" colspan="2" />
<newline />
<field name="grade" placeholder="Grade"/>
<newline />
<field name="from_mark" placeholder="From Mark"/>
<field name="to_mark" placeholder="To Mark"/>
<field name="fail" />
</group>
</form>
</field>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Grade System -->
<record id="view_grade_tree" model="ir.ui.view">
<field name="name">grade.master.tree</field>
<field name="model">grade.master</field>
<field name="arch" type="xml">
<tree string="Grade">
<field name="name" />
</tree>
</field>
</record>
<!-- From View Of Academic Year's Information -->
<record id="view_academic_year_form" model="ir.ui.view">
<field name="name">acdemic.year.form</field>
<field name="model">academic.year</field>
<field name="arch" type="xml">
<form string="Academic Years">
<header>
<button name="generate_academicmonth" type="object" string="Generate Months"/>
</header>
<sheet>
<group col="4" colspan="4">
<field name="name" placeholder="Name" />
<field name="code" placeholder="Code" />
<field name="date_start" placeholder="Start Date" />
<field name="date_stop" placeholder="End Date" />
<field name="sequence" />
<field name="current" widget="boolean_toggle"/>
<field name="grade_id" placeholder="Grade System"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}" invisible="1"/>
</group>
<notebook colspan="4">
<page string="Months">
<field name="month_ids" nolabel="1" colspan="4"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}">
<tree string="Months">
<field name="name" />
<field name="code" />
<field name="date_start" />
<field name="date_stop" />
</tree>
<form string="Months">
<group col="4" colspan="4">
<field name="name" placeholder="Name" />
<field name="code" placeholder="Code" />
<field name="date_start" placeholder="Start Date" />
<field name="date_stop" placeholder="Stop Date" />
<field name="description" colspan="4" placeholder="Description"/>
</group>
</form>
</field>
</page>
</notebook>
<newline />
<separator string="Description" colspan="4" />
<field name="description" colspan="4" placeholder="Description"/>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Academic Year's Information -->
<record id="view_academic_year_tree" model="ir.ui.view">
<field name="name">academic.year.tree</field>
<field name="model">academic.year</field>
<field name="arch" type="xml">
<tree string="Academic Years">
<field name="sequence" />
<field name="name" />
<field name="code" />
<field name="date_start" />
<field name="date_stop" />
</tree>
</field>
</record>
<!-- From View Of Academic Month's Information -->
<record id="view_academic_month_form" model="ir.ui.view">
<field name="name">academic.month.form</field>
<field name="model">academic.month</field>
<field name="arch" type="xml">
<form string="Months">
<sheet>
<group col="4" colspan="4">
<field name="name" placeholder="Name" />
<field name="code" placeholder="Code" />
<field name="date_start" placeholder="Start Date" />
<field name="date_stop" placeholder="Stop Date" />
<field name="year_id" colspan="4" placeholder="Year" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
<field name="description" colspan="4" placeholder="Description"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Academic Month's Information -->
<record id="view_academic_month_tree" model="ir.ui.view">
<field name="name">academic.month.tree</field>
<field name="model">academic.month</field>
<field name="arch" type="xml">
<tree string="Months">
<field name="name" />
<field name="code" />
<field name="date_start" />
<field name="date_stop" />
<field name="year_id" />
</tree>
</field>
</record>
<!-- From View Of Standard Medium Information -->
<record id="view_standard_medium_form" model="ir.ui.view">
<field name="name">standard.medium.form</field>
<field name="model">standard.medium</field>
<field name="arch" type="xml">
<form string="Medium">
<sheet>
<group col="4" colspan="4">
<field name="sequence" />
<field name="name" placeholder="Name" />
<field name="code" placeholder="Code" />
<newline />
<field name="description" colspan="4" placeholder="Description"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Standard Medium Information -->
<record id="view_standard_medium_tree" model="ir.ui.view">
<field name="name">standard.medium.tree</field>
<field name="model">standard.medium</field>
<field name="arch" type="xml">
<tree string="Medium">
<field name="sequence" />
<field name="name" />
<field name="code" />
</tree>
</field>
</record>
<!-- From View Of Student Document Type -->
<record id="view_document_type_form" model="ir.ui.view">
<field name="name">document.type.form</field>
<field name="model">document.type</field>
<field name="arch" type="xml">
<form string="Document Type">
<sheet>
<group col="4" colspan="4">
<field name="seq_no" />
<field name="doc_type" placeholder="Document Type" />
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Student Document Type -->
<record id="view_student_doctype_tree" model="ir.ui.view">
<field name="name">document.type.tree</field>
<field name="model">document.type</field>
<field name="arch" type="xml">
<tree string="Document Type">
<field name="seq_no" />
<field name="doc_type" />
</tree>
</field>
</record>
<!-- Form View of mother Tongue -->
<record id="mother_tongue_form_view" model="ir.ui.view">
<field name="name">mother tongue</field>
<field name="model">mother.toungue</field>
<field name="arch" type="xml">
<form string="Mother Tongue">
<group>
<field name="name" required="1"/>
</group>
</form>
</field>
</record>
<!-- Tree View of Mother Tongue -->
<record id="mother_tongue_tree_view" model="ir.ui.view">
<field name="name">Mother Tongue</field>
<field name="model">mother.toungue</field>
<field name="arch" type="xml">
<tree string="Mother Tongue" editable="top">
<field name="name" required="1"/>
</tree>
</field>
</record>
<!-- Action of mother Toungue -->
<record id="action_mother_toungue" model="ir.actions.act_window">
<field name="name">Mother Tongue</field>
<field name="res_model">mother.toungue</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Student Document Type -->
<record id="action_document_type_form" model="ir.actions.act_window">
<field name="name">Document Type</field>
<field name="res_model">document.type</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Form View Of Standard Division Information-->
<record id="view_standard_division_form" model="ir.ui.view">
<field name="name">standard.division.form</field>
<field name="model">standard.division</field>
<field name="arch" type="xml">
<form string="Divisions">
<sheet>
<group col="4" colspan="4">
<field name="sequence" />
<field name="name" placeholder="Name" />
<field name="code" placeholder="Code" />
<newline />
<field name="description" colspan="4" placeholder="Description"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Standard Division Information-->
<record id="view_standard_division_tree" model="ir.ui.view">
<field name="name">standard.division.tree</field>
<field name="model">standard.division</field>
<field name="arch" type="xml">
<tree string="Divisions">
<field name="sequence" />
<field name="name" />
<field name="code" />
</tree>
</field>
</record>
<!-- Form View Of Elective Subject Group -->
<record id="view_elective_group_form" model="ir.ui.view">
<field name="name">elective.subject.form</field>
<field name="model">subject.elective</field>
<field name="arch" type="xml">
<form string="Elective Subjects">
<sheet>
<group col="4" colspan="4">
<field name="name" colspan="4" required="1" />
<separator String="Subjects" col="4" colspan="4" />
<field name="subject_ids" nolabel="1" colspan="4">
<form>
<group col="4" colspan="4">
<field name="name" placeholder="Name" />
<field name="code" placeholder="Code" />
<field name="maximum_marks" placeholder="Maximum Marks"/>
<field name="minimum_marks" placeholder="Minimum Marks"/>
<field name="is_practical" />
<field name="elective_id" string="Elective Subject" invisible="1" />
</group>
<notebook colspan="4">
<page string="Standards">
<field name="standard_ids" nolabel="1" colspan="4"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}">
<tree string="Standards">
<field name="name" />
<field name="code" />
</tree>
<form string="Standards">
<group col="4" colspan="4">
<field name="name" placeholder="Name"/>
<field name="code" placeholder="Code"/>
</group>
</form>
</field>
</page>
<page string="Teachers">
<field name="teacher_ids" nolabel="1" colspan="4" />
</page>
<page string="Students" attrs="{'invisible':[('elective_id','!=',True)]}">
<field name="student_ids" nolabel="1" />
</page>
</notebook>
</form>
</field>
</group>
</sheet>
</form>
</field>
</record>
<!-- Form View Of Subject's Information -->
<record id="view_subject_subject_form" model="ir.ui.view">
<field name="name">subject.subject.form</field>
<field name="model">subject.subject</field>
<field name="arch" type="xml">
<form string="Subjects">
<sheet>
<group col="4" colspan="4">
<field name="name" placeholder="Name" />
<field name="code" placeholder="Code" />
<field name="maximum_marks" placeholder="Maximum Marks"/>
<field name="minimum_marks" placeholder="Minimum Marks"/>
<field name="is_practical" />
<field name="elective_id" string="Elective Subject Group" readonly="1" />
</group>
<notebook colspan="4">
<page string="Standards">
<field name="standard_ids" nolabel="1" colspan="4"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}">
<tree string="Standards">
<field name="name" />
<field name="code" />
</tree>
<form string="Standards">
<group col="4" colspan="4">
<field name="name" placeholder="Standard Name"/>
<field name="code" placeholder="Standard Code"/>
</group>
</form>
</field>
</page>
<page string="Teachers">
<field name="teacher_ids" nolabel="1" colspan="4"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
</page>
<page string="Students" attrs="{'invisible':[('elective_id','!=',True)]}">
<field name="student_ids" nolabel="1" />
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Subject's Information -->
<record id="view_subject_subject_tree" model="ir.ui.view">
<field name="name">subject.subject.tree</field>
<field name="model">subject.subject</field>
<field name="arch" type="xml">
<tree string="Subjects">
<field name="name" />
<field name="code" />
<field name="maximum_marks" />
<field name="minimum_marks" />
</tree>
</field>
</record>
<!-- Form View Of Standard Information -->
<record id="view_standard_standard_form" model="ir.ui.view">
<field name="name">standard.standard.form</field>
<field name="model">standard.standard</field>
<field name="arch" type="xml">
<form string="Standard Information">
<sheet>
<group col="4" colspan="4">
<field name="sequence"/>
<newline />
<field name="name" placeholder="Name"/>
<field name="code" placeholder="Code"/>
<newline />
<field name="description" colspan="4" placeholder="Description"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Standard Information -->
<record id="view_standard_standard_tree" model="ir.ui.view">
<field name="name">standard.standard.tree</field>
<field name="model">standard.standard</field>
<field name="arch" type="xml">
<tree string="Standard Information">
<field name="sequence" />
<field name="name" />
<field name="code" />
</tree>
</field>
</record>
<!-- Actions Of Form & Kanban Views Of Student Reminder -->
<record id="action_student_reminder" model="ir.actions.act_window">
<field name="name">Students Reminder</field>
<field name="res_model">student.reminder</field>
<field name="view_mode">kanban,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a new Reminder.
</p>
<p>
This structure is used to create and manage all Remainders
related to students regarding exams, events etc.
</p>
</field>
</record>
<!-- Action View Of Kanban View Of Student Reminder -->
<record id="action_view_student_reminder_kanban" model="ir.actions.act_window.view">
<field name="view_mode">kanban</field>
<field eval="0" name="sequence" />
<field name="view_id" ref="student_reminder_kanban_view" />
<field name="act_window_id" ref="action_student_reminder" />
</record>
<!-- Action Of Form & Tree Views Of School Information -->
<record id="action_school_school_form" model="ir.actions.act_window">
<field name="name">Schools</field>
<field name="res_model">school.school</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of School Standard -->
<record id="action_school_standard_form" model="ir.actions.act_window">
<field name="name">Classes</field>
<field name="res_model">school.standard</field>
<field name="view_mode">kanban,tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Elective Subject -->
<record id="action_elective_subject_form" model="ir.actions.act_window">
<field name="name">Elective Subject(s)</field>
<field name="res_model">subject.elective</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Grade System -->
<record id="action_grade_master_form" model="ir.actions.act_window">
<field name="name">Grade</field>
<field name="res_model">grade.master</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Academic Year Information -->
<record id="action_academic_year_form" model="ir.actions.act_window">
<field name="name">Academic Years</field>
<field name="res_model">academic.year</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Academic Month Information -->
<record id="action_academic_month_form" model="ir.actions.act_window">
<field name="name">Months</field>
<field name="res_model">academic.month</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Standard Medium Information -->
<record id="action_standard_medium_form" model="ir.actions.act_window">
<field name="name">Medium</field>
<field name="res_model">standard.medium</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Standard Division Information Action -->
<record id="action_standard_division_form" model="ir.actions.act_window">
<field name="name">Divisions</field>
<field name="res_model">standard.division</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Subject Information -->
<record id="action_subject_subject_form" model="ir.actions.act_window">
<field name="name">Subjects</field>
<field name="res_model">subject.subject</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Action Of Form & Tree Views Of Standard Information -->
<record id="action_standard_standard_form" model="ir.actions.act_window">
<field name="name">Standards</field>
<field name="res_model">standard.standard</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Form View Of Student News -->
<record id="edit_student_news_form" model="ir.ui.view">
<field name="name">student.news.form</field>
<field name="model">student.news</field>
<field name="arch" type="xml">
<form string="Noticeboard">
<header>
<button string="Send Mail" class="btn btn-sm btn-default fa fa-envelope" type="object" name="news_update" colspan="2" />
</header>
<sheet>
<group col="4" colspan="2" string="News / Updates">
<field name="subject" placeholder="Subject"/>
<field name="date" placeholder="Date" required="1"/>
</group>
<group>
<field name="description" colspan="4" placeholder="Description"/>
</group>
<notebook colspan="4">
<page string="Users">
<field name="user_ids" nolabel="1" colspan="4"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Student News -->
<record id="view_student_news_tree" model="ir.ui.view">
<field name="name">student.news.tree</field>
<field name="model">student.news</field>
<field name="arch" type="xml">
<tree string="Noticeboard">
<field name="subject" />
<field name="date" />
</tree>
</field>
</record>
<!-- Search View Of Student News -->
<record id="view_hr_student_news_search" model="ir.ui.view">
<field name="name">student.news.search</field>
<field name="model">student.news</field>
<field name="arch" type="xml">
<search string="News">
<field name="subject" />
<field name="date" />
</search>
</field>
</record>
<!-- Action Of Form, Tree & Kanban Views Of Student News -->
<record id="view_student_news" model="ir.actions.act_window">
<field name="name">Noticeboard</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">student.news</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Form View of Class Room -->
<record id="class_room_form_view" model="ir.ui.view">
<field name="name">class.room.form</field>
<field name="model">class.room</field>
<field name="arch" type="xml">
<form string="Class Room Form View">
<sheet>
<group col="4" colspan="4">
<field name="name" required="1"/>
<field name="number" required="1"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree view of class Room -->
<record id="class_room_tree_view" model="ir.ui.view">
<field name="name">class.room.tree</field>
<field name="model">class.room</field>
<field name="arch" type="xml">
<tree string="Class Room Tree View">
<field name="name"/>
<field name="number"/>
</tree>
</field>
</record>
<!-- Action of Class Room -->
<record id="action_class_room" model="ir.actions.act_window">
<field name="name">Class Room</field>
<field name="res_model">class.room</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu Item Of EMS -->
<menuitem id="menu_ems" name="EMS" web_icon="school,static/description/ems.png" sequence="1"/>
<!-- MenuItem Of Admission Register -->
<menuitem id="admission_register" name="Admission Register" parent="menu_ems" sequence="2" groups="school.group_school_administration,school.group_is_admission"/>
<menuitem id="menu_admission_form" name="Admission Register" parent="admission_register" action="action_student_student_form_2" sequence="21" groups="school.group_school_administration,school.group_is_admission"/>
<!-- Menu Item Of Students & Parents -->
<menuitem id="menu_students_parents" name="Profiles" parent="menu_ems" sequence="3"/>
<menuitem id="menu_student_profile" name="Students" parent="menu_students_parents" action="action_student_student_form_12" groups="school.group_school_administration,school.group_school_student,school.group_school_teacher,school.group_school_parent" sequence="31"/>
<!-- MenuItem For Reminders -->
<menuitem id="menu_reminders" name="Reminders" parent="menu_ems" action="action_student_reminder" sequence="8" groups="school.group_school_administration,school.group_school_student,school.group_school_teacher,school.group_school_parent"/>
<!-- MenuItem For Configurations -->
<menuitem id="menu_configuration" name="Configurations" parent="menu_ems" sequence="13" groups="group_school_administration" />
<!-- MenuItem For Configurations->School Configurations -->
<menuitem id="menu_school_config_form1" name="School Configurations" parent="menu_configuration" />
<menuitem id="menu_cast" name="Religion/Caste" parent="menu_school_config_form1" action="action_student_cast_form_7" />
<menuitem id="menu_sub_doc_type_sub_form" name="Document Type" parent="menu_school_config_form1" action="action_document_type_form" />
<menuitem id="submenu_sub_grade" name="Grade" parent="menu_school_config_form1" action="action_grade_master_form" />
<menuitem id="submenu_sub_news" name="Noticeboard" parent="menu_school_config_form1" action="view_student_news" />
<menuitem id="mother_tongue_menu" name="Mother Tongue" parent="menu_school_config_form1" action="action_mother_toungue" groups="school.group_school_administration"/>
<menuitem id="menu_school_school_sub_form" name="School" parent="menu_school_config_form1" action="action_school_school_form" />
<!-- MenuItem For Configurations->Academic Years -->
<menuitem id="menu_academic_year_form" name="Academic Years" parent="menu_configuration" />
<menuitem id="menu_academic_year_sub_form" name="Years" parent="menu_academic_year_form" action="action_academic_year_form" />
<menuitem id="menu_academic_month_form" name="Months" parent="menu_academic_year_form" action="action_academic_month_form" />
<!-- MenuItem For Configurations->Standards -->
<menuitem id="menu_school_standard_form" name="Standards" parent="menu_configuration" />
<menuitem id="menu_sub_school_standard_form" name="Classes" parent="menu_school_standard_form" action="action_school_standard_form" />
<menuitem id="menu_standard_standard_form" name="Standards" parent="menu_school_standard_form" action="action_standard_standard_form" />
<menuitem id="menu_standard_division_form" name="Divisions" parent="menu_school_standard_form" action="action_standard_division_form" />
<menuitem id="menu_standard_medium_form" name="Medium" parent="menu_school_standard_form" action="action_standard_medium_form" />
<menuitem id="menu_class_room" name="Class Room" parent="menu_school_standard_form" action="action_class_room"/>
<!-- MenuItem For Configurations->Subject -->
<menuitem id="menu_subject_subject_form" name="Subjects" parent="menu_configuration" sequence="10" />
<menuitem id="menu_subject_subject_sub_form" name="Subjects" parent="menu_subject_subject_form" action="action_subject_subject_form" />
<menuitem id="menu_subject_elective_form" name="Elective Subject(s)" parent="menu_subject_subject_form" action="action_elective_subject_form" />
<!-- Menuitem of alumni and terminate -->
<menuitem id="menu_student_alumni" name="Alumni/Terminate" action="action_student_alumni" parent="admission_register" groups="school.group_school_administration,school.group_school_teacher" sequence="22"/>
<menuitem
id="hr.menu_hr_root"
name="Employees"
groups="-hr.group_hr_manager,-hr.group_hr_user,-base.group_user,school.group_school_administration"
web_icon="hr,static/description/icon.png"
sequence="75"/>
<!-- MenuItem For Configurations->Subject -->
<!-- Inherited Form View Of Company -->
<record id="view_company_form_inherit" model="ir.ui.view">
<field name="name">res.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<field name="name" position="attributes">
<attribute name="string">School Name</attribute>
</field>
</field>
</record>
<!-- removed the inherited reports and act_windows of account which has been deprecated since V12-->
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Form View 1 Of Student's Profiles -->
<record id="view_student_student_form_1" model="ir.ui.view">
<field name="name">student.student.form.1</field>
<field name="model">student.student</field>
<field name="arch" type="xml">
<form string="Student Information" create="false" delete="false">
<header>
<button class="oe_highlight oe_stat_button" name="%(school.action_terminate_wizard)d" string="Terminate" type="action" icon="fa-ban" states="done" groups="school.group_school_administration" />
<button class="oe_stat_button" name="set_alumni" string="Alumni" type="object" icon="fa-archive" states="done" groups="school.group_school_administration" />
<button class="oe_stat_button" icon="fa-check" name="admission_done" type="object" string="Done" states="draft" groups="school.group_school_administration" />
<field name="state" widget="statusbar" statusbar_visible="alumni,terminate" attrs="{'invisible':[('state','=','done')]}"/>
</header>
<sheet>
<div class="oe_button_box" name="buttons"></div>
<div class="oe_inline">
<newline />
<separator string="Personal Information" />
<b>
<field name="reg_code" readonly="1" />
</b>
<br />
<field name="photo" widget="image" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" class="oe_avatar oe_left" style="max-width:100px;max-height:117px;"/>
<div class="oe_title">
<group>
<field name="name" placeholder="First Name" nolabel="1" required="1" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<br />
<field name="middle" placeholder="Middle Name" nolabel="1" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<br />
<field name="last" placeholder="Last Name" nolabel="1" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<br />
<field name="pid" invisible="1"/>
</group>
</div>
</div>
<group>
<group string="Student Information">
<field name="student_code" readonly="1" />
<field name="roll_no" help="Roll number of Student" readonly="1"/>
<field name="year" placeholder="Year" widget="selection" help="Academic year of Student" attrs="{'readonly':['|',('state','in',['alumni','terminate']),('teachr_user_grp','=',True)]}"/>
<field name="school_id" placeholder="School" widget="selection" help="School of Student" attrs="{'readonly':['|',('state','in',['alumni','terminate']),('teachr_user_grp','=',True)]}"/>
</group>
<group string="Standard Information">
<field name="standard_id" placeholder="Standard" readonly="1" domain="[('school_id','=',school_id)]" widget="selection" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="division_id" placeholder="Division" invisible="1" widget="selection" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="medium_id" placeholder="Medium" readonly="1" widget="selection" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
</group>
</group>
<group>
<group>
<label for="street" string="Address" />
<div class="o_address_format">
<field name="street" class="o_address_street" placeholder="Street..." attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="street2" class="o_address_street" placeholder="Street2..." attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="city" placeholder="City" class="o_address_city" required="1" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="state_id" domain="[('country_id','=',country_id)]" class="o_address_state" required="1" placeholder="State" options="{&quot;no_open&quot;: True}" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="country_id" placeholder="Country" class="o_address_country,oe_no_button" options="{&quot;no_open&quot;: True}" required="1" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
</div>
</group>
<group>
<field name="phone" placeholder="Phone Number" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="mobile" placeholder="Mobile Number" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="email" placeholder="Email Address" String="Email" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="website" widget="url" placeholder="e.g. www.serpentcs.com" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="teachr_user_grp" invisible="1"/>
</group>
</group>
<notebook>
<page string="General" name="general">
<group>
<group>
<field name="cast_id" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" widget="selection" placeholder="Religion/Caste"/>
<field name="date_of_birth" widget="date" placeholder="Birthdate" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="gender" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" placeholder="Gender" required="1"/>
<field name="age"/>
</group>
<group>
<field name="mother_tongue" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" widget="selection" placeholder="Mother Tounge"/>
<field name="admission_date" widget="date" placeholder="Admission Date" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" readonly="1"/>
<field name="maritual_status" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" placeholder="Maritial Status"/>
</group>
<newline />
<separator string="Emergency Contact Details" colspan="4" />
<newline />
<group colspan="4" col="4">
<field name="contact_phone" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" placeholder="Phone Number"/>
<field name="contact_mobile" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" placeholder="Mobile Number"/>
</group>
<newline />
</group>
<newline/>
<separator string="Termination Reason" attrs="{'invisible':[('state','in',['draft','done','alumni'])]}"/>
<group>
<field name="terminate_reason" attrs="{'invisible':[('state','in',['draft','done','alumni'])]}" readonly="1"/>
</group>
</page>
<page string="Parents">
<field name="parent_id"
attrs="{'readonly':[('state','in',['alumni','terminate'])]}"
context="{'form_view_ref':'school.view_parent_form','default_parent_school':1}"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
</page>
<page string="References">
<field name="reference_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','in',['alumni','terminate'])]}">
<tree string="Reference" editable="top">
<field name="name" />
<field name="middle" />
<field name="last" />
<field name="designation" />
<field name="phone" />
<field name="gender" />
</tree>
<form string="Reference">
<group col="4" colspan="4">
<field name="name" placeholder="First Name"/>
<field name="gender"/>
<field name="middle" placeholder="Middle Name"/>
<field name="designation" placeholder="Designation"/>
<field name="last" placeholder="Last Name"/>
<field name="phone" placeholder="Phone Number"/>
</group>
</form>
</field>
</page>
<page string="Previous School">
<field name="previous_school_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','in',['alumni','terminate'])]}">
<tree string="Previous School Details">
<field name="name" />
<field name="registration_no" />
<field name="admission_date" />
<field name="exit_date" />
<field name="course_id" widget="selection" />
</tree>
<form string="Previous School Details">
<separator string="Previous School Details" />
<group col="4" colspan="4">
<field name="name" placeholder="School Name" />
<field name="registration_no" placeholder="Registration No" />
<field name="admission_date" />
<field name="exit_date" />
<field name="course_id" widget="selection"/>
<newline />
<separator string="Subjects Details"/>
<field name="add_sub" nolabel="1" colspan="4">
<form>
<group col='4' colspan="4">
<field name="name"/>
<field name="add_sub_id" />
<field name="maximum_marks" />
<field name="minimum_marks" />
</group>
</form>
</field>
</group>
</form>
</field>
</page>
<page string="Award Info">
<field name="award_list" nolabel="1" colspan="4" attrs="{'readonly':[('state','in',['alumni','terminate'])]}">
<tree string="Reference" editable="top">
<field name="name" required="1" placeholder="Name"/>
<field name="description" placeholder="Description"/>
</tree>
<form string="Reference">
<group col="4" colspan="4">
<field name="name" placeholder="Enter Name"/>
<field name="description" placeholder="Enter Description"/>
</group>
</form>
</field>
</page>
<page string="Family Info">
<field name="family_con_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','in',['alumni','terminate'])]}">
<form string="Family Contact Details">
<group>
<group>
<field name="rel_name" />
<field name="stu_name" placeholder="Create or Select Name" attrs="{'invisible':[('rel_name','!=','exist')]}"
options="{&quot;no_create&quot;: True}"/>
<field name="name" placeholder="Name" attrs="{'invisible':[('rel_name','!=','new')]}"/>
<field name="relation" placeholder="Enter or select Relation" />
</group>
<group>
<field name="phone" placeholder="Phone Number" />
<field name="email" placeholder="Email ID" />
</group>
</group>
</form>
<tree string="Family Contact Details">
<field name="relative_name"/>
<field name="relation" />
<field name="phone" />
</tree>
</field>
</page>
<page string="Medical">
<group>
<group string="Doctor Information">
<field name="designation" placeholder="Doctor Designation" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="doctor_phone" placeholder="Doctor's Contact No" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
</group>
<group string="Physical Information">
<field name="blood_group" placeholder="e.g.B+,Ab+" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="height" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" placeholder="Height"/>
<field name="weight" attrs="{'readonly':[('state','in',['alumni','terminate'])]}" placeholder="Weight"/>
</group>
</group>
<separator string="Does the applicant have any Disabilities?" colspan="4" />
<group col="6" colspan="4">
<field name="eye" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="ear" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="nose_throat" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="respiratory" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="cardiovascular" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="neurological" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="muskoskeletal" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="dermatological" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
<field name="blood_pressure" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
</group>
<separator string="Notes" colspan="4" />
<group col="6" colspan="4">
<field name="comment" placeholder="Notes About Medical.." nolabel="1" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"/>
</group>
</page>
<page string="Certificates">
<field name="certificate_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','in',['alumni','terminate'])]}">
<form string="Certificate">
<group col="4">
<field name="description" placeholder="Description About Certificate" />
<field name="certi" />
</group>
</form>
<tree string="Certifaicate" editable="top">
<field name="description" required="1" placeholder="Enter Description"/>
<field name="certi" required="1" placeholder="Upload Certi"/>
</tree>
</field>
</page>
<page string="Remarks">
<field name="description" nolabel="1" colspan="4" attrs="{'readonly':[('state','in',['alumni','terminate'])]}">
<form string="Extra Details">
<group col="4" colspan="2">
<field name="name" placeholder="Field Name" />
<field name="description" placeholder="Description" />
</group>
</form>
<tree string="Remarks" editable="top">
<field name="name" required="1" placeholder="Enter Name"/>
<field name="description" placeholder="Enter Description"/>
</tree>
</field>
</page>
<page string="History" groups="school.group_school_administration,school.group_school_teacher,school.group_school_parent,school.group_school_student">
<field name="history_ids" nolabel="1" colspan="4" readonly="1" attrs="{'readonly':[('state','in',['alumni','terminate'])]}"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}">
<tree string="History">
<field name="academice_year_id" required="1"/>
<field name="standard_id" required="1"/>
<field name="percentage"/>
<field name="result"/>
</tree>
<form string="History">
<group col="4" colspan="4">
<field name="academice_year_id" placeholder="Acadamic Year" />
<field name="standard_id" placeholder="Select or Create Standard" />
<field name="percentage" />
<field name="result" />
</group>
</form>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Tree View 1 Of Student's Profiles -->
<record id="view_student_student_tree_1" model="ir.ui.view">
<field name="name">student.student.tree.1</field>
<field name="model">student.student</field>
<field name="arch" type="xml">
<tree string="Student Information" create="false" delete="false">
<field name="pid" />
<field name="name" />
<field name="student_name" invisible="1" />
<field name="year" widget="selection" />
<field name="admission_date" />
<field name="gender" />
<field name="state" />
<field name="school_id" />
</tree>
</field>
</record>
<!-- Search View 1 Of Student's Profiles -->
<record id="view_student_student_search_1" model="ir.ui.view">
<field name="name">student.student.search.1</field>
<field name="model">student.student</field>
<field name="arch" type="xml">
<search string="Student Information">
<group col="10" colspan="4">
<field name="pid" />
<field name="student_name" invisible="1" />
<field name="year" />
<field name="gender" />
<field name="school_id" placeholder="School"/>
</group>
<newline />
<group expand="0" string="Group By..." colspan="12" col="10">
<filter name="class" string="Class" help="By Class" context="{'group_by':'standard_id'}" />
<filter name="gender" string="Gender" help="By Gender" context="{'group_by':'gender'}" />
<filter name="name" string="Name" help="By Class" context="{'group_by':'student_name'}" />
<filter name="school" string="School" help="By School" context="{'group_by':'school_id'}" />
<filter name="state" string="State" help="By State" context="{'group_by':'state'}"/>
</group>
<separator/>
<filter name="alumni" string="Alumni" domain="[('state','=', 'alumni')]" help="Admission In Confirm State"/>
<filter name="terminate" string="Terminated" domain="[('state','=', 'terminate')]" help="Admission In Pending State"/>
<filter name="done" string="Done" domain="[('state','=', 'done')]" help="Admission In Done State"/>
</search>
</field>
</record>
<!-- Kanban View Of Student's Profiles -->
<record id="student_student_kanban_view" model="ir.ui.view">
<field name="name">Student KANBAN</field>
<field name="model">student.student</field>
<field name="arch" type="xml">
<kanban default_group_by="standard_id" nocreate="1" create="false">
<field name="color"/>
<field name="id"/>
<field name="name"/>
<field name="email"/>
<templates>
<t t-name="kanban-box">
<t t-set="color" t-value="kanban_color(record.color.raw_value || record.name.raw_value)" />
<div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
<div class="oe_kanban_box oe_kanban_color_border">
<div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
<table class="oe_kanban_table">
<tr>
<td class="oe_kanban_title1" align="left" valign="middle" style="padding-left:10px;">
<h4>
<a type="open">
<field name="name" />
<field name="middle" />
<field name="last" />
<field name="student_name" invisible="1" />
<field name="standard_id" invisible="1" />
<field name="school_id" invisible="1" />
<field name="gender" invisible="1" />
<field name="state" invisible="1" />
</a>
</h4>
</td>
</tr>
</table>
</div>
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
<table class="oe_kanban_table">
<tr width="300">
<td valign="top" width="64" align="left">
<a type="open">
<img heigh="80" width="80" t-att-src="kanban_image('student.student', 'photo', record.id.raw_value)" alt="image"/>
</a>
</td>
<td valign="top" align="left" style="padding-left:10px;">
<table>
<tr>
<td>Student ID :</td>
<td style="padding-left:10px;">
<b>
<field name="pid" />
</b>
</td>
</tr>
<tr>
<td>Standard : </td>
<td style="padding-left:10px;">
<b>
<field name="standard_id" />
</b>
</td>
</tr>
<tr>
<td>Admission Date : </td>
<td style="padding-left:10px;">
<b>
<field name="admission_date" />
</b>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<center>
<b>
<field name="gender" />
</b>
</center>
</td>
</tr>
</table>
</div>
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
<div class="oe_kanban_left">
<a role="button" string="Edit" title="Edit" class="btn btn-sm btn-default fa fa-pencil" type="edit" groups="school.group_school_administration"/>
<a role="button" string="Change Color" icon="color-picker" type="color" name="color" />
</div>
<br class="oe_kanban_clear" />
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Form View Of Admission Register Information -->
<record id="view_student_student_form_2" model="ir.ui.view">
<field name="name">student.student.form.2</field>
<field name="model">student.student</field>
<field name="arch" type="xml">
<form string="Admission Register">
<header>
<button class="oe_highlight oe_stat_button" name="set_terminate" string="Terminate" type="object" icon="fa-ban" states="done" groups="school.group_school_administration"/>
<button class="oe_stat_button" name="set_alumni" string="Alumni" type="object" icon="fa-archive" states="done" groups="school.group_school_administration" />
<button class="oe_stat_button" icon="fa-check" name="admission_done" type="object" string="Done" states="draft" groups="school.group_school_administration" />
<button class="oe_stat_button" icon="fa-ban" name="cancel_admission" type="object" string="Cancel" states="draft" groups="school.group_school_administration"/>
<field name="state" widget="statusbar" statusbar_visible="draft,cancel"/>
</header>
<sheet>
<div class="oe_inline">
<newline />
<separator string="Personal Information" />
<field name="photo" widget="image" class="oe_avatar oe_left" style="max-width:100px;max-height:117px;" />
<div class="oe_title">
<group>
<field name="pid" nolabel="1" readonly="1"/>
<br />
<field name="name" placeholder="First Name" nolabel="1" required="1" attrs="{'readonly':[('state','=','alumni')]}"/>
<br />
<field name="middle" placeholder="Middle Name" nolabel="1" attrs="{'readonly':[('state','=','alumni')]}"/>
<br />
<field name="last" placeholder="Last Name" nolabel="1" attrs="{'readonly':[('state','=','alumni')]}"/>
<br/>
<field name="active" invisible="1"/>
</group>
</div>
</div>
<group>
<group string="School Information">
<field name="school_id" placeholder="School Name" required="1"
attrs="{'readonly':[('state','=','alumni')]}" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
<field name="year" widget="selection" placeholder="Academic Year" readonly="1"/>
<field name="company_id" invisible="1"/>
</group>
<group string="Class Information">
<field name="medium_id" placeholder="Medium" widget="selection" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="standard_id" placeholder="Class" domain="[('school_id','=',school_id),('medium_id','=',medium_id)]" widget="selection" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="division_id" placeholder="Division" widget="selection" attrs="{'readonly':[('state','=','alumni')]}" invisible="1"/>
</group>
</group>
<group colspan="4">
<group>
<label for="street" string="Address" />
<div class="o_address_format">
<field name="street" placeholder="Street..." class="o_address_street" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="street2" placeholder="Street2..." class="o_address_street" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="country_id" placeholder="Country" class="o_address_country,oe_no_button" required="1" options="{&quot;no_open&quot;: True}" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="city" placeholder="City" class="o_address_city" required="1" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="state_id" class="o_address_state" domain="[('country_id','=',country_id)]" placeholder="State" options="{&quot;no_open&quot;: True}" required="1" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip" attrs="{'readonly':[('state','=','alumni')]}"/>
</div>
</group>
<group>
<field name="phone" placeholder="Phone Number" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="mobile" placeholder="Mobile Number" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="email" placeholder="Email Address" String="Email" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="website" widget="url" placeholder="e.g. www.serpentcs.com" attrs="{'readonly':[('state','=','alumni')]}"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
<form string="General">
<sheet>
<group string="General Information">
<group>
<field name="gender" placeholder="Gender" attrs="{'readonly':[('state','=','alumni')]}" required="1"/>
<field name="date_of_birth" placeholder="Birthdate" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="age" />
</group>
<group>
<field name="mother_tongue" widget="selection" placeholder="Mother Tongue" attrs="{'readonly':[('state','=','alumni')]}"/>
<field name="admission_date" placeholder="Admission Date" attrs="{'readonly':[('state','=','alumni')]}" readonly="1"/>
<field name="maritual_status" placeholder="Select Maritual Status" attrs="{'readonly':[('state','=','alumni')]}"/>
</group>
<newline />
<separator string="Emergency Contact Details" colspan="4" />
<newline />
<group colspan="4" col="4">
<field name="contact_phone" attrs="{'readonly':[('state','=','alumni')]}" placeholder="Phone Number"/>
<field name="contact_mobile" attrs="{'readonly':[('state','=','alumni')]}" placeholder="Mobile Number"/>
</group>
</group>
</sheet>
</form>
</page>
<page string="Parents">
<field name="parent_id" attrs="{'readonly':[('state','=','alumni')]}"
context="{'form_view_ref':'school.view_parent_form','default_parent_school':1}"
options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
</page>
<page string="References">
<field name="reference_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','=','alumni')]}">
<tree string="Reference" editable="top">
<field name="name" placeholder="Firstname"/>
<field name="middle" placeholder="Middlename"/>
<field name="last" placeholder="Surname"/>
<field name="designation" placeholder="Designation"/>
<field name="phone" placeholder="Phone"/>
<field name="gender" placeholder="Gender"/>
</tree>
<form string="Reference">
<group col="4" colspan="4">
<field name="name" placeholder="First Name" required="True"/>
<field name="middle" placeholder="Middle Name" />
<field name="last" placeholder="Last Name" />
<field name="designation" placeholder="Designation" />
<field name="phone" placeholder="Phone Number" />
<field name="gender" placeholder="Gender"/>
</group>
</form>
</field>
</page>
<page string="Previous School">
<field name="previous_school_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','=','alumni')]}">
<tree string="Previous School Details">
<field name="name" />
<field name="registration_no" />
<field name="admission_date" />
<field name="exit_date" />
<field name="course_id" widget="selection" />
</tree>
<form string="Previous School Details">
<separator string="Previous School Details" />
<group col="4" colspan="4">
<field name="name" placeholder="School Name" />
<field name="registration_no" placeholder="Registration No" />
<field name="admission_date" placeholder="Admission Date"/>
<field name="exit_date" placeholder="Exit Date"/>
<field name="course_id" placeholder="Course" widget="selection"/>
<newline />
<separator string="Subjects Details" />
<field name="add_sub" nolabel="1" colspan="4">
<form>
<group col='4' colspan="4">
<field name="name"/>
<field name="add_sub_id" />
<field name="maximum_marks" />
<field name="minimum_marks" />
</group>
</form>
</field>
</group>
</form>
</field>
</page>
<page string="Family Details">
<field name="family_con_ids" nolabel="1" colspan="4" attrs="{'readonly':[('state','=','alumni')]}">
<tree string="Family Contact Details">
<field name="relative_name"/>
<field name="relation" />
<field name="phone" />
</tree>
<form string="Family Contact Details">
<group>
<group>
<field name="rel_name" placeholder="Name" />
<field name="stu_name" placeholder="Create or Select Name" attrs="{'invisible':[('rel_name','!=','exist')]}"
options="{&quot;no_create&quot;: True}"/>
<field name="name" placeholder="Name" attrs="{'invisible':[('rel_name','!=','new')]}"/>
<field name="relation" placeholder="Enter or select Relation" />
<field name="relative_name" invisible="1"/>
</group>
<group>
<field name="phone" placeholder="Phone Number" />
<field name="email" placeholder="Email Address" />
</group>
</group>
</form>
</field>
</page>
<page string="Remarks">
<form string="Remarks">
<field name="remark" placeholder="Remark" nolabel="1" colspan="4" attrs="{'readonly':[('state','=','alumni')]}"/>
</form>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Admission Register Information -->
<record id="view_student_student_tree_2" model="ir.ui.view">
<field name="name">student.student.tree.2</field>
<field name="model">student.student</field>
<field name="arch" type="xml">
<tree string="Admission Register">
<field name="pid" />
<field name="name" />
<field name="student_name" invisible="1" />
<field name="year" widget="selection" />
<field name="standard_id" widget="selection" />
<field name="school_id" />
<field name="admission_date" />
<field name="gender" />
<field name="state" />
</tree>
</field>
</record>
<!-- Search View Of Admission Register Information -->
<record id="view_student_student_search_2" model="ir.ui.view">
<field name="name">student.student.search.2</field>
<field name="model">student.student</field>
<field name="arch" type="xml">
<search string="Admission Register">
<filter string="Draft" name="state_student" domain="[('state','=', 'draft')]" help="Admission In Draft State" />
<separator orientation="vertical" />
<field name="student_name" invisible="1" />
<field name="year" />
<field name="standard_id" />
<field name="gender" />
<field name="school_id" />
<newline />
<group expand="0" string="Group By..." colspan="12" col="10">
<filter name="class" string="Class" domain="[]" help="By Class" context="{'group_by':'standard_id'}" />
<filter name="gender" string="Gender" domain="[]" help="By Gender" context="{'group_by':'gender'}" />
<filter name="name" string="Name" domain="[]" help="By Class" context="{'group_by':'student_name'}" />
<filter name="school" string="School" help="By School" context="{'group_by':'school_id'}" />
</group>
</search>
</field>
</record>
<!-- Action Of Form, Tree & Kanban View Of Admission Register Information -->
<record id="action_student_student_form_2" model="ir.actions.act_window">
<field name="name">Admission Register</field>
<field name="res_model">student.student</field>
<field name="domain">['|',('state','=','draft'),('state','=','cancel')]</field>
<field name="view_id" ref="view_student_student_form_2" />
<field name="search_view_id" ref="view_student_student_search_2" />
<field name="view_mode">kanban,tree,form</field>
</record>
<!-- Action View 2 Of Kanban View Of Student Information -->
<record id="action_view_student_student_kanban_2" model="ir.actions.act_window.view">
<field name="view_mode">kanban</field>
<field eval="21" name="sequence" />
<field name="view_id" ref="student_student_kanban_view" />
<field name="act_window_id" ref="action_student_student_form_2" />
</record>
<!-- Action View 2 Of Tree View Of Student Information -->
<record id="action_student_student_tree_2" model="ir.actions.act_window.view">
<field name="view_mode">tree</field>
<field eval="20" name="sequence" />
<field name="view_id" ref="view_student_student_tree_2" />
<field name="act_window_id" ref="action_student_student_form_2" />
</record>
<!-- Action Of Form, Tree & Kanban Views Of Student Information -->
<record id="action_student_student_form_12" model="ir.actions.act_window">
<field name="name">Students</field>
<field name="domain">[('state', '=', 'done')]</field>
<field name="context">{'search_default_done_student':1}</field>
<field name="res_model">student.student</field>
<field name="view_id" ref="" />
<field name="search_view_id" ref="view_student_student_search_1" />
<field name="view_mode">kanban,tree,form</field>
</record>
<!-- Action of Alumni state -->
<record id="action_student_alumni" model="ir.actions.act_window">
<field name="name">Student Alumni</field>
<field name="domain">[('active','=',False)]</field>
<field name="res_model">student.student</field>
<field name="view_mode">kanban,tree,form</field>
</record>
<!-- Action View 1 Of Kanban View Of Student Information-->
<record id="action_view_student_student_kanban_1" model="ir.actions.act_window.view">
<field name="view_mode">kanban</field>
<field eval="31" name="sequence" />
<field name="view_id" ref="student_student_kanban_view" />
<field name="act_window_id" ref="action_student_student_form_12" />
</record>
</odoo>
<?xml version="1.0" ?>
<odoo>
<data>
<!-- search View Of Teahcer's Profiles -->
<record id="view_school_teacher_search" model="ir.ui.view">
<field name="name">school.teacher.search</field>
<field name="model">school.teacher</field>
<field name="arch" type="xml">
<search string="Employees">
<field name="name" string="Employees" filter_domain="['|',('work_email','ilike',self),('name','ilike',self)]"/>
<field name="department_id"/>
<field name="category_ids" groups="hr.group_hr_user"/>
<field name="job_id"/>
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group expand="0" string="Group By">
<filter name="manager" string="Manager" domain="[]" context="{'group_by':'parent_id'}"/>
<filter name="coach" string="Coach" domain="[]" context="{'group_by':'coach_id'}"/>
<filter name="department" string="Department" domain="[]" context="{'group_by':'department_id'}"/>
<filter name="job" string="Job" domain="[]" context="{'group_by':'job_id'}"/>
<filter name="company" string="Company" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<!-- tree View Of Teahcer's Profiles -->
<record id="view_school_teacher_tree" model="ir.ui.view">
<field name="name">school.teacher.tree</field>
<field name="model">school.teacher</field>
<field name="arch" type="xml">
<tree string="Faculty" decoration-bf="message_needaction==True">
<field name="name"/>
<field name="work_phone" invisible="1"/>
<field name="phone_numbers"/>
<field name="work_email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>
<field name="coach_id" invisible="1"/>
<field name="message_needaction" invisible="1"/>
</tree>
</field>
</record>
<!-- Form View Of Teahcer's Profiles -->
<record id="view_school_teacher_form" model="ir.ui.view">
<field name="name">school.teacher.form</field>
<field name="model">school.teacher</field>
<field name="arch" type="xml">
<form string="Faculty">
<sheet>
<!-- <field name="image" widget="image" class="oe_avatar" options="{&quot;preview_image&quot;:&quot;image_medium&quot;}"/>
--> <div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" placeholder="Teacher's Name" required='1'/>
</h1>
</div>
<field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time" groups="hr.group_hr_user"/>
<group>
<field name="standard_id" widget="selection"/>
<!-- <field name="standard_ids" required="1" widget="many2many_tags"/> -->
<field name="subject_id" required="1" widget="many2many_tags" options="{'no_create': True}"/>
<field name="school_id" widget="selection"/>
</group>
<group>
<field name="is_parent" widget="boolean_toggle"/>
<field name='stu_parent_id'
attrs="{'invisible':[('is_parent','=',False)],'required': [('is_parent','!=',False)]}"/>
</group>
<notebook>
<page name="public" string="Public Information">
<group>
<group string="Contact Information">
<field name="address_id" context="{'show_address': 1}" options="{&quot;always_reload&quot;: True, &quot;highlight_first_line&quot;: True}" string="Work Address"/>
<field name="mobile_phone" />
<field name="work_location" />
<field name="work_email" widget="email" required="1"/>
<field name="work_phone" invisible="1"/>
<field name="phone_numbers"/>
</group>
<group string="Position">
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>
<field name="coach_id"/>
</group>
</group>
<field name="notes" placeholder="Other Information ..." colspan="4"/>
</page>
<page string="Personal Information" groups="hr.group_hr_user">
<group>
<group string="Citizenship &amp; Other Information">
<field name="country_id" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}"/>
<field name="identification_id" groups="hr.group_hr_user"/>
<field name="passport_id" groups="hr.group_hr_user"/>
<field name="bank_account_id"/>
</group>
<group string="Contact Information">
<field name="address_home_id" context="{'show_address': 1}" options="{&quot;always_reload&quot;: True, &quot;highlight_first_line&quot;: True}"/>
</group>
<group string="Status">
<field name="gender"/>
<field name="marital"/>
</group>
<group string="Birth">
<field name="birthday"/>
</group>
</group>
</page>
<page string="Children" attrs="{'invisible': [('is_parent','=', False)]}">
<field name="student_id" domain="[('state', '=', 'done')]"/>
</page>
<page string="HR Settings" groups="hr.group_hr_user" invisible="1">
<group>
<group string="Status" name="active_group">
<field name="company_id" groups="base.group_multi_company"/>
<field name="user_id" string="Related User" context="{'default_groups_ref': ['base.group_user']}"/>
</group>
</group>
</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>
</form>
</field>
</record>
<!-- Action View Of school teacher-->
<record id="action_school_teacher_form" model="ir.actions.act_window">
<field name="name">Teacher Profile</field>
<field name="res_model">school.teacher</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="teacher_profile_menu" name="Teachers" action="action_school_teacher_form"
parent="menu_students_parents" sequence="32"
groups="school.group_school_administration,school.group_school_teacher"/>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend" name="school assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/school/static/src/scss/schoolcss.scss"/>
</xpath>
</template>
</data>
</odoo>
# See LICENSE file for full copyright and licensing details.
from . import assign_roll_no
from . import move_standards
from . import wiz_send_email
from . import teriminate_reason
# See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class AssignRollNo(models.TransientModel):
'''designed for assigning roll number to a student'''
_name = 'assign.roll.no'
_description = 'Assign Roll Number'
standard_id = fields.Many2one('school.standard', 'Class', required=True)
medium_id = fields.Many2one('standard.medium', 'Medium', required=True)
def assign_rollno(self):
'''Method to assign roll no to students'''
student_obj = self.env['student.student']
# Search Student
for rec in self:
student_ids = student_obj.search([
('standard_id', '=', rec.standard_id.id),
('medium_id', '=', rec.medium_id.id)],
order="name")
# Assign roll no according to name.
number = 1
for student in student_ids:
number += 1
student.write({'roll_no': number})
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Assign Roll Number Wizard Form View -->
<record id="view_assign_roll_no_form" model="ir.ui.view">
<field name="name">assign.roll.no.form</field>
<field name="model">assign.roll.no</field>
<field name="arch" type="xml">
<form string="Assigning Roll Number">
<separator string="Assign Roll Number" colspan="4"/>
<group colspan="4" col="6">
<field name="standard_id" widget="selection" />
<field name="medium_id" widget="selection" />
</group>
<footer>
<button class="btn btn-sm btn-default fa fa-ban" special="cancel" string="Close"/>
<button class="btn btn-sm btn-default fa fa-plus" name="assign_rollno" string="Finish" type="object"/>
</footer>
</form>
</field>
</record>
<!-- Action Of Form Views Of Assign Roll Number -->
<record id="action_assign_roll_no_form" model="ir.actions.act_window">
<field name="name">Assign Roll Number</field>
<field name="res_model">assign.roll.no</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_assign_roll_no_form" />
<field name="target">new</field>
</record>
<!-- MenuItem For Configurations->Move Classes -->
<menuitem id="menu_assign_rollno_form" name="Assign Roll Number" parent="menu_configuration" action="action_assign_roll_no_form" />
</odoo>
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields
class MoveStandards(models.TransientModel):
"""Defining TransientModel to move standard."""
_name = 'move.standards'
_description = "Move Standards"
academic_year_id = fields.Many2one('academic.year', 'Academic Year',
required=True)
def move_start(self):
'''Code for moving student to next standard'''
academic_obj = self.env['academic.year']
school_stand_obj = self.env['school.standard']
standard_obj = self.env["standard.standard"]
student_obj = self.env['student.student']
done_rec = student_obj.search([('state', '=', 'done')])
for stud in done_rec:
year_id = academic_obj.next_year(stud.year.sequence)
academic_year = academic_obj.search([('id', '=', year_id)],
limit=1)
standard_seq = stud.standard_id.standard_id.sequence
next_class_id = standard_obj.next_standard(standard_seq)
# Assign the academic year
if next_class_id:
division = (stud.standard_id.division_id.id or False)
next_stand = school_stand_obj.search([
('standard_id', '=', next_class_id),
('division_id', '=', division),
('school_id', '=', stud.school_id.id),
('medium_id', '=', stud.medium_id.id)])
if next_stand:
std_vals = {'year': academic_year.id,
'standard_id': next_stand.id}
# Move student to next standard
stud.write(std_vals)
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Assign Roll Number Wizard Form View -->
<record id="view_move_standards_form" model="ir.ui.view">
<field name="name">move_standards.form</field>
<field name="model">move.standards</field>
<field name="arch" type="xml">
<form string="Move Classes">
<group>
<field name="academic_year_id" placeholder="Enter Academic Year" widget="selection"/>
</group>
<footer>
<button class="btn btn-sm btn-default fa fa-ban" special="cancel" string="Close"/>
<button class="btn btn-sm btn-default fa fa-plus" name="move_start" string="Move" type="object"/>
</footer>
</form>
</field>
</record>
<!-- Action Of Form & Tree Views Of Move Classes -->
<record id="action_move_standards_form" model="ir.actions.act_window">
<field name="name">Move Classes</field>
<field name="res_model">move.standards</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_move_standards_form" />
<field name="target">new</field>
</record>
<!-- MenuItem For Configurations->Move Classes -->
<menuitem id="menu_move_standards_form" name="Move Classes" parent="menu_configuration" action="action_move_standards_form" />
</odoo>
# See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class TerminateReason(models.TransientModel):
"""Defining TransientModel to terminate reason."""
_name = "terminate.reason"
_description = "Terminate Reason"
reason = fields.Text('Reason')
def save_terminate(self):
'''Method to terminate student and change state to terminate.'''
self.env['student.student'].browse(
self._context.get('active_id')).write({
'state': 'terminate',
'terminate_reason': self.reason,
'active': False})
student_rec = self.env['student.student'].browse(
self._context.get('active_id'))
student_rec.standard_id._compute_total_student()
user = self.env['res.users'].search([
('id', '=', student_rec.user_id.id)])
student_reminder = self.env['student.reminder'].search([
('stu_id', '=', student_rec.id)])
for rec in student_reminder:
rec.active = False
if user:
user.active = False
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Form View of terminate student wizard -->
<record id="school_terminate_reason" model="ir.ui.view">
<field name="name">Terminate Reason</field>
<field name="model">terminate.reason</field>
<field name="arch" type="xml">
<form string="Terminate Wizard">
<sheet>
<group>
<field name="reason" required="1" nolabel="1" placeholder="Reason"/>
</group>
<footer>
<button name="save_terminate" string="Terminate" type="object"/>
<button special="cancel" string="Cancel"/>
</footer>
</sheet>
</form>
</field>
</record>
<!-- Action of Terminate Student Wizard -->
<record id="action_terminate_wizard" model="ir.actions.act_window">
<field name="name">Termination Reason</field>
<field name="res_model">terminate.reason</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</odoo>
# See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class MailTemplate(models.Model):
_inherit = "mail.template"
def generate_email(self, res_ids, fields=None):
'''Method to generate email.'''
ret = super(MailTemplate, self).generate_email(res_ids, fields=fields)
if (self._context.get('body_html', False) or
self._context.get('subject', False) or
self._context.get('email_to', False)):
ret['body_html'] = self._context['body_text']
ret['subject'] = self._context['subject']
ret['email_to'] = self._context['email_to']
return ret
#
#
class SendMail(models.TransientModel):
"""Defining TransientModel to send mail."""
_name = "send.email"
_description = "Send Mail"
note = fields.Text('Text')
def send_email(self):
'''Method to send email.'''
body = ''
email_template_obj = self.env['mail.template']
# search the model student.student
template_id = email_template_obj.search([
('model', '=', 'student.student')],
limit=1)
if template_id:
for i in self:
body += '\n' + i.note
email_template_obj.send_mail(template_id.id,
self._context.get('active_id'),
force_send=True)
return {'type': 'ir.actions.act_window_close'}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Form View Of Send Mail -->
<record id="wiz_send_email_form_view" model="ir.ui.view">
<field name="name">send.email.form</field>
<field name="model">send.email</field>
<field name="arch" type="xml">
<form string="Send Email">
<field name='note' nolabel="0" height="350" width="350" placeholder="Notes"/>
<br/>
<footer>
<button name="send_email" string="Send Email" class="btn btn-sm btn-default fa fa-envelope" type="object"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<!-- Action Of Form View Of Send Mail -->
<record id="act_send_email" model="ir.actions.act_window">
<field name="name">Send Email</field>
<field name="res_model">send.email</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="binding_model_id" ref="model_student_student"/>
<field name="binding_view_types">form</field>
<field name="groups_id" eval="[(4, ref('school.group_school_administration')),
(4, ref('school.group_school_teacher'))]"/>
</record>
</odoo>
=========
Timetable
=========
This module was written to extend the functionality of timetable management to support school management and allows you to manage timetable through this functionality.
Installation
============
To install this module, you need to:
install school module
Configuration
=============
To configure this module, you need to:
have a school Management functionality.
Usage
=====
To use this module, you need to:
go to apps, then install module to apply this functionality.
Try me on Runbot
Known issues / Roadmap
Bug Tracker
===========
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
=======
Credits
=======
Contributors
============
Serpent Consulting Services PVT. LTD. <http://serpentcs.com>
Maintainer
==========
Serpent Consulting Services PVT. LTD.
This module is maintained by the SerpentCS.
To contribute to this module, please visit http://serpentcs.com.
# See LICENSE file for full copyright and licensing details.
# ----------------------------------------------------------
# A Module for School Timetable Management System
# ----------------------------------------------------------
from . import models
from . import report
# See LICENSE file for full copyright and licensing details.
{
'name': 'Timetable Management',
'version': '14.0.1.0.0',
'author': '''Serpent Consulting Services Pvt. Ltd.''',
'website': 'http://www.serpentcs.com',
'license': "AGPL-3",
'category': 'School Management',
'complexity': 'easy',
'summary': 'A Module For Timetable Management In School',
'images': ['static/description/SchoolTimetable.png'],
'depends': ['school'],
'data': ['security/timetable_security.xml',
'security/ir.model.access.csv',
'report/report_view.xml',
'report/timetable.xml',
'views/timetable_view.xml',],
'demo': ['demo/timetable_demo.xml'],
'installable': True,
'application': True
}
<?xml version="1.0" ?>
<!DOCTYPE html>
<odoo>
<data noupdate="1">
<record id="demo_subject_subject_9" model="subject.subject">
<field name="name">Economic</field>
<field name="code">ECO</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="teacher_ids" eval="[(6, 0,[ref('school.demo_school_teacher_1')])]"/>
</record>
<record id="demo_subject_subject_10" model="subject.subject">
<field name="name">Account</field>
<field name="code">ACC</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="teacher_ids" eval="[(6, 0,[ref('school.demo_school_teacher_2'),ref('school.demo_school_teacher_3')])]"/>
</record>
<record id="demo_subject_subject_11" model="subject.subject">
<field name="name">Sanskrit</field>
<field name="code">SAN</field>
<field name="maximum_marks">100</field>
<field name="minimum_marks">35</field>
<field name="teacher_ids" eval="[(6,0,[ref('school.demo_school_teacher_1')])]"/>
</record>
<record id="school.demo_school_teacher_1" model="school.teacher">
<field eval="[(6,0,[ref('school.demo_subject_subject_1'),ref('school.demo_subject_subject_2'),ref('school.demo_subject_subject_3'),ref('school.demo_subject_subject_4'),ref('school.demo_subject_subject_5'),ref('demo_subject_subject_9'),ref('demo_subject_subject_11')])]" name="subject_id"/>
</record>
<record id="school.demo_school_teacher_2" model="school.teacher">
<field eval="[(6,0,[ref('school.demo_subject_subject_2'),ref('school.demo_subject_subject_3'),ref('school.demo_subject_subject_4'),ref('school.demo_subject_subject_5'),ref('school.demo_subject_subject_6'),ref('demo_subject_subject_10'),ref('demo_subject_subject_11')])]" name="subject_id"/>
</record>
<record id="school.demo_school_teacher_3" model="school.teacher">
<field eval="[(6,0,[ref('school.demo_subject_subject_1'),ref('school.demo_subject_subject_2'),ref('school.demo_subject_subject_6'),ref('demo_subject_subject_10'),ref('demo_subject_subject_11')])]" name="subject_id"/>
</record>
<record id="time_table_firsts0" model="time.table">
<!-- <field name="division_id" ref="school.demo_standard_division_2"/> -->
<field name="name">First</field>
<field name="standard_id" ref="school.demo_standard_standard_2"/>
<!-- <field name="medium_id" ref="school.demo_standard_medium_1"/>
<field name="class_id" ref="school.demo_school_standard_2"/> -->
<field name="year_id" ref="school.demo_academic_year_1"/>
</record>
<record id="time_table_line_0" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="9.0" name="start_time"/>
<field name="week_day">monday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="10.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_3"/>
</record>
<record id="time_table_line_1" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="10.0" name="start_time"/>
<field name="week_day">monday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="11.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_3"/>
</record>
<record id="time_table_line_2" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="11.0" name="start_time"/>
<field name="week_day">monday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="12.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_6"/>
</record>
<record id="time_table_line_3" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="13.0" name="start_time"/>
<field name="week_day">monday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="14.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
<record id="time_table_line_4" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="14.0" name="start_time"/>
<field name="week_day">monday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="15.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_1"/>
</record>
<record id="time_table_line_5" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="15.0" name="start_time"/>
<field name="week_day">monday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="16.0" name="end_time"/>
<field name="subject_id" ref="demo_subject_subject_10"/>
</record>
<record id="time_table_line_6" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="9.0" name="start_time"/>
<field name="week_day">tuesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="10.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_5"/>
</record>
<record id="time_table_line_7" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="10.0" name="start_time"/>
<field name="week_day">tuesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="11.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_3"/>
</record>
<record id="time_table_line_8" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="11.0" name="start_time"/>
<field name="week_day">tuesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="12.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_1"/>
</record>
<record id="time_table_line_9" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="13.0" name="start_time"/>
<field name="week_day">tuesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="14.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_2"/>
</record>
<record id="time_table_line_10" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="14.0" name="start_time"/>
<field name="week_day">tuesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="15.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
<record id="time_table_line_11" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="15.0" name="start_time"/>
<field name="week_day">tuesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="16.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_2"/>
</record>
<record id="time_table_line_12" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="9.0" name="start_time"/>
<field name="week_day">wednesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="10.0" name="end_time"/>
<field name="subject_id" ref="demo_subject_subject_9"/>
</record>
<record id="time_table_line_13" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="10.0" name="start_time"/>
<field name="week_day">wednesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="11.0" name="end_time"/>
<field name="subject_id" ref="demo_subject_subject_10"/>
</record>
<record id="time_table_line_14" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="11.0" name="start_time"/>
<field name="week_day">wednesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="12.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_1"/>
</record>
<record id="time_table_line_15" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="13.0" name="start_time"/>
<field name="week_day">wednesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="14.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_6"/>
</record>
<record id="time_table_line_16" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="14.0" name="start_time"/>
<field name="week_day">wednesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="15.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_2"/>
</record>
<record id="time_table_line_17" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="15.0" name="start_time"/>
<field name="week_day">wednesday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="16.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_5"/>
</record>
<record id="time_table_line_18" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="9.0" name="start_time"/>
<field name="week_day">thursday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="10.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_5"/>
</record>
<record id="time_table_line_19" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="10.0" name="start_time"/>
<field name="week_day">thursday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="11.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
<record id="time_table_line_20" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="11.0" name="start_time"/>
<field name="week_day">thursday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="12.0" name="end_time"/>
<field name="subject_id" ref="demo_subject_subject_11"/>
</record>
<record id="time_table_line_21" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="13.0" name="start_time"/>
<field name="week_day">thursday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="14.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
<record id="time_table_line_22" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="14.0" name="start_time"/>
<field name="week_day">thursday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="15.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_3"/>
</record>
<record id="time_table_line_23" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="15.0" name="start_time"/>
<field name="week_day">thursday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="16.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
<record id="time_table_line_24" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="9.0" name="start_time"/>
<field name="week_day">friday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="10.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
<record id="time_table_line_25" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="10.0" name="start_time"/>
<field name="week_day">friday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="11.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_6"/>
</record>
<record id="time_table_line_26" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="11.0" name="start_time"/>
<field name="week_day">friday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="12.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_5"/>
</record>
<record id="time_table_line_27" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="13.0" name="start_time"/>
<field name="week_day">friday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="14.0" name="end_time"/>
<field name="subject_id" ref="demo_subject_subject_9"/>
</record>
<record id="time_table_line_28" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="14.0" name="start_time"/>
<field name="week_day">friday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="15.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_3"/>
</record>
<record id="time_table_line_29" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="15.0" name="start_time"/>
<field name="week_day">friday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="16.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_2"/>
</record>
<record id="time_table_line_30" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="9.0" name="start_time"/>
<field name="week_day">saturday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="10.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_5"/>
</record>
<record id="time_table_line_31" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="10.0" name="start_time"/>
<field name="week_day">saturday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="11.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
<record id="time_table_line_32" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_3"/>
<field eval="11.0" name="start_time"/>
<field name="week_day">saturday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="12.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_2"/>
</record>
<record id="time_table_line_33" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_1"/>
<field eval="13.0" name="start_time"/>
<field name="week_day">saturday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="14.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_5"/>
</record>
<record id="time_table_line_34" model="time.table.line">
<field name="teacher_id" ref="school.demo_school_teacher_2"/>
<field eval="14.0" name="start_time"/>
<field name="week_day">saturday</field>
<field name="table_id" ref="time_table_firsts0"/>
<field eval="15.0" name="end_time"/>
<field name="subject_id" ref="school.demo_subject_subject_4"/>
</record>
</data>
</odoo>
# See LICENSE file for full copyright and licensing details.
from . import timetable
# See LICENSE file for full copyright and licensing details.
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class TimeTable(models.Model):
"""Defining model for time table."""
_description = 'Time Table'
_name = 'time.table'
@api.depends('timetable_ids')
def _compute_user(self):
'''Method to compute user.'''
for rec in self:
rec.user_ids = [teacher.teacher_id.employee_id.user_id.id
for teacher in rec.timetable_ids
]
name = fields.Char('Description', help='Enter description of timetable')
standard_id = fields.Many2one('school.standard', 'Academic Class',
required=True,
help="Select Standard")
year_id = fields.Many2one('academic.year', 'Year', required=True,
help="Select academic year")
timetable_ids = fields.One2many('time.table.line', 'table_id', 'TimeTable',
help='Enter the timetable pattern')
timetable_type = fields.Selection([('regular', 'Regular')],
'Time Table Type', default="regular",
invisible=True,
help='Select time table type')
user_ids = fields.Many2many('res.users', string="Users",
compute="_compute_user", store=True,
help='Teachers following this timetable')
class_room_id = fields.Many2one('class.room', 'Room Number',
help='''Class room in which tome table
would be followed''')
@api.constrains('timetable_ids')
def _check_lecture(self):
'''Method to check same lecture is not assigned on same day.'''
if self.timetable_type == 'regular':
domain = [('table_id', 'in', self.ids)]
line_ids = self.env['time.table.line'].search(domain)
for rec in line_ids:
records = [rec_check.id for rec_check in line_ids
if (rec.week_day == rec_check.week_day and
rec.start_time == rec_check.start_time and
rec.end_time == rec_check.end_time and
rec.teacher_id.id == rec.teacher_id.id)]
if len(records) > 1:
raise ValidationError(_('''
You cannot set lecture at same time %s at same day %s for teacher %s.!
''') % (rec.start_time, rec.week_day, rec.teacher_id.name))
# Checks if time is greater than 24 hours than raise error
if rec.start_time > 24 or rec.end_time > 24:
raise ValidationError(_('''
Start and End Time should be less than 24 hours!'''))
class TimeTableLine(models.Model):
"""Defining model for time table."""
_description = 'Time Table Line'
_name = 'time.table.line'
_rec_name = 'table_id'
@api.constrains('teacher_id', 'subject_id')
def check_teacher(self):
'''Check if lecture is not related to teacher than raise error.'''
for rec in self:
if (rec.teacher_id.id not in rec.subject_id.teacher_ids.ids and
rec.table_id.timetable_type == 'regular'):
raise ValidationError(_('''
The subject %s is not assigned to teacher %s.
''') % (rec.subject_id.name, rec.teacher_id.name))
teacher_id = fields.Many2one('school.teacher', 'Faculty Name',
help="Select Teacher")
subject_id = fields.Many2one('subject.subject', 'Subject Name',
help="Select Subject")
table_id = fields.Many2one('time.table', 'TimeTable')
start_time = fields.Float('Start Time', required=True,
help="Time according to timeformat of 24 hours")
end_time = fields.Float('End Time', required=True,
help="Time according to timeformat of 24 hours")
week_day = fields.Selection([('monday', 'Monday'),
('tuesday', 'Tuesday'),
('wednesday', 'Wednesday'),
('thursday', 'Thursday'),
('friday', 'Friday'),
('saturday', 'Saturday'),
('sunday', 'Sunday')], "Week day",
help='Select weekday for timetable')
class_room_id = fields.Many2one('class.room', 'Room Number',
help='''Class room in which time
table would be followed''')
@api.constrains('teacher_id', 'class_room_id')
def check_teacher_room(self):
"""Check available room for teacher."""
for rec in self:
timetable_rec = self.env['time.table'].search([
('id', '!=', rec.table_id.id)])
for data in timetable_rec:
for record in data.timetable_ids:
if (data.timetable_type == 'regular' and
rec.table_id.timetable_type == 'regular' and
rec.teacher_id == record.teacher_id and
rec.week_day == record.week_day and
rec.start_time == record.start_time):
raise ValidationError(_('''
There is a lecture of Lecturer at same time!'''))
if (data.timetable_type == 'regular' and
rec.table_id.timetable_type == 'regular' and
rec.class_room_id == record.class_room_id and
rec.start_time == record.start_time):
raise ValidationError(_("The room is occupied."))
class SubjectSubject(models.Model):
_inherit = "subject.subject"
@api.model
def _search(self, args, offset=0, limit=None, order=None, count=False,
access_rights_uid=None):
'''Override method to get subject related to teacher.'''
teacher_id = self._context.get('teacher_id')
if teacher_id:
for teacher_data in self.env['school.teacher'].browse(teacher_id):
args.append(('teacher_ids', 'in', [teacher_data.id]))
return super(SubjectSubject, self)._search(
args=args, offset=offset, limit=limit, order=order, count=count,
access_rights_uid=access_rights_uid)
# See LICENSE file for full copyright and licensing details.
from . import timetable_info
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<odoo>
<record id="report_time_table_qweb" model="ir.actions.report">
<field name="name">Timetable</field>
<field name="print_report_name">'Timetable(%s)'%object.standard_id.name</field>
<field name="model">time.table</field>
<field name="binding_model_id" ref="model_time_table"/>
<field name="report_type">qweb-pdf</field>
<field name="report_name">timetable.timetable</field>
<field name="report_file">timetable.timetable</field>
<field name="binding_type">report</field>
</record>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="timetable">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page">
<div class="oe_structure" /><br/><br/>
<h4 t-field="o.sudo().standard_id.school_id.name"></h4>
<div class="row" align="center">
<table width="100%" style="border: 2px solid black;">
<tr>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Academic Year</b>
</td>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Standard</b>
</td>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Division</b>
</td>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Medium</b>
</td>
</tr>
<tr>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-field="o.year_id.name"></span>
</td>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-field="o.standard_id.standard_id.name"></span>
</td>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-field="o.standard_id.division_id.name"></span>
</td>
<td width="25%" align="center" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-field="o.standard_id.medium_id.name"></span>
</td>
</tr>
<tr style="border: 0px;">
<td colspan="4" style="border: 0px;">
<t t-if="o.timetable_type == 'regular'">
<br/>
<table width="100%" style="border: 0px;">
<tr style="border: 0px;">
<td width="15%" align="center" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Time</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Monday</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Tuesday</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Wednesday</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Thursday</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Friday</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Saturday</b>
</td>
</tr>
<t t-foreach="get_timetable(o)" t-as="t">
<tr>
<td align="center" width="15%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-esc="'{0:,.2f}'.format(t['start_time'])"></span>
<span> - </span>
<span t-esc="'{0:,.2f}'.format(t['end_time'])"></span>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-esc="t.get('monday')"></span>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-esc="t.get('tuesday')"></span>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-esc="t.get('wednesday')"></span>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-esc="t.get('thursday')"></span>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-esc="t.get('friday')"></span>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-esc="t.get('saturday')"></span>
</td>
</tr>
</t>
</table>
</t>
<t t-if="o.timetable_type == 'exam'">
<br/>
<table width="100%" style="border: 2px solid black;">
<tr>
<td width="15%" align="center" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Exam Date Time</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>WeekDay</b>
</td>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 18px;border: 2px solid black;">
<b>Subject</b>
</td>
</tr>
<t t-foreach="o.exam_timetable_line_ids" t-as="t">
<tr>
<td align="center" width="14.16%" style="font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-field="t.exm_date" t-options="{'format': 'dd - MM - yyyy'}"></span>
<br />
<span t-esc="'{0:,.2f}'.format(t['start_time'])"></span>
<span>-</span>
<span t-esc="'{0:,.2f}'.format(t['end_time'])"></span>
</td>
<td align="center" width="14.16%" style="margin-top: 16px; font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-field="t.day_of_week" style="text-align: center;vertical-align: middle;" />
</td>
<td align="center" width="14.16%" style="margin-top: 16px; font-family: 'Helvetica';font-size: 16px;border: 2px solid black;">
<span t-field="t.subject_id.name" style="text-align: center;vertical-align: middle;" />
</td>
</tr>
</t>
</table>
</t>
</td>
</tr>
</table>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>
# See LICENSE file for full copyright and licensing details.
from odoo import api, models
class ReportTimetableInfo(models.AbstractModel):
_name = 'report.timetable.timetable'
_description = "Timetable details"
def _get_timetable(self, timetable_id):
"""Method to combain values for timetable"""
timetable_detail = []
self._cr.execute('''select t.start_time,t.end_time,s.name,week_day,
st.employee_id, hr.name as
teacher from time_table_line t,
subject_subject s, resource_resource r, school_teacher
st, hr_employee
hr where t.subject_id= s.id and t.teacher_id=st.id and
st.employee_id= hr.id
and t.table_id = %s
group by start_time,end_time,s.name,week_day,
st.employee_id,hr.name
order by start_time''', tuple([timetable_id.id]))
res = self._cr.dictfetchall()
self._cr.execute('''select start_time,end_time from time_table_line
where table_id=%s group by start_time,end_time
order by start_time''', tuple([timetable_id.id]))
time_data = self._cr.dictfetchall()
for time_detail in time_data:
for data in res:
if ((time_detail.get('start_time') == data.get('start_time'))
and (time_detail.get('end_time') == data.get('end_time'))):
if (data.get('name') == 'Recess'):
time_detail[data['week_day']] = data.get('name')
else:
td = data.get('name') + '\n(' + data.get(
'teacher') + ')'
time_detail[data['week_day']] = td
timetable_detail.append(time_detail)
return timetable_detail
@api.model
def _get_report_values(self, docids, data=None):
"""Inherited method to get report data"""
timetable_report = self.env['ir.actions.report']._get_report_from_name(
'timetable.timetable')
docs = self.env['time.table'].browse(docids)
return {
'doc_ids': docids,
'docs': docs,
'doc_model': timetable_report.model,
'data': data,
'get_timetable': self._get_timetable
}
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_academic_timetable1,time.table,model_time_table,school.group_school_administration,1,1,1,1
access_academic_timetbaleline1,time.table.line,model_time_table_line,school.group_school_administration,1,1,1,1
access_academic_timetable3,time.table,model_time_table,school.group_school_student,1,0,0,0
access_academic_timetbaleline3,time.table.line,model_time_table_line,school.group_school_student,1,0,0,0
access_academic_timetable4,time.table,model_time_table,school.group_school_teacher,1,0,0,0
access_academic_timetbaleline4,time.table.line,model_time_table_line,school.group_school_teacher,1,0,0,0
access_timetable_report_parent,time.table,model_time_table,school.group_school_parent,1,0,0,0
access_timetable_parent_report_line,time.table,model_time_table_line,school.group_school_parent,1,0,0,0
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<odoo>
<!-- Record Rule Of TimeTable For All Users -->
<record id="student_rule_timetable_record" model="ir.rule">
<field name="name">TimeTable Record rule as a student</field>
<field ref="model_time_table" name="model_id"/>
<field eval="1" name="global"/>
<field name="domain_force">[('standard_id.student_ids.user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_student'))]"/>
</record>
<!-- Record Rule Of TimeTable For Parents -->
<record id="parent_rule_timetable_record" model="ir.rule">
<field name="name">TimeTable Record rule as a parents</field>
<field ref="model_time_table" name="model_id"/>
<field eval="1" name="global"/>
<field name="domain_force">[('standard_id.student_ids.parent_id.partner_id','=',user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_parent'))]"/>
</record>
<!-- Record Rule teacher can see only realated lecture to him -->
<record id="timetable_teacher_record_rule" model="ir.rule">
<field name="name">Teacher Timetable Record Rule</field>
<field name="model_id" ref="model_time_table"/>
<field name="global" eval="True"/>
<field name="domain_force">[('user_ids','in',user.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_teacher'))]"/>
</record>
<!-- REcord Rule time table line -->
<record id="timetableline_teacher_record_rule" model="ir.rule">
<field name="name">Teacher TimetableLine Record Rule</field>
<field name="model_id" ref="model_time_table_line"/>
<field name="global" eval="True"/>
<field name="domain_force">[('teacher_id.employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('school.group_school_teacher'))]"/>
</record>
<!-- Record Rule Parents on timetable line -->
<record id="timetableline_record_rule_parents" model="ir.rule">
<field name="name">Parent TimetableLine Record Rule</field>
<field name="model_id" ref="model_time_table_line"/>
<field name="global" eval="True"/>
<field name="domain_force">[]</field>
<field name="groups" eval="[(4, ref('school.group_school_parent'))]"/>
</record>
</odoo>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B">Timetable Management</h2>
<h3 class="oe_slogan">This module provides the features of school timetable management.</h3>
<div style="text-align:center;font-size:18px">
<p>
To create timetable Go To EMS > Regular Timetable > Create
</p>
</div>
<div>
<img class="oe_demo oe_picture oe_screenshot" src="timetable2.png">
</div>
<div>
<img class="oe_demo oe_picture oe_screenshot" src="timetable1.png">
</div>
<div style="text-align:center;font-size:18px">
<p class='oe_mt32' style="text-align:center">
The user can create and edit timetable of particular class and academic year
</p>
</div>
<div>
<img class="oe_demo oe_picture oe_screenshot" style="width:700px" src="timetable3.png">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B">Timetable Report</h2>
<div style="text-align:center;font-size:18px">
<p class='oe_mt32'>
User can print regular timetable report.
</p>
</div>
<div>
<img class="oe_demo oe_picture oe_screenshot" src="timetablereport.png">
</div>
</div>
</section>
<section class="oe_container">
<table style="font-family: 'Helvetica Neue', Helvetica, Arial,sans-serif;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td colspan="2" style="font-size:16px; color:#d74930; font-weight:bold;" width="100%" align="center">
<span class="fa fa-certificate fa-1x" style="color:#697582;">Check out our various Odoo Services below</span>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
<table style="font-size:11px; color:#697582; line-height:20px;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/consulting" style="color:#697582; text-decoration:none;">Odoo Consulting</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/gap-analysis" style="color:#697582; text-decoration:none;">Gap Analysis and BPR</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/implementation" style="color:#697582; text-decoration:none;">Odoo Implementation</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/ecommerce-integrations/magento-integration" style="color:#697582; text-decoration:none;">Integration with E-Commerce</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/trainings/openerp-odoo-technical-training" style="color:#697582; text-decoration:none;">Odoo Technical Training</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/offshore-development-partnership" style="color:#697582; text-decoration:none;">Offshore & Onsite Development</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/odoo-packages/odoo-support-package" style="color:#697582; text-decoration:none;">Support and Maintenance</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/hire-odoo-openerp-developer" style="color:#697582; text-decoration:none;">Hire Dedicated Odoo Developer</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/ecommerce-integrations/paymentech-elavon-paypal-integration" style="color:#697582; text-decoration:none;">Payment Gateway Integrations</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/trainings/openerpodoo-functional-training" style="color:#697582; text-decoration:none;">Odoo Functional Training</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/community/aios-mobile-client" style="color:#697582; text-decoration:none;">Odoo Mobile App Development</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.odooqa.com/page/manual-functional-testing" style="color:#697582; text-decoration:none;">Odoo Manual Testing</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.odooqa.com/page/automated-functional-testing" style="color:#697582; text-decoration:none;">Odoo Automated Testing</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/ecommerce-integrations/fedex-ups-usps-integration" style="color:#697582; text-decoration:none;">Integration with Shipping API</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com/services/odoo-openerp-services/installation-and-hosting" style="color:#697582; text-decoration:none;">Installation & Hosting</a></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2" style="font-size:16px; color:#d74930; font-weight:bold;" width="100%" align="center">
<span class="fa fa-certificate fa-1x" style="color:#697582;">Check out our various Odoo Based Products</span>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
<table style="font-size:11px; color:#697582; line-height:20px;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="20%"><span class="fa fa-coffee fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/restaurant-management-system" style="color:#697582; text-decoration:none;">Restaurant Management</a></span></td>
<td width="20%"><span class="fa fa-building fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/property-management-system" style="color:#697582; text-decoration:none;">Property Management</a></span></td>
<td width="20%"><span class="fa fa-plane fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/visa-management-system" style="color:#697582; text-decoration:none;">Visa Agency Management</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/odoo-singapore-localization" style="color:#697582; text-decoration:none;">Singapore Localization</a></span></td>
<td width="20%"><span class="fa fa-graduation-cap fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/education-management-system" style="color:#697582; text-decoration:none;">School, University Management</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-cubes fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/construction-management-system" style="color:#697582; text-decoration:none;">Construction Management</a></span></td>
<td width="20%"><span class="fa fa-bus fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/fleet-management-systems" style="color:#697582; text-decoration:none;">Fleet Management</a></span></td>
<td width="20%"><span class="fa fa-stethoscope fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/healthcare-management-software" style="color:#697582; text-decoration:none;">Medical ERP</a></span></td>
<td width="20%"><span class="fa fa-hotel fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/hotel-management-system" style="color:#697582; text-decoration:none;">Hotel Management</a></span></td>
<td width="20%"><span class="fa fa-users fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/human-resource-management-system" style="color:#697582; text-decoration:none;">Human Resource Management</a></span></td>
</tr>
<tr>
<td width="20%"><span class="fa fa-map-marker fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/odoo-fieldstaff-tracking-system" style="color:#697582; text-decoration:none;">Field Service Management</a></span></td>
<td width="20%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/spa-salon-management-system" style="color:#697582; text-decoration:none;">Spa & Salone Management</a></span></td>
<td width="20%"><span class="fa fa-phone fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/odoo-ringcentral-integration" style="color:#697582; text-decoration:none;">Ringcentral telephone integration</a></span></td>
<td width="20%"><span class="fa fa-heart fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/customer-relationship-management" style="color:#697582; text-decoration:none;">Customer Relationship Management</a></span></td>
<td width="20%"><span class="fa fa-user fa-1x" style="color:#697582;"> <a href="http://serpentcs.in/product/talent-management-system" style="color:#697582; text-decoration:none;">Talent Management</a></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2" style="font-size:16px; color:#d74930; font-weight:bold;" width="100%" align="center">
<span class="fa fa-certificate fa-1x" style="color:#697582;">For any questions, support and development contact us.</span>
</td>
</tr>
<tr>
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
<table style="font-size:11px; color:#697582; line-height:20px;" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="38%"><span class="fa fa-whatsapp fa-1x" style="color:#697582;"> (+91) 98793-54457, (+91) 90334-72982 </span>
<span class="fa fa-phone fa-1x" style="color:#697582;"> +91-79-2975-0867</span></td>
<td width="17%"><span class="fa fa-envelope fa-1x" style="color:#697582;"> <a href="mailto:contact@serpentcs.com" style="color:#697582; text-decoration:none;">contact@serpentcs.com</a></span></td>
<td width="15%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.com" style="color:#697582; text-decoration:none;">www.serpentcs.com</a></span></td>
<td width="15%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.serpentcs.in" style="color:#697582; text-decoration:none;">www.serpentcs.in</a></span></td>
<td width="15%"><span class="fa fa-globe fa-1x" style="color:#697582;"> <a href="http://www.odooqa.com" style="color:#697582; text-decoration:none;">www.odooqa.com</a></span></td>
</tr>
<tr>
<td width="38%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> WhatsApp, Telegram or Call 24X7</span></td>
<td width="17%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> Help! Send Mail</span></td>
<td width="15%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> Browse our Services</span></td>
<td width="15%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> Browse our Products</span></td>
<td width="15%"><span class="fa fa-hand-pointer-o fa-1x" style="color:#697582;"> QA Services</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr colspan="2">
<td colspan="2" style="border-bottom:#d74930 solid 1px; line-height:10px;">&nbsp;
</td>
</tr>
<tr colspan="2">
<td colspan="2" style="padding-top:9px;">
<a href="https://www.facebook.com/Serpent-Consulting-Services-Pvt-Ltd-299017730141795/" style="text-decoration:none;"><img src="fb.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://twitter.com/Serpent_CS" style="text-decoration:none;"><img src="twitter.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://www.linkedin.com/company-beta/2435682/" style="text-decoration:none;"><img src="in.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://www.youtube.com/user/husendaudi123/videos" style="text-decoration:none;"><img src="youtube.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
<a href="https://www.instagram.com/explore/tags/serpentcs/"style="text-decoration:none;"><img src="insta.jpg" style="vertical-align:middle; border-radius: 50%;" width="25">
</a>
</td>
</tr>
<tr colspan="2">
<td colspan="2" style="font-size:8px; color:#697582; line-height:15px;padding-top:10px; text-align:justify;">
</td>
</tr>
</tbody>
</table>
</section>
# See LICENSE file for full copyright and licensing details.
# ----------------------------------------------------------
# A Module to Assignment Management System
# ----------------------------------------------------------
from . import test_timetable
# See LICENSE file for full copyright and licensing details.
from odoo.exceptions import UserError, ValidationError
from odoo.tests import common
class TestTimetable(common.TransactionCase):
def setUp(self):
super(TestTimetable, self).setUp()
self.time_table_obj = self.env['time.table']
self.time_table_line_obj = self.env['time.table.line']
self.stander_id = self.env.ref('school.demo_standard_standard_2')
self.year_id = self.env.ref('school.demo_academic_year_1')
self.subject_id = self.env.ref('school.demo_subject_subject_2')
self.teacher_id = self.env.ref('school.demo_school_teacher_1')
self.table_id = self.env.ref('timetable.time_table_firsts0')
self.room_id = self.env.ref('school.class_room15')
# Create time-table
self.time_table = self.time_table_obj.\
create({'name': 'Test Timetable',
'standard_id': self.stander_id.id,
'year_id': self.year_id.id,
'timetable_type': 'regular',
})
# Create timetable line
self.time_table_line = self.time_table_line_obj.\
create({'week_day': 'monday',
'teacher_id': self.teacher_id.id,
'subject_id': self.subject_id.id,
'start_time': '17.0',
'end_time': '18.0',
'table_id': self.time_table.id,
'class_room_id': self.room_id.id
})
def test_timetable(self):
self.assertIn(self.subject_id, self.teacher_id.subject_id)
<?xml version="1.0"?>
<!DOCTYPE html>
<odoo>
<!-- Form View Of Time Table Information -->
<record id="view_time_table_form" model="ir.ui.view">
<field name="name">time.table.form</field>
<field name="model">time.table</field>
<field name="arch" type="xml">
<form string="TimeTable">
<sheet>
<group col="4" colspan="4">
<field name="name" placeholder="Enter Description"/>
<field name="standard_id" placeholder="Select Standard" widget="selection"/>
<field name="year_id" placeholder="Select Year" widget="selection"/>
<field name="class_room_id" options="{&quot;no_create&quot;: True}" invisible="1"/>
<field name="user_ids" invisible="1"/>
</group>
<notebook colspan="4">
<page string="TimeTable">
<field name="timetable_ids" nolabel="1" colspan="4">
<tree string="TimeTable" editable="top">
<field name="week_day"/>
<field name="subject_id" required="1" options='{"no_open": True, "no_create": True}'/>
<field name="start_time"/>
<field name="end_time"/>
<field name="teacher_id" options='{"no_open": True, "no_create": True}' required="1"/>
<field name="class_room_id" options='{"no_open": True, "no_create": True}'/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Tree View Of Time Table Information -->
<record id="view_time_table_tree" model="ir.ui.view">
<field name="name">time.table.tree</field>
<field name="model">time.table</field>
<field name="arch" type="xml">
<tree string="TimeTable">
<field name="name"/>
<field name="standard_id"/>
<field name="year_id"/>
</tree>
</field>
</record>
<!-- Search View Time Table Information -->
<record id="timetable_search" model="ir.ui.view">
<field name="name">time.table.search</field>
<field name="model">time.table</field>
<field name="arch" type="xml">
<search string="TimeTable">
<field name="name"/>
<field name="standard_id"/>
<field name="year_id"/>
<newline/>
<group expand="1" string="Group By">
<filter name="class" string="Academic Class" help="By class"
context="{'group_by':'standard_id'}"/>
<filter name="year" string="Year" help="By year" context="{'group_by':'year_id'}"/>
</group>
</search>
</field>
</record>
<!-- Actions Of Form & Tree Views Of Time Table Information -->
<record id="action_timetable_regular" model="ir.actions.act_window">
<field name="name">Regular Timetable</field>
<field name="res_model">time.table</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('timetable_type','=','regular')]</field>
<field name="context">{'default_timetable_type':'regular'}</field>
</record>
<!-- Menu items of Timetable -->
<menuitem id="menu_timetable_1" name="TimeTable" parent="school.menu_ems" groups="school.group_school_administration,school.group_school_teacher,school.group_school_student,school.group_school_parent" sequence="6"/>
<menuitem id="menu_timetable_regular" name="Regular Timetable" parent="menu_timetable_1" action="action_timetable_regular" groups="school.group_school_administration,school.group_school_teacher,school.group_school_student,school.group_school_parent" sequence="61"/>
</odoo>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!