From fa1e3fc438401496fdf1179ee0e5811efdcb2765 Mon Sep 17 00:00:00 2001 From: RisvanaCybro Date: Thu, 27 Jun 2024 11:51:13 +0530 Subject: [PATCH] Jun 27: [FIX] Bug Fixed 'vehicle_subscription' --- vehicle_subscription/__manifest__.py | 2 +- vehicle_subscription/controllers/vehicle_subscription.py | 2 +- vehicle_subscription/doc/RELEASE_NOTES.md | 5 +++++ vehicle_subscription/models/subscription_request.py | 3 ++- vehicle_subscription/wizard/change_subscription_views.xml | 4 ++-- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/vehicle_subscription/__manifest__.py b/vehicle_subscription/__manifest__.py index 03f8799b4..3059d2554 100644 --- a/vehicle_subscription/__manifest__.py +++ b/vehicle_subscription/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': 'Vehicle Subscription Management', - 'version': "16.0.1.0.0", + 'version': "16.0.1.1.0", 'category': 'Fleet', 'summary': """Vehicle Subscription Management From Website""", 'description': """Vehicle Subscription Management From Website""", diff --git a/vehicle_subscription/controllers/vehicle_subscription.py b/vehicle_subscription/controllers/vehicle_subscription.py index 895f1aee9..988398cb1 100644 --- a/vehicle_subscription/controllers/vehicle_subscription.py +++ b/vehicle_subscription/controllers/vehicle_subscription.py @@ -68,7 +68,7 @@ class OnlineSubscription(http.Controller): insurance_amount = request.env['vehicle.insurance'].sudo().browse( int(insurance)).insurance_amount insurance_type = request.env['vehicle.insurance'].sudo().search( - [('insurance_type_id.id', '=', insurance), + [('insurance_type_id.id', '=', int(insurance)), ('start_date', '<=', start), ('end_date', '>=', end)]) vehicle_ids = insurance_type.vehicle_id subscribed_vehicle_id = (request.env['fleet.subscription'].sudo(). diff --git a/vehicle_subscription/doc/RELEASE_NOTES.md b/vehicle_subscription/doc/RELEASE_NOTES.md index 638cd7400..c66989e94 100644 --- a/vehicle_subscription/doc/RELEASE_NOTES.md +++ b/vehicle_subscription/doc/RELEASE_NOTES.md @@ -4,3 +4,8 @@ #### Version 16.0.1.0.0 #### ADD Initial Commit Vehicle Subscription Management + +#### 27.06.2024 +#### Version 16.0.1.1.0 +#### UPDATE +Fixed issue in one of the xml file in the module diff --git a/vehicle_subscription/models/subscription_request.py b/vehicle_subscription/models/subscription_request.py index 3691192c6..48a3471fd 100644 --- a/vehicle_subscription/models/subscription_request.py +++ b/vehicle_subscription/models/subscription_request.py @@ -41,13 +41,14 @@ class SubscriptionRequest(models.Model): "customer will be set") new_vehicle_id = fields.Many2one('fleet.vehicle', string="New Vehicle" , domain="[('id', 'in', vehicle_ids)]", + required=True, help="Can choose different vehicle " "with same model") vehicle_ids = fields.Many2many('fleet.vehicle', compute='_compute_vehicle_ids', help="Compute and can choose vehicle with " "satisfying domain ") - reason_to_change = fields.Char(string="Reason", + reason_to_change = fields.Char(string="Reason", required=True, help="Reason for changing vehicle") state = fields.Selection( selection=[('to_approve', 'To Approve'), diff --git a/vehicle_subscription/wizard/change_subscription_views.xml b/vehicle_subscription/wizard/change_subscription_views.xml index dbdbfa75f..131c332e4 100644 --- a/vehicle_subscription/wizard/change_subscription_views.xml +++ b/vehicle_subscription/wizard/change_subscription_views.xml @@ -1,8 +1,8 @@ - - change.subscription.view + + change.subscription.view.form change.subscription