diff --git a/dental/controller/dental_portal.py b/dental/controller/dental_portal.py index 59753ee0a0..8190341855 100644 --- a/dental/controller/dental_portal.py +++ b/dental/controller/dental_portal.py @@ -6,7 +6,7 @@ class DentalPortal(CustomerPortal): @http.route('/my/dental', type='http', auth='user', website=True) def portal_my_dental(self, **kw): - patients = request.env['dental.patient'].search([('guarantor_id', '=', request.env.user.id)]) + patients = request.env['dental.patient'].search([('guarantor_id', '=', request.env.user.id), ('gender', '=', 'male'), ('patient_history_ids', '!=', False), ('emergency_contact_id', '!=', False)]) return request.render('dental.portal_my_dental', { 'patients': patients }) diff --git a/dental/models/dental_patient_history.py b/dental/models/dental_patient_history.py index a7a58be2ce..554d2b3832 100644 --- a/dental/models/dental_patient_history.py +++ b/dental/models/dental_patient_history.py @@ -38,7 +38,7 @@ class DentalPatientHistory(models.Model): ('full_consultation', 'Full Consultation with Bitewings and Scan'), ('basic_consultation', 'Basic Consultation'), ('no_consultation', 'No Consultation') - ], shabits_substance_abusetring="Consultation Type") + ], string="Consultation Type") call_out = fields.Boolean(string="Call Out") scale_and_polish = fields.Boolean(string="Scale and Polish") diff --git a/installment/__init__.py b/installment/__init__.py new file mode 100644 index 0000000000..134df27435 --- /dev/null +++ b/installment/__init__.py @@ -0,0 +1,2 @@ +from . import wizard +from . import models diff --git a/installment/__manifest__.py b/installment/__manifest__.py new file mode 100644 index 0000000000..a0a4c3d3b9 --- /dev/null +++ b/installment/__manifest__.py @@ -0,0 +1,19 @@ +{ + 'name': 'installment', + 'version': '1.0', + 'description': 'A module for installment', + 'category': 'sales', + 'author': 'YASP', + 'sequence': 1, + 'depends': ['base', 'sale_subscription', 'account'], + 'license': 'LGPL-3', + 'data': [ + 'security/ir.model.access.csv', + 'wizard/wizard_view.xml', + 'data/installment_data.xml', + 'views/res_config_settings_view.xml', + 'views/add_emi_view.xml' + ], + 'installable': True, + 'application': True, +} diff --git a/installment/data/installment_data.xml b/installment/data/installment_data.xml new file mode 100644 index 0000000000..cbff09db3a --- /dev/null +++ b/installment/data/installment_data.xml @@ -0,0 +1,8 @@ + + + Installment + + + EMI + + diff --git a/installment/models/__init__.py b/installment/models/__init__.py new file mode 100644 index 0000000000..0deb68c468 --- /dev/null +++ b/installment/models/__init__.py @@ -0,0 +1 @@ +from . import res_config_settings diff --git a/installment/models/res_config_settings.py b/installment/models/res_config_settings.py new file mode 100644 index 0000000000..7cce9ee746 --- /dev/null +++ b/installment/models/res_config_settings.py @@ -0,0 +1,19 @@ +from odoo import models, fields + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + max_duration = fields.Integer(string="Max Duration", config_parameter="installment.max_duration") + annual_rate_percentage = fields.Integer(string="Annual Rate Percentage", config_parameter="installment.annual_rate_percentage") + down_payment_percentage = fields.Integer(string="Down Payment Percentage", config_parameter="installment.down_payment_percentage") + administrative_expense_percentage = fields.Integer(string="Administrative Expense Percentage", config_parameter="installment.administrative_expense_percentage") + delay_penalty_percentage = fields.Integer(string="Delay Penalty Percentage", config_parameter="installment.delay_penalty_percentage") + delay_penalty_process = fields.Integer(string="Delay Penalty Process", config_parameter="installment.delay_penalty_process") + + nid = fields.Boolean(string="NID", config_parameter="installment.nid") + bank_statement = fields.Boolean(string="Bank Statement", config_parameter="installment.bank_statement") + rental_contract = fields.Boolean(string="Rental Contract", config_parameter="installment.rental_contract") + salary_components = fields.Boolean(string="Salary Components", config_parameter="installment.salary_components") + bank_rate_letter = fields.Boolean(string="Bank Rate Letter", config_parameter="installment.bank_rate_letter") + ownership_contract = fields.Boolean(string="Ownership Contract", config_parameter="installment.ownership_contract") \ No newline at end of file diff --git a/installment/security/ir.model.access.csv b/installment/security/ir.model.access.csv new file mode 100644 index 0000000000..42ec880d6f --- /dev/null +++ b/installment/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_installment_add_emi_wizard,access_installment_add_emi_wizard,model_installment_add_emi_wizard,base.group_user,1,1,1,1 diff --git a/installment/views/add_emi_view.xml b/installment/views/add_emi_view.xml new file mode 100644 index 0000000000..32eabf93c4 --- /dev/null +++ b/installment/views/add_emi_view.xml @@ -0,0 +1,15 @@ + + + add.emi.view + sale.order + + + +