Aadhar card, voter id removed

This commit is contained in:
Vidhya 2026-07-20 11:07:46 +05:30
parent b62a79e0c4
commit 287957764f
4 changed files with 6 additions and 7 deletions

View File

@ -2,8 +2,11 @@
import base64 import base64
import logging import logging
from datetime import datetime from datetime import datetime
# pyrefly: ignore [missing-import]
from odoo import http, fields, _, exceptions from odoo import http, fields, _, exceptions
# pyrefly: ignore [missing-import]
from odoo.http import request from odoo.http import request
# pyrefly: ignore [missing-import]
from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
@ -101,7 +104,7 @@ class EventRentalController(http.Controller):
req_product_id = int(product_id or post.get('product_id') or 0) req_product_id = int(product_id or post.get('product_id') or 0)
quantity = float(post.get('quantity') or 1.0) quantity = float(post.get('quantity') or 1.0)
doc_type = post.get('doc_type', 'aadhaar') doc_type = post.get('doc_type', 'driving_license')
id_proof_file = request.httprequest.files.get('id_proof') id_proof_file = request.httprequest.files.get('id_proof')
# Simple UI checks # Simple UI checks

View File

@ -1,6 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging import logging
# pyrefly: ignore [missing-import]
from odoo import models, fields, api, exceptions, _ from odoo import models, fields, api, exceptions, _
# pyrefly: ignore [missing-import]
from odoo.exceptions import UserError from odoo.exceptions import UserError
import urllib.parse import urllib.parse
@ -321,10 +323,8 @@ class EventDocument(models.Model):
request_id = fields.Many2one('event.rental.request', string='Rental Request', ondelete='cascade', required=True) request_id = fields.Many2one('event.rental.request', string='Rental Request', ondelete='cascade', required=True)
partner_id = fields.Many2one('res.partner', string='Customer') partner_id = fields.Many2one('res.partner', string='Customer')
doc_type = fields.Selection([ doc_type = fields.Selection([
('aadhaar', 'Aadhaar Card'),
('driving_license', 'Driving License'), ('driving_license', 'Driving License'),
('passport', 'Passport'), ('passport', 'Passport'),
('voter_id', 'Voter ID'),
('other', 'Other ID Proof') ('other', 'Other ID Proof')
], string='ID Proof Type', required=True) ], string='ID Proof Type', required=True)
attachment_id = fields.Many2one('ir.attachment', string='Attachment File', required=True) attachment_id = fields.Many2one('ir.attachment', string='Attachment File', required=True)

View File

@ -181,10 +181,8 @@
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="doc_type" style="font-weight: 500;">ID Proof Type</label> <label for="doc_type" style="font-weight: 500;">ID Proof Type</label>
<select name="doc_type" id="doc_type" class="form-control" style="border-radius: 6px; border: 1px solid #ddd; padding: 10px;"> <select name="doc_type" id="doc_type" class="form-control" style="border-radius: 6px; border: 1px solid #ddd; padding: 10px;">
<option value="aadhaar">Aadhaar Card</option>
<option value="driving_license">Driving License</option> <option value="driving_license">Driving License</option>
<option value="passport">Passport</option> <option value="passport">Passport</option>
<option value="voter_id">Voter ID</option>
</select> </select>
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-6">

View File

@ -419,10 +419,8 @@
<div class="form-group col-md-6 mb-3"> <div class="form-group col-md-6 mb-3">
<label for="doc_type">Government ID Proof <span class="text-danger">*</span></label> <label for="doc_type">Government ID Proof <span class="text-danger">*</span></label>
<select name="doc_type" id="doc_type" class="form-control" required="1"> <select name="doc_type" id="doc_type" class="form-control" required="1">
<option value="aadhaar" t-att-selected="post.get('doc_type') == 'aadhaar'">Aadhaar Card</option>
<option value="driving_license" t-att-selected="post.get('doc_type') == 'driving_license'">Driving License</option> <option value="driving_license" t-att-selected="post.get('doc_type') == 'driving_license'">Driving License</option>
<option value="passport" t-att-selected="post.get('doc_type') == 'passport'">Passport</option> <option value="passport" t-att-selected="post.get('doc_type') == 'passport'">Passport</option>
<option value="voter_id" t-att-selected="post.get('doc_type') == 'voter_id'">Voter ID</option>
</select> </select>
</div> </div>
<div class="form-group col-md-6 mb-3"> <div class="form-group col-md-6 mb-3">