Initial commit on branch odoo_DuyDat

This commit is contained in:
Duy Dat
2025-06-13 14:20:29 +07:00
commit 7819a1d6db
228 changed files with 4502 additions and 0 deletions
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2025-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 message_popup, reject_reason
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2025-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 MessageWizard(models.TransientModel):
"""For creating alert messages"""
_name = 'message.popup'
_description = 'Generate Popup Message'
message = fields.Text(string='Message', required=True, help="Alert Content")
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Message Wizard View-->
<record id="message_wizard_view_form" model="ir.ui.view">
<field name="name">message.popup.view.form</field>
<field name="model">message.popup</field>
<field name="arch" type="xml">
<form>
<p class="text-center">
<field name="message" readonly="1"/>
</p>
<footer>
<button string="Ok" class="oe_highlight" special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2025-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 RejectReasonWizard(models.TransientModel):
"""Reject reasons from the company side"""
_name = 'reject.reason'
_description = 'Reject Reasons From The Company Side'
reason = fields.Text(string="Reason", help="Reason Content", required=True)
loan = fields.Char(string="Loan", help="Invisible Field")
def action_reject_reason_txt(self):
"""Attach Reject Reason"""
loan_request = self.env['loan.request'].search(
[('name', '=', self.loan)])
loan_request.write({
'state': 'rejected',
'reject_reason': self.reason
})
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Reject Reason Wizard View-->
<record id="reject_reason_view_form" model="ir.ui.view">
<field name="name">reject.reason.view.form</field>
<field name="model">reject.reason</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<group>
<field name="reason"/>
<field name="loan" invisible="1"/>
</group>
<footer>
<button name="action_reject_reason_txt" string="Reject"
type="object" class="oe_highlight"/>
<button string="Cancel" class="btn btn-default"
special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>