diff options
| author | Laurent Smet <las@openerp.com> | 2017-04-26 09:31:55 +0200 |
|---|---|---|
| committer | Laurent Smet <las@openerp.com> | 2017-05-08 09:23:12 +0200 |
| commit | e80238042c9d93d492ea8b06b0041aced0d81dcd (patch) | |
| tree | 70ed26eb99cf62ff7d5418a0748d1aa166136067 /addons/web/static/src/js/report/utils.js | |
| parent | 3425752eaca236c1e4b4d616aa49b3faa6cfd957 (diff) | |
[REF] report: remove the report module
The content of the report module is now dispatched in
the 'base' and the 'web' modules.
Diffstat (limited to 'addons/web/static/src/js/report/utils.js')
| -rw-r--r-- | addons/web/static/src/js/report/utils.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/addons/web/static/src/js/report/utils.js b/addons/web/static/src/js/report/utils.js new file mode 100644 index 00000000000..64776efb4db --- /dev/null +++ b/addons/web/static/src/js/report/utils.js @@ -0,0 +1,26 @@ +odoo.define('report.utils', function (require) { +'use strict'; + +function get_protocol_from_url (url) { + var a = document.createElement('a'); + a.href = url; + return a.protocol; +} + +function get_host_from_url (url) { + var a = document.createElement('a'); + a.href = url; + return a.host; +} + +function build_origin (protocol, host) { + return protocol + '//' + host; +} + +return { + 'get_protocol_from_url': get_protocol_from_url, + 'get_host_from_url': get_host_from_url, + 'build_origin': build_origin, +}; + +}); |
