if we want to get the server URL for the current odoo module we can get it as below
#for python model
server_url = self.env['ir.config_parameter'].get_param('web.base.url')
#for http.controller
1/ from odoo.http import request
2/ server_url = request.env['ir.config_parameter'].get_param('web.base.url')
No comments:
Post a Comment