@ -0,0 +1,51 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Educational Fee Management |
|||
========================== |
|||
Education fee is the core module of Educational ERP software,' a management application for effective school run . |
|||
|
|||
Configuration |
|||
============= |
|||
No additional configuration required |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
Affero General Public License v3.0 (AGPL v3) |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------ |
|||
Developer : (V15) Akhilesh N S, |
|||
(V17) Jumana Haseen, |
|||
(V18) Gayathri V |
|||
|
|||
Contact : odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if |
|||
your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import models |
@ -0,0 +1,59 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
{ |
|||
"name": "Educational Fee Management", |
|||
"version": '18.0.1.0.0', |
|||
"category": 'Industries', |
|||
'summary': """Education fee is the core module of Educational ERP software, |
|||
a management application for effective school run .""", |
|||
'description': """Education fee provides a comprehensive student fee |
|||
management solution to automate, streamline and transform fee processing |
|||
in educational institutions.""", |
|||
"author": "Cybrosys Techno Solutions", |
|||
"company": "Cybrosys Techno Solutions", |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
"website": "http://www.educationalerp.com", |
|||
"depends": ['account', 'education_core',], |
|||
"data": [ |
|||
'security/ir.model.access.csv', |
|||
'views/education_fee_structure_menu_views.xml', |
|||
'views/account_move_views.xml', |
|||
'views/education_fee_structure_views.xml', |
|||
'views/education_fee_type_views.xml', |
|||
'views/education_fee_category_views.xml', |
|||
'views/account_journal_templates.xml', |
|||
'views/account_journal_views.xml', |
|||
], |
|||
'demo': [ |
|||
'demo/account_account_demo.xml', |
|||
'demo/account_journal_demo.xml', |
|||
'demo/education_fee_category_demo.xml', |
|||
'demo/education_fee_structure_demo.xml', |
|||
'demo/education_fee_type_demo.xml', |
|||
'demo/education_fee_structure_lines_demo.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
"installable": True, |
|||
"auto_install": False, |
|||
'application': True, |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!--Journal Account--> |
|||
<record id="a_institutional_fees" model="account.account"> |
|||
<field name="code">100110</field> |
|||
<field name="name">Institutional Fee</field> |
|||
<field name="reconcile" eval="True"/> |
|||
<field name="account_type">income</field> |
|||
</record> |
|||
<record id="a_hostel_fees" model="account.account"> |
|||
<field name="code">111110</field> |
|||
<field name="name">Hostel Fee</field> |
|||
<field name="reconcile" eval="True"/> |
|||
<field name="account_type">income</field> |
|||
</record> |
|||
<record id="a_transportation_fees" model="account.account"> |
|||
<field name="code">120110</field> |
|||
<field name="name">Transportation Fee</field> |
|||
<field name="reconcile" eval="True"/> |
|||
<field name="account_type">income</field> |
|||
</record> |
|||
<record id="a_other_fees" model="account.account"> |
|||
<field name="code">20011014</field> |
|||
<field name="name">Other Fee</field> |
|||
<field name="account_type">income</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!-- Journal--> |
|||
<record id="account_journal_institutional_fees" model="account.journal"> |
|||
<field name="name">Institutional Fee</field> |
|||
<field name="type">sale</field> |
|||
<field name="code">IFEE</field> |
|||
<field name="default_account_id" ref="education_fee.a_institutional_fees"/> |
|||
<field name="refund_sequence" eval="True"/> |
|||
<field name="is_fee">True</field> |
|||
</record> |
|||
<record id="account_journal_hostel_fees" model="account.journal"> |
|||
<field name="name">Hostel Fee</field> |
|||
<field name="type">sale</field> |
|||
<field name="default_account_id" ref="education_fee.a_hostel_fees"/> |
|||
<field name="code">HFEE</field> |
|||
<field name="refund_sequence" eval="True"/> |
|||
<field name="is_fee">True</field> |
|||
</record> |
|||
<record id="account_journal_transportation_fees" |
|||
model="account.journal"> |
|||
<field name="name">Transportations Fee</field> |
|||
<field name="type">sale</field> |
|||
<field name="default_account_id" ref="education_fee.a_transportation_fees"/> |
|||
<field name="code">TFEE</field> |
|||
<field name="refund_sequence" eval="True"/> |
|||
<field name="is_fee">True</field> |
|||
</record> |
|||
<record id="account_journal_other_fees" model="account.journal"> |
|||
<field name="name">Other Fee</field> |
|||
<field name="type">sale</field> |
|||
<field name="default_account_id" ref="education_fee.a_other_fees"/> |
|||
<field name="code">OFEE</field> |
|||
<field name="refund_sequence" eval="True"/> |
|||
<field name="is_fee">True</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<!-- Institutional Fee Category --> |
|||
<record id="education_fee_category1" model="education.fee.category"> |
|||
<field name="name">Institutional</field> |
|||
<field name="journal_id" ref="education_fee.account_journal_institutional_fees"/> |
|||
<field name="fee_structure">1</field> |
|||
</record> |
|||
<!-- Transportation Fee Category --> |
|||
<record id="education_fee_category2" model="education.fee.category"> |
|||
<field name="name">Transportation</field> |
|||
<field name="journal_id" ref="education_fee.account_journal_transportation_fees"/> |
|||
<field name="fee_structure">0</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,12 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!-- Education fee structure demo--> |
|||
<record id="education_fee_structure1" model="education.fee.structure"> |
|||
<field name="academic_year_id" ref="education_core.education_academic_year_data"/> |
|||
<field name="amount_total">21000</field> |
|||
<field name="fee_structure_name">Nursery and Reception</field> |
|||
<field name="category_id" ref="education_fee.education_fee_category2"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!-- Education fee structure lines demo--> |
|||
<record id="education_fee_structure1_line1" model="education.fee.structure.lines"> |
|||
<field name="fee_type_id" ref="education_fee.education_fee_type2"/> |
|||
<field name="fee_structure_id" ref="education_fee.education_fee_structure1"/> |
|||
<field name="payment_type">onetime</field> |
|||
<field name="fee_description">Admission Fee</field> |
|||
<field name="interval">One time</field> |
|||
<field name="fee_amount">1000</field> |
|||
</record> |
|||
<record id="education_fee_structure1_line2" model="education.fee.structure.lines"> |
|||
<field name="fee_type_id" ref="education_fee.education_fee_type1"/> |
|||
<field name="fee_structure_id" ref="education_fee.education_fee_structure1"/> |
|||
<field name="payment_type">peryear</field> |
|||
<field name="fee_description">Tuition Fee</field> |
|||
<field name="interval">Annually</field> |
|||
<field name="fee_amount">1500</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!-- Education fee type demo--> |
|||
<record id="education_fee_type1" model="education.fee.type"> |
|||
<field name="name">Tuition Fee</field> |
|||
<field name="interval">Annually</field> |
|||
<field name="payment_type">peryear</field> |
|||
<field name="description_sale">The Fee which has to be remitted in institution as tuition fee</field> |
|||
<field name="lst_price">1500</field> |
|||
<field name="category_id" ref="education_fee.education_fee_category1"/> |
|||
</record> |
|||
<record id="education_fee_type2" model="education.fee.type"> |
|||
<field name="name">Admission Fee</field> |
|||
<field name="interval">One time</field> |
|||
<field name="payment_type">onetime</field> |
|||
<field name="description_sale">The Fee which has to be remitted in institution when joining</field> |
|||
<field name="lst_price">1000</field> |
|||
<field name="category_id" ref="education_fee.education_fee_category2"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,6 @@ |
|||
## Module <education_fee> |
|||
|
|||
#### 27.12.2024 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Educational Fee Management |
@ -0,0 +1,28 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import account_journal |
|||
from . import account_move |
|||
from . import account_move_line |
|||
from . import education_fee_category |
|||
from . import education_fee_structure |
|||
from . import education_fee_structure_lines |
|||
from . import education_fee_type |
@ -0,0 +1,44 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class AccountJournal(models.Model): |
|||
"""Inherited 'account.journal' model""" |
|||
_inherit = 'account.journal' |
|||
|
|||
is_fee = fields.Boolean(string='Is Educational fee?', |
|||
help="Whether educational fee or not.") |
|||
|
|||
def action_create_new_fee(self): |
|||
"""Function to return receipt form with details""" |
|||
view = self.env.ref('education_fee.receipt_form') |
|||
context = self._context.copy() |
|||
context.update({'journal_id': self.id, 'default_journal_id': self.id}) |
|||
context.update({'default_move_type': 'out_invoice'}) |
|||
return { |
|||
'type': 'ir.actions.act_window', |
|||
'view_mode': 'form', |
|||
'res_model': 'account.move', |
|||
'view_id': view.id, |
|||
'context': context, |
|||
} |
@ -0,0 +1,163 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
import datetime |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class AccountMove(models.Model): |
|||
"""Inherited model 'account.move' """ |
|||
_inherit = 'account.move' |
|||
|
|||
@api.onchange('fee_structure_id') |
|||
def _onchange_fee_structure(self): |
|||
"""Set default fee lines based on selected fee structure""" |
|||
for item in self: |
|||
lines = [] |
|||
for line in item.fee_structure_id.fee_type_ids: |
|||
name = line.fee_type_id.product_variant_id.description_sale |
|||
if not name: |
|||
name = line.fee_type_id.product_variant_id.name |
|||
fee_line = { |
|||
'price_unit': line.fee_amount, |
|||
'quantity': 1.00, |
|||
'product_id': line.fee_type_id.product_variant_id, |
|||
'name': name, |
|||
'account_id': item.journal_id.default_account_id |
|||
} |
|||
lines.append((0, 0, fee_line)) |
|||
item.invoice_line_ids = lines |
|||
|
|||
@api.onchange('student_id', 'fee_category_id', 'payed_from_date', |
|||
'payed_to_date') |
|||
def _onchange_student_id(self): |
|||
"""Student_id is inherited from res_partner. Set partner_id from |
|||
student_id """ |
|||
self.ensure_one() |
|||
lines = [] |
|||
for item in self: |
|||
item.invoice_line_ids = lines |
|||
item.partner_id = item.student_id.partner_id |
|||
item.class_division_id = item.student_id.class_division_id |
|||
date_today = datetime.date.today() |
|||
company = self.env.user.company_id |
|||
from_date = item.payed_from_date |
|||
to_date = item.payed_to_date |
|||
if not from_date: |
|||
from_date = company.compute_fiscalyear_dates(date_today)[ |
|||
'date_from'] |
|||
if not to_date: |
|||
to_date = date_today |
|||
if item.partner_id and item.fee_category_id: |
|||
invoice_ids = self.env['account.move'].search([ |
|||
('partner_id', '=', item.partner_id.id), |
|||
('invoice_date', '>=', from_date), |
|||
('invoice_date', '<=', to_date), |
|||
('fee_category_id', '=', item.fee_category_id.id)]) |
|||
for invoice in invoice_ids: |
|||
for line in invoice.invoice_line_ids: |
|||
fee_line = { |
|||
'price_unit': line.price_unit, |
|||
'quantity': line.quantity, |
|||
'product_id': line.product_id, |
|||
'price_subtotal': line.price_subtotal, |
|||
'tax_ids': line.tax_ids, |
|||
'discount': line.discount, |
|||
'receipt_no': line.move_name, |
|||
'date': line.move_id.invoice_date, |
|||
} |
|||
lines.append((0, 0, fee_line)) |
|||
item.payed_line_ids = lines |
|||
|
|||
@api.onchange('fee_category_id') |
|||
def _onchange_fee_category_id(self): |
|||
""" Set domain for fee structure based on category""" |
|||
self.invoice_line_ids = None |
|||
return { |
|||
'domain': { |
|||
'fee_structure_id': [ |
|||
('category_id', '=', self.fee_category_id.id)] |
|||
|
|||
} |
|||
} |
|||
|
|||
@api.onchange('fee_category_id') |
|||
def _onchange_fee_category_id(self): |
|||
"""Function to get category details""" |
|||
for item in self: |
|||
if item.fee_category_id: |
|||
line = self.fee_category_id.journal_id |
|||
item.journal_id = line |
|||
|
|||
journal_id = fields.Many2one('account.journal', string='Journal', |
|||
required=True, help="Corresponding journal " |
|||
" stores every details of " |
|||
"your transaction.") |
|||
student_id = fields.Many2one('education.student', |
|||
string='Admission No', help='Student admission' |
|||
' number.') |
|||
student_name = fields.Char(string='Name', |
|||
related='student_id.partner_id.name', store=True, |
|||
help='Name of student.') |
|||
class_division_id = fields.Many2one('education.class.division', |
|||
string='Class', help='Class of the' |
|||
' student.') |
|||
fee_structure_id = fields.Many2one('education.fee.structure', |
|||
string='Fee Structure', |
|||
help='Fee structure') |
|||
is_fee = fields.Boolean(string='Is Fee', store=True, default=False, |
|||
help='Fees boolean to specify whether fee or not.') |
|||
fee_category_id = fields.Many2one('education.fee.category', |
|||
string='Category', |
|||
help='Category of fees.') |
|||
is_fee_structure = fields.Boolean(string='Have a fee structure?', |
|||
related='fee_category_id.fee_structure', |
|||
help='Whether fee structure exists.') |
|||
payed_line_ids = fields.One2many('account.move.line', 'partner_id', |
|||
string='Payments Done', |
|||
readonly=True, store=False, |
|||
help='Payment lines.') |
|||
payed_from_date = fields.Date(string='From Date', |
|||
help='From date corresponding to the payment') |
|||
payed_to_date = fields.Date(string='To Date', |
|||
help='To date corresponding to the payment') |
|||
account_id = fields.Many2one('account.account', string='Account', |
|||
index=True, ondelete="cascade", |
|||
domain="[('deprecated', '=', False)," |
|||
" ('company_id', '=', 'company_id')" |
|||
",('is_off_balance', '=', False)]", |
|||
check_company=True, |
|||
tracking=True, help='Account of ' |
|||
'transaction.') |
|||
partner_id = fields.Many2one('res.partner', |
|||
string='Partner', help='Partner responsible.') |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
""" Adding two field to invoice. is_fee use to display fee items only |
|||
in fee tree view""" |
|||
partner = self.env['res.partner'].browse(vals.get('partner_id')) |
|||
if vals.get('fee_category_id'): |
|||
vals.update({ |
|||
'is_fee': True, |
|||
'student_name': partner.name |
|||
}) |
|||
return super().create(vals) |
@ -0,0 +1,49 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class AccountMoveLine(models.Model): |
|||
"""Inheriting model 'account.move.line'""" |
|||
_inherit = 'account.move.line' |
|||
|
|||
manual = fields.Boolean(string="Manual", help="True for manual", |
|||
default=True) |
|||
date = fields.Date(string='Date', help="Date of payment", readonly=True) |
|||
receipt_no = fields.Char(string='Receipt No', |
|||
help="Uniquely identifies the payment") |
|||
|
|||
@api.onchange('product_id') |
|||
def _get_category_domain(self): |
|||
"""Set domain for invoice lines depend on selected category""" |
|||
if self.move_id.fee_category_id: |
|||
fee_types = self.env['education.fee.type'].search( |
|||
[('category_id', '=', self.move_id.fee_category_id.id)]) |
|||
fee_list = [] |
|||
for fee in fee_types: |
|||
fee_list.append(fee.product_variant_id.id) |
|||
vals = { |
|||
'domain': { |
|||
'product_id': [('id', 'in', tuple(fee_list))] |
|||
} |
|||
} |
|||
return vals |
@ -0,0 +1,47 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class EducationFeeCategory(models.Model): |
|||
"""Creating model 'education.fee.category' and adding fields""" |
|||
_name = 'education.fee.category' |
|||
_description = 'Education Fee Category' |
|||
|
|||
name = fields.Char(string='Name', required=True, |
|||
help='Create a fee category suitable for your ' |
|||
'institution. Like Institutional, Hostel, ' |
|||
'Transportation, Arts and Sports, etc') |
|||
journal_id = fields.Many2one('account.journal', |
|||
string='Journal', required=True, |
|||
help='Setting up of unique journal for each ' |
|||
'category help to distinguish ' |
|||
'account entries of each category ') |
|||
fee_structure = fields.Boolean(string='Have a Fee Structure?', |
|||
required=True, |
|||
help='If any fee structure want to be ' |
|||
'included in this category ' |
|||
'you must click here.' |
|||
'For an example Institution ' |
|||
'category have different kind of' |
|||
' fee structures ' |
|||
'for different syllabuses') |
@ -0,0 +1,64 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class EducationFeeStructure(models.Model): |
|||
"""Creating model 'education.fee.structure'""" |
|||
_name = 'education.fee.structure' |
|||
_description = 'Education Fee Structure' |
|||
_rec_name = 'fee_structure_name' |
|||
|
|||
@api.depends('fee_type_ids.fee_amount') |
|||
def compute_total(self): |
|||
self.amount_total = sum(line.fee_amount for line in self.fee_type_ids) |
|||
|
|||
company_currency_id = fields.Many2one('res.currency', |
|||
string='Company Currency', |
|||
compute='get_company_id', |
|||
readonly=True, related_sudo=False, |
|||
help='Company currency') |
|||
fee_structure_name = fields.Char(string='Name', required=True, |
|||
help='Name of fee structure') |
|||
fee_type_ids = fields.One2many('education.fee.structure.lines', |
|||
'fee_structure_id', |
|||
string='Fee Types', help='Specify the ' |
|||
'fee types.') |
|||
comment = fields.Text(string='Additional Information', |
|||
help="Additional information regarding the fee" |
|||
" structure") |
|||
academic_year_id = fields.Many2one('education.academic.year', |
|||
string='Academic Year', required=True, |
|||
help='Mention the academic year.') |
|||
expire = fields.Boolean(string='Expire', |
|||
help='Expired or not') |
|||
amount_total = fields.Float(string='Amount', |
|||
currency_field='company_currency_id', |
|||
required=True, compute='compute_total', |
|||
help='Total amount') |
|||
category_id = fields.Many2one('education.fee.category', |
|||
string='Category', required=True, |
|||
default=lambda self: self.env[ |
|||
'education.fee.category'].search([], |
|||
limit=1), |
|||
domain=[('fee_structure', '=', True)], |
|||
help='Fees category.') |
@ -0,0 +1,64 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class EducationFeeStructureLines(models.Model): |
|||
"""Creating model 'education.fee.structure.lines'""" |
|||
_name = 'education.fee.structure.lines' |
|||
_description = 'Education Fee Structure Lines' |
|||
|
|||
@api.onchange('fee_type_id') |
|||
def _onchange_fee_type(self): |
|||
"""Function to return Fee type ids""" |
|||
return { |
|||
'domain': { |
|||
'fee_type_id': [('category_id', '=', |
|||
self.fee_structure_id.category_id.id)] |
|||
} |
|||
} |
|||
|
|||
fee_type_id = fields.Many2one('education.fee.type', string='Fee', |
|||
required=True, |
|||
help='Fee Type of fee structure') |
|||
fee_structure_id = fields.Many2one('education.fee.structure', |
|||
string='Fee Structure', |
|||
ondelete='cascade', index=True, |
|||
help='Education fee structure of lines') |
|||
fee_amount = fields.Float('Amount', required=True, |
|||
related='fee_type_id.lst_price', |
|||
help='Corresponding fee amount.') |
|||
payment_type = fields.Selection([ |
|||
('onetime', 'One Time'), |
|||
('permonth', 'Per Month'), |
|||
('peryear', 'Per Year'), |
|||
('sixmonth', '6 Months'), |
|||
('threemonth', '3 Months') |
|||
], string='Payment Type', related="fee_type_id.payment_type", |
|||
help='Payment type describe how much a payment effective Like,' |
|||
' bus fee per month is 30 dollar, sports fee per year' |
|||
' is 40 dollar, etc') |
|||
interval = fields.Char(related="fee_type_id.interval", string="Interval", |
|||
help='Specify the interval.') |
|||
fee_description = fields.Text('Description', |
|||
related='fee_type_id.description_sale', |
|||
help='Give the fee description.') |
@ -0,0 +1,65 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class EducationFeeType(models.Model): |
|||
"""Creating model 'education.fee.type' with fields""" |
|||
_name = 'education.fee.type' |
|||
_inherits = {'product.product': 'product_variant_id'} |
|||
|
|||
payment_type = fields.Selection([ |
|||
('onetime', 'One Time'), |
|||
('permonth', 'Per Month'), |
|||
('peryear', 'Per Year'), |
|||
('sixmonth', '6 Months'), |
|||
('threemonth', '3 Months') |
|||
], string='Payment Type', default='permonth', |
|||
help='Payment type describe how much a payment effective.' |
|||
' Like, bus fee per month is 30 dollar, sports fee per ' |
|||
'year is 40 dollar, etc') |
|||
interval = fields.Char(string='Payment Interval', |
|||
help='Interval describe the payment mode of the fee.' |
|||
'For example, Monthly means the fee must be ' |
|||
'paid in each month.' |
|||
'Yearly means the payment paid only ' |
|||
'one time uin year.') |
|||
|
|||
category_id = fields.Many2one('education.fee.category', |
|||
string='Category', |
|||
required=True, |
|||
help="Fee category", |
|||
default=lambda self: self.env[ |
|||
'education.fee.category'].search([], |
|||
limit=1)) |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
"""Function calls the create method of the superclass to |
|||
perform the actual record creation""" |
|||
category_id = self.env['education.fee.category'].browse( |
|||
vals.get('category_id')) |
|||
vals.update({ |
|||
'property_account_income_id': category_id.journal_id.default_account_id.id, |
|||
}) |
|||
res = super().create(vals) |
|||
return res |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 3.2 KiB |