Xavier Morel 35d452cffb [IMP] web: replace iframe-based get_file by XHR
The error handling in get_file has always been somewhat problematic
(sarcasm ho!). Pending PR #24854 attempts to add special handling for
gateway timeout aside from its base stuff, and that's really quite
terrible due to get_file's limitation of only being able to read the
content of the document loaded in the iframe (no proper access to status
codes & al).

That was the occasion to look up modern API and see if we could do
file downloads in JS without iframe crap.

Turns out we can: xhr2 is well supported so we can POST, get a blob
back, and create a "local download" for that in-memory blob using either
a[download] (most browsers) or msSaveBlob (IE10+, that's actually a
convenient-to-great API and it's a shame there's nothing like it in the
standard).

The changes are not trivial but save ~30LOC and most of the overhead
is replicating the old/weird error handling as that requires
additionally decoding the blob to a string & parsing that string to
a document before being able to get the content (whereas before we'd
just access to the document loaded in the iframe).

OTOH we can now properly forward non-200 status codes to the
crash manager (as name) which will allow using regular CM hooks to
provide custom warning and error messages.

Note that this requires two libraries:

* a stripped down version of the content-disposition NPM lib, as
  download file names are provided via that header and parsing the
  header is decidedly non-trivial
* the download.js library as it handles the various edge cases from
  different browsers, I'm don't think all of it is necessary for our
  use case but the library is not that big so no real point in trying
  to strip it out and potentially break it in the process
2018-07-13 17:31:22 +02:00
2018-06-25 10:33:05 +02:00
…
2017-12-12 17:19:01 +01:00
…
…
2018-04-18 15:59:05 +02:00
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%