You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
6.0 KiB
118 lines
6.0 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<!--Form view for university attendance-->
|
|
<record id="university_attendance_view_form" model="ir.ui.view">
|
|
<field name="name">university.attendance.view.form</field>
|
|
<field name="model">university.attendance</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="action_attendance_done" type="object"
|
|
invisible="state != 'draft' "
|
|
class="oe_highlight" string="Done"/>
|
|
<field name="state" readonly="1" widget="statusbar"/>
|
|
</header>
|
|
<sheet>
|
|
<h1>
|
|
<field name="name" readonly="1"/>
|
|
</h1>
|
|
<group>
|
|
<group>
|
|
<field name="batch_id"/>
|
|
<field name="faculty_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="date"/>
|
|
<field name="is_attendance_created" invisible="1"/>
|
|
<field name="is_all_marked_morning" invisible="1"/>
|
|
<field name="is_all_marked_afternoon"
|
|
invisible="1"/>
|
|
</group>
|
|
</group>
|
|
<div style="padding-bottom: 10px;">
|
|
<button style="padding: 1px 5px;background: #5fb18e !important;border-color: #63b892 !important;"
|
|
string="Create Attendance Table"
|
|
name="action_create_attendance_line"
|
|
type="object"
|
|
invisible="is_attendance_created"
|
|
class="oe_highlight"/>
|
|
</div>
|
|
<div style="height: 30px;"
|
|
invisible="not is_attendance_created">
|
|
<div style="width: 69%;float:left;text-align:right;padding-right: 75px;"
|
|
invisible="state != 'draft' or is_all_marked_morning">
|
|
<button style="padding: 1px 5px;background-color: #5fb18d !important;border-color: #5fb18d !important;"
|
|
string="Mark All"
|
|
name="action_mark_all_present_morning"
|
|
type="object"
|
|
class="oe_highlight"/>
|
|
</div>
|
|
<div style="width: 69%;float:left;text-align:right;padding-right: 75px;"
|
|
invisible="state != 'draft' or not is_all_marked_morning">
|
|
<button style="padding: 1px 5px;background-color: #e25151;border-color: #e0e0e0;color:#575751;"
|
|
string="Un Mark"
|
|
name="action_un_mark_all_present_morning"
|
|
type="object"
|
|
class="oe_highlight"/>
|
|
</div>
|
|
<div style="width:22%;float:left;padding-left:12%;"
|
|
invisible="state != 'draft' or is_all_marked_afternoon">
|
|
<button style="padding: 1px 5px;background-color: #5fb18d !important;border-color: #5fb18d !important;"
|
|
string="Mark All"
|
|
name="action_mark_all_present_afternoon"
|
|
type="object"
|
|
class="oe_highlight"/>
|
|
</div>
|
|
<div style="width:22%;float:left;padding-left:12%;"
|
|
invisible="state != 'draft' or not is_all_marked_afternoon">
|
|
|
|
<button style="padding: 1px 5px;background-color: #e25151;border-color: #e0e0e0;color:#575751;"
|
|
string="Un Mark"
|
|
name="action_un_mark_all_present_afternoon"
|
|
type="object"
|
|
class="oe_highlight"/>
|
|
</div>
|
|
</div>
|
|
<div class="table_header_box"
|
|
invisible="not is_attendance_created">
|
|
|
|
<field name="attendance_line_ids">
|
|
<list editable="bottom" create="false"
|
|
delete="false">
|
|
<field name="student_id" readonly="1"
|
|
style=" width: 500px; "/>
|
|
<field name="is_present_morning"/>
|
|
<field name="is_present_afternoon"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
</sheet>
|
|
<chatter/>
|
|
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!--List view for university attendance-->
|
|
<record id="university_attendance_view_list" model="ir.ui.view">
|
|
<field name="name">university.attendance.view.list</field>
|
|
<field name="model">university.attendance</field>
|
|
<field name="arch" type="xml">
|
|
<list>
|
|
<field name="name"/>
|
|
<field name="batch_id"/>
|
|
<field name="date"/>
|
|
<field name="state"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
<!--Menu action of University attendance-->
|
|
<record id="university_attendance_action" model="ir.actions.act_window">
|
|
<field name="name">Attendance</field>
|
|
<field name="res_model">university.attendance</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
<menuitem id="university_attendance_menu"
|
|
parent="menu_university_attendance_root"
|
|
action="university_attendance_action"
|
|
name="Student Attendance" sequence="0"/>
|
|
</odoo>
|
|
|