Monday, July 4, 2022

current url in odoo


 

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

Odoo Invoice Qr code issues

There are two main issues must of us facing with the QR code in Odoo invoice & these issues are 1/ QR code displayed as broken image w...