Commit Graph
9642 Commits
Author SHA1 Message Date
Raphael Collet 46252578fc [FIX] base: wrong field dependency on ir.actions.client.params 2016-08-01 16:39:50 +02:00
Raphael Collet ab33c7714c [REF] fields: reimplement field.setup_triggers
The purpose of this reimplementation is to separate the resolution of
dependencies from the creation of the invalidation/recomputation triggers.
2016-08-01 16:39:49 +02:00
Christophe Simonis 523d3af131 [MERGE] forward port branch saas-12 up to 16d65a8 2016-07-29 17:55:21 +02:00
Christophe Simonis 16d65a8493 [FIX] test_assetsbundle: use helper to get bundle 2016-07-29 16:32:36 +02:00
Christophe Simonis c043a26321 [FIX] base: AssetBundle: use correct attribute 2016-07-29 16:00:41 +02:00
Christophe Simonis f670b3b1df [MERGE] forward port branch saas-11 up to 3aea814 2016-07-29 15:33:51 +02:00
Richard Mathot 9a38428a2a [IMP] base: allow to filter translations on model and view 2016-07-29 14:59:30 +02:00
Richard Mathot 599f3bc562 [IMP] base: allow to filter actions on model 2016-07-29 14:59:30 +02:00
Richard Mathot f543a28a0f [IMP] base: allow to filter models on model technical name only 2016-07-29 14:59:30 +02:00
Richard Mathot 4b3ce99b26 [IMP] base,report,report_webkit: clean config view for Reports 2016-07-29 14:59:30 +02:00
Christophe Simonis 529f88dbd3 [MERGE] forward port branch saas-10 up to 4ca04fd 2016-07-29 13:01:29 +02:00
Christophe Simonis 73cc3611b4 [MERGE] forward port branch 9.0 up to d35f425 2016-07-28 12:31:29 +02:00
Christophe Simonis d35f4250cc [MERGE] forward port branch saas-6 up to 7079a0b 2016-07-28 12:22:03 +02:00
Christophe Simonis 7079a0be30 [MERGE] forward port branch 8.0 up to 8ceb943 2016-07-27 18:13:51 +02:00
Guewen Baconnier 6cc7c03212 [FIX] tools: use without_demo specified in configuration file
When using the -i command line option without the --without-demo=all command
line option, demo data was installed even if the configuration file has
a line without_demo = all

This change is safe as just above, opt.without_demo is copied into
self.options['without_demo'] so we are sure to consider the 2 options.

Closes #12730
Fixes #9293
2016-07-27 17:39:09 +02:00
Simon Lejeune ee228cd837 [FIX] ir_qweb: issue if multiple IRA are created for a bundle
If multiple transactions start knowing that they should generate the
bundle, each one will run lessc and create a ir.attachment record
referencing the path on the filestore. While the file is not duplicated
on the filestore (as it is stored according to its hash), the final
result of `t-call-assets` will source multiple time the same file.

This patch fixes this issue by adapting get_attachment to group its
results by file name and only select the one with the max id (latest
generated).

We also remove the `inc` argument as it is not used.
2016-07-27 16:56:42 +02:00
qsm-odoo 931e5567b6 [FIX] base: let the debug value be 'assets'
This commit fixes a bug introduced by the forward port 1fca5e01cb.

In saas-11, the commit f970906c9e introduced the 'assets' value
for the debug mode, to active the assets splitting. To do that, the
commit had to stop the conversion to a boolean of the debug value
(initially introduced by commit 522dec2fcd).

The problem is that the forward port mentionned above did not resolve
correctly the conflict for the commit 3455daf948, reintroducing the
boolean conversion.
2016-07-27 14:26:57 +02:00
Jeremy Kersten 49d789cf99 [FIX] base: widget duration - allow to round to avoid seconds
Allow to round the duration to a minimal unit.

Eg:
   0.33 hour = 19.8 min = "19 minutes 48 seconds"
   if option {'widget'='duration', 'unit'='hour', 'round'='minute'}
   0.33 hour => 20 min = "20 minutes"
