39 lines
2.0 KiB
XML
39 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_education_student_form_inherit_attendance" model="ir.ui.view">
|
|
<field name="name">education.student.form.inherit.attendance</field>
|
|
<field name="model">education.student</field>
|
|
<field name="inherit_id" ref="education_student.view_education_student_form"/>
|
|
<field name="arch" type="xml">
|
|
<!-- Replace placeholder Attendance button with dynamic record action -->
|
|
<xpath expr="//button[@icon='fa-calendar-check-o']" position="replace">
|
|
<button class="oe_stat_button" icon="fa-calendar-check-o" type="action" name="%(action_education_attendance_history)d" context="{'search_default_student_id': id}">
|
|
<div class="o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="attendance_pct" widget="float" precision="1"/>%
|
|
</span>
|
|
<span class="o_stat_text">Attendance</span>
|
|
</div>
|
|
</button>
|
|
</xpath>
|
|
|
|
<!-- Inject Attendance summary page in student tabs -->
|
|
<xpath expr="//notebook" position="inside">
|
|
<page string="Attendance Details" name="attendance_details" groups="education_attendance.group_attendance_user">
|
|
<group>
|
|
<group string="Summarized Metrics">
|
|
<field name="attendance_pct" widget="float" precision="1"/>
|
|
<field name="present_count"/>
|
|
<field name="absent_count"/>
|
|
</group>
|
|
<group string="Detailed Delineations">
|
|
<field name="late_count"/>
|
|
<field name="medical_leave_count"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|