106 lines
5.2 KiB
XML
106 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_education_student_payment_tree" model="ir.ui.view">
|
|
<field name="name">education.student.payment.tree</field>
|
|
<field name="model">education.student.payment</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Student Payments">
|
|
<field name="receipt_number"/>
|
|
<field name="student_id"/>
|
|
<field name="payment_date"/>
|
|
<field name="payment_method"/>
|
|
<field name="amount" sum="Total Amount"/>
|
|
<field name="reference_number"/>
|
|
<field name="status" widget="badge" decoration-info="status == 'draft'" decoration-success="status == 'confirmed'" decoration-danger="status == 'cancelled'"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_education_student_payment_form" model="ir.ui.view">
|
|
<field name="name">education.student.payment.form</field>
|
|
<field name="model">education.student.payment</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Student Payment">
|
|
<header>
|
|
<button name="action_confirm" string="Confirm Payment" type="object" class="oe_highlight" invisible="status != 'draft'"/>
|
|
<button name="action_cancel" string="Cancel Payment" type="object" invisible="status != 'confirmed'"/>
|
|
<!-- PDF Print Receipt Action Button -->
|
|
<button name="%(action_report_receipt_pdf)d" string="Print Receipt" type="action" class="oe_highlight" invisible="status != 'confirmed'"/>
|
|
<field name="status" widget="statusbar" statusbar_visible="draft,confirmed,cancelled"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1>
|
|
<field name="receipt_number" readonly="1"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="student_id" readonly="status != 'draft'"/>
|
|
<field name="amount" readonly="status != 'draft'"/>
|
|
<field name="payment_method" readonly="status != 'draft'"/>
|
|
</group>
|
|
<group>
|
|
<field name="payment_date" readonly="status != 'draft'"/>
|
|
<field name="reference_number" readonly="status != 'draft'"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<field name="remarks" placeholder="Enter transaction remarks..."/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_education_student_payment_search" model="ir.ui.view">
|
|
<field name="name">education.student.payment.search</field>
|
|
<field name="model">education.student.payment</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Student Payments">
|
|
<field name="receipt_number"/>
|
|
<field name="student_id"/>
|
|
<field name="reference_number"/>
|
|
<filter string="Confirmed" name="confirmed" domain="[('status', '=', 'confirmed')]"/>
|
|
<filter string="Draft" name="draft" domain="[('status', '=', 'draft')]"/>
|
|
<group expand="1" string="Group By">
|
|
<filter string="Student" name="group_student" context="{'group_by': 'student_id'}"/>
|
|
<filter string="Payment Method" name="group_method" context="{'group_by': 'payment_method'}"/>
|
|
<filter string="Status" name="group_status" context="{'group_by': 'status'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_education_student_payment_pivot" model="ir.ui.view">
|
|
<field name="name">education.student.payment.pivot</field>
|
|
<field name="model">education.student.payment</field>
|
|
<field name="arch" type="xml">
|
|
<pivot string="Collection Analysis">
|
|
<field name="payment_date" type="row" interval="month"/>
|
|
<field name="payment_method" type="col"/>
|
|
<field name="amount" type="measure"/>
|
|
</pivot>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_education_student_payment_graph" model="ir.ui.view">
|
|
<field name="name">education.student.payment.graph</field>
|
|
<field name="model">education.student.payment</field>
|
|
<field name="arch" type="xml">
|
|
<graph string="Collection Analysis" type="bar">
|
|
<field name="payment_date" interval="day"/>
|
|
<field name="amount" type="measure"/>
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_education_student_payment" model="ir.actions.act_window">
|
|
<field name="name">Payments</field>
|
|
<field name="res_model">education.student.payment</field>
|
|
<field name="view_mode">tree,form,pivot,graph</field>
|
|
<field name="search_view_id" ref="view_education_student_payment_search"/>
|
|
</record>
|
|
</odoo>
|