2016-07-26 16:17:50 +02:00
Martin Trigaux fdb58fc77c [IMP] all: remove reference to statusbar_color
Linked to #5987
2016-07-26 15:13:28 +02:00
Christophe Simonis cfb0c0dead [MERGE] forward port branch saas-11 up to 7ae5121 2016-07-25 17:17:15 +02:00
Christophe Simonis 7ae5121877 [MERGE] forward port branch saas-10 up to fc0f023 2016-07-25 16:06:15 +02:00
Christophe Simonis fc0f023053 [MERGE] forward port branch 9.0 up to 1089dcf 2016-07-25 15:07:47 +02:00
Christophe Simonis 7df4ea5b57 [MERGE] forward port branch 8.0 up to 43cff22 2016-07-25 14:07:50 +02:00
Olivier Dony 8245c1d1d8 [FIX] service.server: drop idle connection attempts
Avoid wasting HTTP workers (in prefork server mode)
for pending/idle connections.
HTTP connections that have not sent anything for 500ms
will be dropped.

In particular, wkhtmltopdf uses a connection pool
to load remote resources. It opens more HTTP connections
than necessary and uses a random subset of them, leaving
the other idle.

On a server that has little available workers this
may significantly delay report rendering, and could
even lead to a deadlock.

OPW-667870
2016-07-25 13:06:31 +02:00
Olivier Dony 43cff22950 [FIX] base: fix broken URLs when redirecting
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.

We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
2016-07-25 13:06:31 +02:00
Olivier Dony 01acb8a497 [FIX] base: fix broken URLs when redirecting
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.

We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
2016-07-25 13:05:01 +02:00
Christophe Simonis eff0a3b049 [MERGE] forward port branch 8.0 up to 84f9cdd 2016-07-25 10:24:33 +02:00
Odoo Translation Bot 84f9cdd1d9 [I18N] Update translation terms from Transifex 2016-07-24 02:59:48 +02:00
Odoo Translation Bot 6dcaffa3e0 [I18N] Update translation terms from Transifex 2016-07-24 00:30:28 +02:00
Simon Lejeune d1cd293ece [FIX] web: session_info: introduce is_superuser key
This is done in order to enable the tour service only for the
superuser. Commit 6ef1644a7b changed the meaning of `is_admin`
to achieve this but broke the fact that some features of the debug
manager are available to admin and not only to the superuser. Anyway
a `is_admin` key should mean that the user is in the admin group.

We could have checked client side that the uid is equal to 1 but
adding a `is_superuser` key is more elegant and easier to grep.
Also fix the only occurence of a uid check in the weblcient.

This reverts commit 6ef1644a7b.
2016-07-20 14:16:01 +02:00
Thibault Delavallée bcbf4316e6 [FIX] models, mail, *: fix access action crash due to one / multi conversion
get_formview_action and get_formview_id are methods used notably in a
redirection called from a mail controller used in notification emails.
Those methods however are defined as cr, uid, id and are interpreted
as api.one when called by a new-api style method.

With modules being converted into the new API, those methods are called
as api.one and the result is encapsulated into a list.

To avoid having to take the first element of the returned list we decided
to simplify the call chain and migrate the methods as multi methods, using
ids instead of id. Various addons have been updated accordingly. A temporary
support of ids being an int / long has been added to avoid conflict with calls
using id (for example if javascript is not updated).
2016-07-19 16:32:46 +02:00
Nicolas Martinelli 2c19e9be96 [FIX] base: cherry-pick 55fa0912 to 8.0
Backported to 8.0 following report at #12648

[FIX] base: use datetime instead of date

The variable `date` is compared to the field `name` in the selection
query. `name` is filled in with datetime data. In particular, in the
module currency_rate_live, datetime.now() is used in the name. It is
necessary to make an appropriate comparison to make sure we select the
updated rate right away.

