Hi Prince, You try my way
Step1 : Create a javascript file and call a python function when URL changes
refer : https://www.odoo.com/forum/help-1/question/odoo-9-website-js-help-109603#answer-109604
Pass the current url in that function
Example
$(window).on('hashchange', function(e){
ajax.jsonRpc("/action_set_current_url/", 'call', window.location.href)
});
Step2: In python function, Set the current url to session.
Example
from openerp import http
from openerp.http import request
class YourModel(http.Controller):
@http.route(['/action_set_current_url/<string:url>'], type='json', auth="public")
def set_current_url(self, url,**post):
# CODE TO SET COOKIES
request.session['my_current_url'] = url
Step3:
Call the current url from your function
Example
def your_function(self):
# CODE TO GET URL
current_url = request.session.get('my_current_url')
Note : my code is not tested