summaryrefslogtreecommitdiff
path: root/addons/report/static/src/js/qwebactionmanager.js
AgeCommit message (Collapse)Author
2017-05-08[REF] report: remove the report moduleLaurent Smet
The content of the report module is now dispatched in the 'base' and the 'web' modules.
2017-05-08[REM] odoo/report: remove deprecated stuffLaurent Smet
- RML Reports - Webkit Reports (most part already removed by 13b9982c6298021289707ed364e3c1d622a09f13) - LocalService in netsvc.py - rename attributes like rml_% to report_% - rename ir.actions.report.xml to ir.actions.report - allow rendering directly on an ir.actions.report by calling render method - remove 'controller' report_type - remove unused res.font stuff - remove print_report method in models.py (not used) - restore removed call to pdftotext process in test_reports
2017-04-11[REF] web, *: simplify our RPC system (in JS)Géry Debongnie
The RPC system was not completely satisfactory, we decided to prepare the future and do it properly. This commit introduces the new rpc system, which replace the previous new one. We now simply have a method, this._rpc, which takes a dictionary of parameters. The idea is that depending on the parameters, it is able to add correct default value when necessary. For situations where we don't have the this._rpc method, we can use the rpc.query method, which takes the same arguments, but directly calls ajax.rpc instead of triggering up some events.
2017-04-11[REF] *: use _rpc method for all rpcsGéry Debongnie
The _rpc method is now the preferred method to do a rpc, so we need to update all calls.
2017-04-11[FIX] report: use this.performRPCAaron Bohy
2017-04-11[FIX] report: this.session is undefinedAaron Bohy
It is now available with the Service mixin via this.getSession().
2017-03-08[FIX] report: Array.prototype.includes is ES6Aaron Bohy
This feature is in the ECMAScript-2016 specification, which is not yet fully supported by all browsers (and phantomjs).
2017-03-03[IMP] report: allow generating multiple reports with one single action ↵Olivier Colson
returned to js That is useful in l10n_ch where we need to generate ISR and invoice simultaneously
2016-12-09[MERGE] forward port branch saas-11 up to 321b7dcChristophe Simonis
2016-12-07[FIX] report: correctly handle broken wkhtmltopdfSimon Lejeune
It's possible that the command `wkhtmltopdf --version` returns an empty string (in the use case, it output later in stdout "wkhtmltopdf: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory"). We chose to display the report in html in this case and also to show a warning to the user inviting him to fix his installation.
2016-07-05[REF] report: replace the popup with an iframe in a client actionSimon Lejeune
This change concerns reports of `qweb-html` type. Previously, they were openned in a popup and it was not very practical. We chose to open these reports in an iframe (as opposed to what's done in `account_report`) in order to be the most close to the pdf version in terms of apperance. The client action allows an integration with the control panel. Apart from the breadcrumbs integration, we also add buttons to handle the web_editor (save, discard, etc). We also add a button to print the pdf version. As there is some security concern to communicate with an iframe, we use the postMessage[1] technology and we fix the `targetOrigin` to the `web.base.url` parameter, that means that if the window to which we send the message does not match the `web.base.url` origin, the event is not even dispatched. In order to to that, the report module uses the ir_http `session_info` override mechanism to add the `web.base.url` in the DOM of the webclient, and the report module adds to the DOM of report the `web.base.url` content. This way, both scripts (in the webclient and in the iframe) have the information of the trusted origin. The client action does not have a complicated logic: it opens the report's url in an iframe to show the report or open the web_editor (the editor is activated by using the `enable_editor` query string. If you click on the control panel button (save/discard) it'll send message to the web_editor in the iframe to ask for save and discard. It also waits for messages to know if the edition is done / cancelled and toggle buttons of the control panel accordingly. To allow that, we override the web_editor mechanism if it's opened in an iframe and we chain to the `save` and `cancel` method deferred that send message to the client action's window. We also make the web_editor waits for message to start and stop the edition (controlled by the control panel buttons). The override of the action manager has been refactored / improved in order to open the clien action and not the popup anymore. This way we are able to, in the client action, return the current action with the type `qweb-pdf` and the report is downloaded. [1] https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
2015-07-10[IMP] report: adapt report to use web_editor and remove website_reportChristophe Matthieu
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
2015-03-18[REF] various addons: update to the new module systemGéry Debongnie
2015-01-16[FIX] report: reload record after report printedDenis Ledoux
2014-10-30[FIX] report: fix report HTML editor scrollbar in FirefoxDavid Monjoie
2014-05-21[FIX] Report: inform the user that he may not print a pdf report while his ↵Simon Lejeune
openerp is running with only one worker; adapt method to extract wkhtmltopdf version to also work on mac where the ouput of '--version' is different from gnu/linux binary
2014-04-04[FIX] regression on rpc call to check wkhtmltopdf presence/versionSimon Lejeune
bzr revid: sle@openerp.com-20140404124724-dves3liepcbmg6rv
2014-04-03[FIX] action manager: use EncodeURIComponent instead of EncodeURI because of ↵Simon Lejeune
bad encoding of the ampersand in the secund (resulting in impossibility to encode 'Belgium Profit & Loss' for instance) bzr revid: sle@openerp.com-20140403211717-sb84ir2ts62yizzf
2014-04-02[REF][IMP] report module: merge the four report's routes into one; extra ↵Simon Lejeune
report arguments are passed json encoded (therefore removed the _eval_params method); added an abstract_report model to wrap old-style report without touching them; Removed formatLang method from report as it is embeded in the old-style report localcontext; moved the save_in_attachment logic in a method for readability; adapted the action manager to encode data and context of action if needed; fixed the post install test to test the generic report bzr revid: sle@openerp.com-20140402162344-3lrako0jepmhasvl
2014-03-21[FIX] removed 'debugger' statementSimon Lejeune
bzr revid: sle@openerp.com-20140321184347-ph5n6cnywhwasvcf
2014-03-21[FIX] fixed the report type 'controller', fixed the report_vat_xls routeSimon Lejeune
bzr revid: sle@openerp.com-20140321183649-rg8wrlvcrzvv0d29
2014-03-21[IMP] Multiple improvements: eval_param is set on the controller, the ↵Simon Lejeune
subprocess to get the version of wkhtmltopdf is only open at OpenERP start, better exceptions handling (try to avoid exceptions shallowing) and the rpc call from the webclient to know the version of wkhtmltopdf is only done once bzr revid: sle@openerp.com-20140321164716-uksuu6hsjj7q3698
2014-03-21[FIX] Multiples fixes: correct context passing, changed osv.Model to ↵Simon Lejeune
osv.AbstractModel to avoid creating tables in database when the model use for the reports contains only method bzr revid: sle@openerp.com-20140321105806-0bwo992995la91fe
2014-03-19[WIP] Refactoring report module to avoid using request in OpenERP models : ↵Simon Lejeune
the generation of the html/pdf is now done on the model side and not on the controller side anymore => it is possible to generate a pdf python-side without making a request to an url, request that can be refused because of access right in the request object at this precise moment bzr revid: sle@openerp.com-20140319183614-vibnmm6kkh2h6piu
2014-02-27[IMP] Add link to wkhtmltopdf.org in the webclient notificationsSimon Lejeune
bzr revid: sle@openerp.com-20140227165509-qrdwy0s7xh044zf4
2014-02-27[IMP] Add notification on the web client when wkhtmltopdf is not present or ↵Simon Lejeune
too old bzr revid: sle@openerp.com-20140227154046-hxnhyho6v096hjx8
2014-02-27[IMP] Added a route to check presence and version of wkhtmltopdf. If the ↵Simon Lejeune
soft is not present, qweb-pdf fallback on qweb-html mode. bzr revid: sle@openerp.com-20140227144810-d14iwu5pudmrshh9
2014-02-21[IMP] Added the possibility to define ultra-specific reports outputing any ↵Simon Lejeune
king of file. These reports are of type 'controller' because they redirects to a controller that must returns a response containing the http headers 'content-type' and 'content-disposition'. The route for this controller is specified in the report_file field. Added an XLS version of the tax report for the POC (testable by setting 'report_vat' type to controller and setting '/report/account.report_vat_xls' in the 'report_file' field). bzr revid: sle@openerp.com-20140221163320-g5ouoywsuduoi0qe
2014-02-18[IMP] qweb-pdf reports are now downloaded instead of being openned in a ↵Simon Lejeune
popup. It is done by using the 'session.get_file' of the webclient. bzr revid: sle@openerp.com-20140218125322-yym87kc2c0guhgg2
2014-02-18[IMP] Moved the action manager for qweb reports into addons branchSimon Lejeune
bzr revid: sle@openerp.com-20140218104959-p0nqlizhvynqy4j3