Commit Graph

8230 Commits

Author SHA1 Message Date
Odoo Translation Bot 8a187c5b1d [I18N] Update translation terms from Transifex 2017-09-26 11:47:00 +02:00
Yasser Kaddour 4365ebc19c [FIX] Correct Algerian currency symbol
While the currency code of the Algerian Dinar is DZD, (latin) currency symbol is DA.
2017-09-25 09:53:45 +02:00
Lucas Perais (lpe) 7805cf5fef [FIX] tools: fix amount to text in fr and nl
Correct rendering of 70 and 90 in french
And manage inversion [unit]-en-[tens] in nl

opw 757048

closes #19297
2017-09-08 09:40:56 +02:00
Olivier Dony ce12a7397f
[FIX] base: remove early size limit on author field
The default size limits set in base.sql are eventually superseded by the
actual limits (or absence of) when the DB schema is synchronized with
the Python model definitions.

However the list of modules (name, authors, descriptions, dependencies)
is loaded before this can happen. The length of the author field is one
case that can easily crash the database bootstrap process at that point,
should a module with a long author name be present in the addons path.

After schema sync, that size limit is lifted entirely (although Odoo Apps
does limit the max author name length to 512 at the moment, to prevent
abuse).

Fixes #5850
2017-09-05 01:46:47 +02:00
Odoo Translation Bot 8e6f65b469 [I18N] Update translation terms from Transifex 2017-09-01 02:40:20 +02:00
Raphael Collet 8efeb4c6fc [FIX] prefetch issues on computed fields (#18799)
When deciding to prefetch records (getting records from the cache with no value
for the field being fetched), if the field was computed `determine_value` would
just get all records, not limited by the normal prefetch limit; for large
recordsets this would generate gigantic prefetch lists for records we may not
need at all.

Fix by applying the `PREFETCH_MAX` limit to records from the cache as is done
in `_prefetch_field`.
2017-08-11 16:02:27 +02:00
Odoo Translation Bot bbd4e7e292 [I18N] Update translation terms from Transifex 2017-08-01 02:40:08 +02:00
Christophe Simonis e6b91eb55a [FIX] core: werkzeug 0.12 compatibility
Since werkzeug 0.12, the `BaseWSGIServer.__init__` method expect the
socket to be bound to determine the effective port it listen to [1].
Stop pretend to bind the socket and close it directly after use.

[1] see pallets/werkzeug@1fc28cbb30
2017-07-27 13:40:19 +02:00
Christophe Simonis 48c478513f [IMP] core: log address we listen on in multi-worker mode 2017-07-27 13:39:08 +02:00
Richard Mathot 63ad8b9597
[FIX] tools: prevent crashes with Pillow >= 4.2.0
From Pillow 4.2, it is forbidden to save RGBA images as JPEG
( e4d6223c94 )

A crash was occurring when loading demo JPGs as
image_resize_and_sharpen() was silently changing image mode to RGBA.
Now we ensure that we return the original image mode.

We also avoid crashes when converting from PNG to JPG
2017-07-07 10:11:40 +02:00
Raphael Collet a1f1f85be2 [FIX] workflow: insertion of duplicates in many2many relation 2017-07-07 09:47:04 +02:00
Jairo Llopis ecc093033d
[FIX] service.server: bump up socket timeout to 2s
Rev. 8245c1d1d8 introduced a timeout to
avoid lockup situations with wkhtmltopdf's requests on servers with low
numbers of free HTTP workers.

The initial timeout of 500ms was chosen based on average network
latency, but turned out to cause spurious disconnections on congested
networks combined with slow links.

Bumping up the timeout to 2s seems to be a better sweet spot, causing
less spurious disconnections while still recovering reasonably fast from
the wkhtmltopdf lockup situation.

See also these discussions:
 - 8245c1d1d8 (commitcomment-22904347)
 - PR #12356
 - Issue #2114

Closes #17998
2017-07-04 12:57:05 +02:00
Odoo Translation Bot a38544f63f [I18N] Update translation terms from Transifex 2017-07-01 02:39:14 +02:00
Olivier Dony d655824028
[FIX] http: force protocol when missing in URL 2017-06-15 16:01:40 +02:00
Olivier Dony eb8d919015
[FIX] sql_db: port fix from psycopg/psycopg2#459
NUL characters must not be used in query parameters,
as they will be ignored by libpq, being end-of-string
characters.

Preventing NULs avoids unexpected results from
queries. It is only necessary with psycopg2
versions before 2.7, which includes the upstream
fix.
2017-06-15 16:01:40 +02:00
Nicolas Lempereur ed61da6793 [FIX] base: duplicate company => duplicate partner
The name of a company is uniq. The name of a company comes from a
partner and is required.

Thus duplicating a company didn't work.

With this change, if no partner is overriding the copy, the current
partner is duplicated and associated to the new duplicated company.

opw-746106
closes #17532
2017-06-12 11:14:06 +02:00
Olivier Dony d18d606a55
[FIX] tools: verify path before opening 2017-06-02 22:29:47 +02:00
Raphael Collet d0301459ae [FIX] models: no warning when using `api.constrains` on an inherited field
Fixes #17312
2017-06-01 10:15:48 +02:00
Odoo Translation Bot 058b9cbb10 [I18N] Update translation terms from Transifex 2017-06-01 02:40:07 +02:00
Olivier Dony 58114e4954
[FIX] tools: always preload PIL with basic formats
Ensures that only the desired list of images formats are made
available via PIL: BMP, GIF, PNG, JPEG, TIFF and PPM.
2017-05-05 16:56:31 +02:00
Jérome Maes e3081dbb7e [FIX] ir_cron: log message in the right place
Log message in except clause to force displaying
traceback in logger exception.

Courtesy of chs
2017-05-05 13:57:32 +02:00
Odoo Translation Bot 0b4d01f1d3 [I18N] Update translation terms from Transifex 2017-05-01 02:40:51 +02:00
Christophe Simonis 2a65b8156d [FIX] base: run defined modifiers tests 2017-04-26 19:36:10 +02:00
Odoo Translation Bot 5d5bd2c404 [I18N] Update translation terms from Transifex 2017-04-16 02:54:21 +02:00
SEINLET Nicolas ded636eae1 [FIX] ir.rule: use rules at most once (#15843)
When a user belongs to multiple groups, and an ir.rule is applicable for some of
them, the rule is added multiple times in the domain. Just do it once. This
makes the query shorter and easier to debug.
2017-04-11 09:27:58 +02:00
Odoo Translation Bot 8f7791fcee [I18N] Update translation terms from Transifex 2017-04-09 02:54:13 +02:00
Raphael Collet 6595cfdf0c [FIX] expression: avoid useless query when searching on x2many sub-field
Searching on a domain like `[('m2m.sub', operator, value)]` currently does
something like:

    right_ids = comodel.search([('sub', operator, value)]).ids
    table_ids = model.search([('m2m', 'in', right_ids)]).ids

and reduces the domain triple to `('id', 'in', table_ids)`.

The domain triple can actually be reduced to `('m2m', 'in', right_ids)`.  With
this reduction, the search on the field `m2m` will be done as part of the main
query.  And this will also enable the optimization of the former fix!
2017-04-06 16:46:46 +02:00
Raphael Collet 3c2065c89d [FIX] expression: use sub-select when searching on many2many field
Avoid pathological performance issue caused by injecting ids retrieved with
another query.

Consider a domain like `[('m2m', 'in', ids)]` on a many2many field.  The
current implementation will perform the subquery:

    SELECT m2m_id1 FROM m2m_table WHERE m2m_id2 IN (ids)

and inject its result into the main query as:

    SELECT id FROM ... WHERE id IN (result_ids)

The latter may be very slow if `result_ids` is a huge list of ids.

The fix injects the first query into the main query as:

    SELECT id FROM ... WHERE id IN (
        SELECT m2m_id1 FROM m2m_table WHERE m2m_id2 IN (ids)
    )

As a result, the database will typically JOIN both tables, and avoid generating
the whole list from the subquery.
2017-04-06 15:59:50 +02:00
Odoo Translation Bot 794c9f5118 [I18N] Update translation terms from Transifex 2017-04-02 02:56:31 +02:00
Odoo Translation Bot fb130ec5a4 [I18N] Update translation terms from Transifex 2017-04-01 02:56:03 +02:00
Jeremy Kersten d7c765f62f [FIX] openerp: fix traceback when no field in constrains
In case you don't have 'field', the first 'if' will raise a warning.
In this case the second 'if' will crash with:
    "'NoneType' object has no attribute 'store'"

This commit closes #16146
Courtesy of @kmetaxas
2017-03-31 11:52:31 +02:00
Odoo Translation Bot 7aea6c9ad4 [I18N] Update translation terms from Transifex 2017-03-26 03:09:57 +02:00
Goffin Simon 0b529cf3af [FIX] http: setup_lang in Safari
Fine tuning of this commit: 5761b9a388

opw:716519
2017-03-22 17:03:23 +01:00
Goffin Simon 5761b9a388 [FIX] http: setup_lang in Safari
When not logged in the webstie on Safari and clicking on "Have a Question? Chat with us",
it creates a mail.channel from get_mail_channel and it also creates a translation.
But with Safari, the accept_languages is set with the value 'fr-fr', and this value was set
in the context as the lang='fr_fr'. So when the translation was created, a bad insert query was
raised in sql because the lang didn't exist in the res.lang table. When a translation is created,
the function _get_languages checked that the language is in the table.
So it was impossible to use the chatter when the user is not logged.

NB: interseting functions to see:

-setup_lang in odoo/http.py
-_dispatch in addons/website/models/ir_http.py
-get_mail_channel in addons/im_livechat/models/im_livechat_channel.py

opw:716519
2017-03-21 17:02:59 +01:00
Odoo Translation Bot a09e4aa7aa [I18N] Update translation terms from Transifex 2017-03-19 02:55:34 +01:00
Christophe Simonis 7a15e52cea [FIX] base: check ir.ui.view recursion 2017-03-13 13:27:53 +01:00
Odoo Translation Bot 70cac4d474 [I18N] Update translation terms from Transifex 2017-03-12 02:54:51 +01:00
Odoo Translation Bot 1246680756 [I18N] Update translation terms from Transifex 2017-03-05 02:55:35 +01:00
Odoo Translation Bot 775022e01f [I18N] Update translation terms from Transifex 2017-03-01 02:54:50 +01:00
Martin Trigaux 18fd9fe0a8
[FIX] server: avoid cron thread death
In case an exception (programming, out of memory or any other unexpected
failure), the cron_thread would crash and not recover until server restart.

Issue #15666 was an example of failure.

Courtesy of Nils Hamerlinck
2017-02-28 18:00:50 +01:00
Martin Trigaux 69e91f6a7c
[FIX] base: recover thread from down postgresql
If postgresql database is temporarly down, the cron thread may fail.

The cursor creation fails when trying to connect to the server which leads to
the cron thread to die (uncatched exception) and will not restart when postgres
is back.

Fixes #15666
2017-02-28 18:00:00 +01:00
Odoo Translation Bot 333e7d1f9e [I18N] Update translation terms from Transifex 2017-02-26 02:55:24 +01:00
Odoo Translation Bot 0616016b47 [I18N] Update translation terms from Transifex 2017-02-19 02:54:42 +01:00
Odoo Translation Bot 78be4cd1de [I18N] Update translation terms from Transifex 2017-02-12 02:53:52 +01:00
mge-odoo 8cb13c4e4c [FIX] openerp: quote read_group SQL query for case sensitive tables
In SQL, if there is no quote around the table/field, the result will
be returned as case insensitive.

This was causing a bug in the kanban view which was not displaying
the records because x_AA_count was named x_aa_count.
2017-02-08 15:55:47 +01:00
Odoo Translation Bot 8ce1e51340 [I18N] Update translation terms from Transifex 2017-02-05 02:54:43 +01:00
Odoo Translation Bot 66e2ddd670 [I18N] Update translation terms from Transifex 2017-01-29 02:55:31 +01:00
Olivier Dony 492d8ce4d0
[FIX] config: correctly bootstrap data_dir
Complements the patch in 15583a4813
in order to properly bootstrap a writeable data_dir when it is
(partially) nonexistant.
Depending on the startup parameters the data_dir might otherwise
have ended up read-only, preventing the creation of its necessary
components (session store, file store). Only the `addons` directory
of the data_dir needs to be read-only by default.
2017-01-28 00:53:20 +01:00
Olivier Dony af381bf7ec
[I18N] base: update PO template for 15583a4 2017-01-27 14:40:34 +01:00
Olivier Dony 15583a4813
[FIX] module: allow disabling 1-click install
As discussed on issue #15225, it should be possible for system administrators
to disable the 1-click installation system.
The plan is to disable the feature by default, but make it relatively easy
to turn on when it is explicitly desired.

1. At the moment we cannot guarantee that all Apps published on the Odoo Apps
   Store are safe. And it is a security risk to let end-users deploy Python
   code on their Odoo servers without requiring any review/deployment by a
   competent system administrator.
   We will work on improving the validation process of the Store, but this
   will require time, and won't probably be a 100% safe process in any case.
2. The one-click install feature is however really useful to help
   non-technical users install Apps, as long as the feature has been
   explicitly allowed by the system administrator. This is a common feature
   in other software suites as well. So we'd like to keep it as an opt-in
   feature.
3. Administrators of multi-tenant servers, cloud hosting services, etc.
   understandably expect to be able to turn off the feature for
   security/control reasons.
4. By turning off the feature by default, but still exposing it in the UI,
   we keep it *discoverable* for users. The error message should be
   helpful to direct users to their sysadmins.
5. By using the permissions of the download folder as a flag for turning
   off the feature, we avoid introducing an extra server parameter.
   The folder is still created (read-only) by default, for the sole purpose
   of making it easier to locate.

Fixes #15225
2017-01-27 13:00:42 +01:00