Fixes #12648
2016-07-19 12:58:13 +02:00
Odoo Translation Bot c3dd308913 [I18N] Update translation terms from Transifex 2016-07-19 12:10:41 +02:00
rka-odoo 2681c22089 [FIX] report_webkit: Re-write yml test into python
An yml import is instantiated in old api style, with old api self and
registry. As there are no more api.v7 method in report, rewriting the
yml test in python will make the test valid
2016-07-19 11:56:36 +02:00
rka-odoo 47c67b640b [MIG] report: Migration to new API 2016-07-19 11:56:29 +02:00
Goffin Simon 7111ec0b7b [IMP] web, openerp: Remove the function ir_set on model ir.model.data
The function ir_set is deprecated since 9.0
Refactorisation of load_actions_from_ir_values
2016-07-19 09:35:41 +02:00
Goffin Simon 523209379a [FIX] calendar, openerp: Remove deprecated set and get on ir.values
Since version 6.1 the functions set and get on ir.values are deprecated.

The overwrite of the function get on "ir.values" didn't set the context
at the right argument.

opw:682883
2016-07-19 09:35:40 +02:00
Olivier Dony 36e875e796 [FIX] ir.http: make browsers trust our mime types
We determine the mime types of the files we server
automatically + manually, and browsers should not
try to second-guess it.

Browser mime-guessing is there for the myriads of
badly configured web servers out there.
2016-07-18 19:44:37 +02:00
Olivier Dony 82142475f7 [FIX] mail,base: import XML attachments as text 2016-07-18 19:44:37 +02:00
Olivier Dony 399e2bcf6d [FIX] ir.attachment: simplify xhtml-like mimetypes matching
Simplify/complements revision f6090e69e6,
forcing text/plain for xml-like files.

Ignore forced `mimetype` when downloading attachments, if the model
has its own mimetype or if we can guess it.
`default_mimetype` still available as a fallback.

See also the list of mimetypes supported by common browsers, e.g.:

 - Firefox: CParserContext::SetMimeType in:
    https://hg.mozilla.org/firefox/file/default/parser/htmlparser/CParserContext.cpp

 - Chrome:  kSupportedNonImageTypes constant:
    https://cs.chromium.org/chromium/src/components/mime_util/mime_util.cc?sq=package:chromium&rcl=1467904650&l=89
2016-07-18 19:44:37 +02:00
Odoo Translation Bot 691949c4b8 [I18N] Update translation terms from Transifex 2016-07-17 00:30:21 +02:00
Christophe Simonis b98bb6d10f [MERGE] forward port branch saas-12 up to c16d5bc 2016-07-15 17:09:24 +02:00
Christophe Simonis 5858dda75f [MERGE] forward port branch saas-11 up to a62b8cf 2016-07-15 16:34:41 +02:00
Christophe Simonis 1fca5e01cb [MERGE] forward port branch saas-10 up to 156dee2 2016-07-14 18:17:30 +02:00
Christophe Simonis 156dee2aec [MERGE] forward port branch 9.0 up to fd9eb2e 2016-07-14 17:17:54 +02:00
Christophe Simonis fd9eb2e481 [MERGE] forward port of branch saas-6 up to e928c60 2016-07-14 16:23:22 +02:00
Xavier Morel 5bb0933a52 [REVERT] 7930c3f86
Faster is nice, working is better, sale_timesheet, this commit breaks
the tests and the installation of multiple modules.
2016-07-14 09:57:17 +02:00
Christophe Simonis 9b7bc217a2 [FIX] base: avoid applying inherited view twice
Use the `|=` operator to deduplicate view ids.
2016-07-13 20:42:43 +02:00
Christophe Simonis 7930c3f86e [IMP] base: ir.ui.view inherit search during module update
During module update, we should only consider views of already
loaded modules. This filter is done by searching on xmlids of views.
We should also search for explicit view ids (current module is not yet
marked as loaded)

However, by doing this `OR` condition, the generated query is not
optimal and forbid postgresql to use the composite index
`ir_model_data_model_res_id_index` on `ir_model_data` table.
This is a performance issue for databases with a lot of ir_model_data rows.

Use 2 quicker search() to avoid this problem.

This only affect the module update. Normal view loading is unchanged.
2016-07-13 19:19:11 +02:00
Damien Bouvy 7c2c169906 [FIX] base: mixing ids and records
Browse needed.
2016-07-13 17:27:24 +02:00