Skip to content

Instantly share code, notes, and snippets.

@sehrishnaz
Created June 30, 2022 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sehrishnaz/f8a3e6ca753f6d5a8e3fd92e90835280 to your computer and use it in GitHub Desktop.
Save sehrishnaz/f8a3e6ca753f6d5a8e3fd92e90835280 to your computer and use it in GitHub Desktop.
How to put URL inside QR Code in odoo
base_url = self.env['ir.config_parameter'].get_param('web.base.url')
if not 'localhost' in base_url:
if 'http://' in base_url:
base_url = base_url.replace('http://', 'https://')
base_url = base_url + '/web#id=' + str(self.id) + '&model=your.model.goes.here&view_type=form&cids='
@sehrishnaz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment