Commit Graph
754 Commits
Author SHA1 Message Date
Christophe Simonis 0fbc92e0c4 [MERGE] forward port of branch saas-10 up to 1e86774 2016-05-04 17:09:51 +02:00
Christophe Simonis 1e86774207 [MERGE] forward port of branch saas-9 up to 89873cb 2016-05-04 15:42:26 +02:00
Christophe Simonis 20757c927e [MERGE] forward port of branch 9.0 up to 7f9a973 2016-04-26 15:57:05 +02:00
Christophe Simonis 7f9a973f51 [MERGE] forward port of branch saas-6 up to f811fff 2016-04-26 15:43:08 +02:00
Christophe Simonis f811fffbbe [MERGE] forward port of branch 8.0 up to 7e51d98 2016-04-26 15:15:22 +02:00
Ludwik Trammer 61c808b774 [FIX] web: Allow for translation of a login error message
Closes #11815
2016-04-25 16:03:27 +02:00
Aaron Bohy 977db823c7 [REF] web: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.

Mainly:
 - JS refactoring and linting
 - Conversion of .sass into .less split into multiple files
 - Templates cleaning and DOM simplification
 - Re-generation of web.pot, and update of .po files
2016-04-21 15:21:39 +02:00
Christophe Simonis 79976bd779 [MERGE] forward port of branch saas-10 up to 6e95659 2016-04-01 19:10:34 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
Denis Ledoux 2d2028a66c [MERGE] forward port of branch 9.0 up to b44cb82 2016-03-31 17:57:22 +02:00
Olivier Dony 26b8bf52d0 [FIX] web: typo in 88594416a6 2016-03-31 12:53:25 +02:00
Olivier Dony 88594416a6 [FIX] web: CSV export: avoid triggering formulas
When exporting text data in CSV format, values
beginning with '=', '+' or '-' will usually be
mistaken by spreadsheet applications as formulas
upon CSV import.
That will often cause the cell to display an
error message instead of the actual contents,
such as "#NAME?"

Prefixing them with a single quote makes them
pure text cells. The special single quote
character is usually hidden by the spreadsheet
in that case.

Numbers and other types of values are not affected.
2016-03-30 03:43:40 +02:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Aaron Bohy 85066e7bcd [REF] web: /web/action/load: remove unused 'do_not_eval' argument
unused since rev. odoo/odoo@4a5cb1ebc4.
2016-03-18 10:44:52 +01:00
Christophe Simonis 3b6c243440 [MERGE] forward port of branch 9.0 up to c169c59 2016-02-24 18:50:09 +01:00
Christophe Simonis dd875ed1a1 [MERGE] forward port of branch saas-6 up to f5ed710 2016-02-24 18:02:53 +01:00
Christophe Simonis f5ed710c74 [MERGE] forward port of branch 8.0 up to d4e5019 2016-02-24 16:37:41 +01:00
Nicolas Lempereur d4e5019ec7 [FIX] web: csv export newline for text/html field
CSV export was added in f146e2a and since then newline were not
exported.

But new line should be allowed if the string is quoted by " characters
which is done in Odoo.

closes #11005
opw-667853
2016-02-24 11:26:16 +01:00
Yannick Tivisse 7db8f1ca30 [IMP] web: remove rpc call on SwitchCompany widget loading
By setting the information returned by read_companies on the session
information, we are able to remove the rpc call and the willStart
method definition

Also: Set a debounce on SwitchCompany widget to avoid multiple RPC
2016-02-09 17:40:34 +01:00
Christophe Simonis 1231585df1 [MERGE] forward port of branch saas-9 up to 78d20b5 2016-01-27 12:27:01 +01:00
Julien Legros e5e7c4c121 [MERGE] forward port of branch 9.0 up to 6872aae 2016-01-25 11:26:27 +01:00
Martin Trigaux 8c8c02598d [FIX] web: untranslated term 2016-01-20 16:41:58 +05:30
Xavier Morel 7f8fe10766 [REM] web: Proxy.load
Not really useful at this point, if we ever go down the path of embedded
web client we can probably make the relevant controllers CORS.
2016-01-11 11:32:18 +01:00
Christophe Simonis e502b3ea1f [MERGE] forward port of branch 9.0 up to 833fe49 2016-01-06 16:09:34 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
Denis Ledoux aef8a4d618 [MERGE] forward port of branch 8.0 up to f9f7669 2015-12-21 18:24:22 +01:00
Martin Trigaux c298cf3250 [MERGE] Forward port of 9.0 up to 7892d99f 2015-12-18 16:15:08 +01:00
Holger Brunn f9f7669e60 [FIX] pass context as keyword argument to search()
closes #10080
2015-12-16 11:42:05 +01:00
Denis Ledoux 5cf29dcff2 [FIX] web, website: overrideable images controller
The `binay_image` and `content_disposition` are moved
from the web controller to the `ir.http` model,
to be able to override these methods.

This makes possible to browse the records images as sudo
when the record is published on the website.
e.g. to see the partner images on the website `/partners` page
from the `website_crm_partner_assign` module.

opw-659244
2015-12-11 13:58:49 +01:00
Christophe Simonis 4022493c0b [MERGE] forward port of branch 9.0 up to da2b88b 2015-12-09 16:44:05 +01:00
Olivier Dony 8955363808 [FIX] web: /web/image - backwards-compatibility
The QWeb image widget allows passing either
max_width, max_height or both, but the
controller required both.
We'll consider a 0px dimension request as
meaning: "appropriate value according to ratio".
2015-12-09 13:45:00 +01:00
qsm-odoo 8c0b755841 [IMP] web: return file content for url attachments
URL attachments are now returned as data and not redirection.
If the url does not match with a module file, the 301 status
(redirection) is still returned.

This allows to use the /web/image/<xmlid>/<dimension> route
and get an image attachment with correct dimensions.
2015-12-03 13:26:36 +01:00
Martin Trigaux 90254beedb [MERGE] forward port of branch 9.0 up to 00ee6e7b 2015-12-01 10:30:44 +01:00
qsm-odoo bbc67ec402 [FIX] web: export data according to domain
Some accounting model (i.e. account.tax) are redefining the ORM search
method, but with misordered arguments (placing count as fifth argument
instead of context).

For the export function, this lead to have the "context" variable
associated to the "count" function variable. As "count" is then
considered as True, the method returns the number of records instead
of the list of record ids. This then exported the last record (the
count'th one) instead of all the records that matched the domain.

The solution here is to explicitly give the context variable by name.
2015-11-26 15:57:17 +01:00
Christophe Simonis 8f9194e8ea [MERGE] forward port of branch 9.0 up to 32c7c31 2015-11-25 19:12:53 +01:00
Damien Bouvy 0a6edac151 [FIX] web, openerp: make the webclient edition aware
- Differentiate between the Community and Enterprise editions
in the version number. By adding this attribute on the global
odoo JS object in the web client bootstrap controller /web,
we can differentiate between versions easily on the client
side without extra RPC calls.

- Remove a couple of version-related RPC calls in case
the global version info is present in the JS environment

- Update "About" panel to display the edition info

- This commit also reverts 07fe5afc87
which implemented the idea in a more limited way.

Closes #9625
2015-11-25 18:12:42 +01:00
Ravi Gadhia cb835f8a3b [IMP] web: display message to edit translations when translated fields have been modified 2015-11-02 10:57:18 +01:00
Olivier Dony ff2069eb69 [MERGE] Forward-port 9.0 up to 9a3e9291ffa1509f4afa0f35f9d8d71b6e0932d1 2015-10-30 10:47:13 +01:00
Denis Ledoux c8d6b36632 [MERGE] forward port of branch saas-6 up to a0c64bebe6 2015-10-28 12:01:30 +01:00
Olivier Dony cc552c008b [MERGE] Forward 9.0 up to 2ec9a9c 2015-10-27 15:58:47 +01:00
Ravi Gadhia 0bfc3074e4 [IMP] web: show translation icon only when multiple languages are installed 2015-10-26 17:35:34 +01:00
Christophe Matthieu 63392cc239 [FIX] web: can use web/image controller for attachment type url
Attachment type url return a status 301 for response
2015-10-26 11:43:36 +01:00
Olivier Dony 807e776ac8 [FIX] web: /web/image: conforming HTTP status line
HTTP status lines are required to have both
a status code *and* a "reason phrase".

Some stricter HTTP clients / proxies choke
on status lines without "reason".

Technically, setting `response.status` is supposed
to set both at the same time, so we need to provide
both, or to set `status_code` only and let werkzeug
add the reason.  This patch does the latter.

Fixes #8924
2015-10-22 17:40:33 +02:00
Denis Ledoux a0c64bebe6 [MERGE] forward port of branch 8.0 up to 8209368 2015-10-14 12:28:22 +02:00
Denis Ledoux 8209368b02 [FIX] web: current transaction is aborted
This reverts commit bd9cbdfc41.

The above revision solved the SQL constraints not being
translated when raised. They were not translated because
the context, containing the lang, was not located as expected
in the `kwargs` dict.

While it solved this issue, it had as side-effect to raise
`current transaction is aborted,
commands ignored until end of transaction block` errors more
often when using the web client.

This can be explained by the double check, when the first
check raised this error
- which can happen, e.g. when the cursor is closed,
there is a retry mechanism in such cases -
and by the fact the transaction was not rollbacked.

This issue could have been solved as well by rollbacking
the transaction, but it is regarded as not-so-clean.

Therefore, to solve this issue, while still having
the SQL constraints translated, we apply the
second patch proposed in bd9cbdfc41
commit message, which is not-so-clean as well, but
which is a proper solution.

opw-651393
2015-10-13 17:12:34 +02:00
Martin Trigaux e256262b0e [MERGE] Forward-port 9.0 up to 422f3b5d 2015-10-07 16:42:33 +02:00
Martin Trigaux b776d66d85 [FIX] all: ressource -> resource
Courtesy of Kris Krnacs
2015-10-01 10:54:04 +02:00
Xavier Morel afa9f4b5fd [REM] web: /login route
Only used by web tests (which rely on a module they don't depend on to
run, bad!) and altering the test session directly should work, so this
endpoint seems completely unnecessary.
2015-10-01 01:36:50 +02:00
Christophe Simonis 7636b510a2 [ADD] *: CSRF protection in forms and routes
* make CSRF protection the default on all non-SAFE methods
  note: there currently is no way to call a CSRF-protected endpoint
  without a form-encoded entity-body as that's the only place we get the
  CSRF token from.
* simple CSRF token generation: just use the HMAC'd session id, no
  generating a new random token per session then HMAC it
* use constant-time equal function to avoid timing attacks
* assert that a database secret is configured before hashing/validating
  the CSRF token
* opt-out database manager from CSRF: The super-admin password serves
  the purpose of a CSRF token in the database manager screens.
  There is no request database to obtain the
  secret and generate a CSRF token.
2015-10-01 01:36:50 +02:00