diff --git a/openeducat_admission/models/admission.py b/openeducat_admission/models/admission.py
index 467c50ae..a29ef6c8 100644
--- a/openeducat_admission/models/admission.py
+++ b/openeducat_admission/models/admission.py
@@ -352,9 +352,6 @@ def enroll_student(self):
'max_unit_load': record.course_id.max_unit_load or 0.0,
'state': 'draft',
})
- if not record.mobile:
- raise UserError(
- _('Please fill in the mobile number'))
reg_id.get_subjects()
def confirm_rejected(self):
diff --git a/openeducat_admission/models/admission_register.py b/openeducat_admission/models/admission_register.py
index 58e7a645..6544d8f7 100644
--- a/openeducat_admission/models/admission_register.py
+++ b/openeducat_admission/models/admission_register.py
@@ -64,6 +64,7 @@ class OpAdmissionRegister(models.Model):
'Terms', readonly=True,
tracking=True)
minimum_age_criteria = fields.Integer('Minimum Required Age(Years)', default=3)
+ application_count = fields.Integer(string="Total_record", compute="calculate_record_application")
company_id = fields.Many2one(
'res.company', string='Company',
@@ -88,6 +89,18 @@ def check_no_of_admission(self):
raise ValidationError(_(
"Min Admission can't be greater than Max Admission"))
+ def open_student_application(self):
+ return {
+ "type": "ir.actions.act_window",
+ "res_model": "op.admission",
+ "domain": [("register_id", "=", self.id)],
+ "name": "Applications",
+ "view_mode": "list,form",
+ }
+ def calculate_record_application(self):
+ record = self.env["op.admission"].search_count([("register_id", "=", self.id)])
+ self.application_count = record
+
def confirm_register(self):
self.state = 'confirm'
diff --git a/openeducat_admission/views/admission_register_view.xml b/openeducat_admission/views/admission_register_view.xml
index c41102d7..6a328df8 100644
--- a/openeducat_admission/views/admission_register_view.xml
+++ b/openeducat_admission/views/admission_register_view.xml
@@ -46,6 +46,12 @@
+
+
+
@@ -67,26 +73,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-