Commit Graph
9428 Commits
Author SHA1 Message Date
Odoo Translation Bot 77be55fcc7 [I18N] Update translation terms from Transifex 2017-05-07 00:28:47 +02:00
Olivier Dony 5e776e7a30 [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:55:12 +02:00
Christophe Simonis c65db01eb7 [MERGE] forward port branch saas-6 up to 96650373f8 2017-05-05 15:34:30 +02:00
Christophe Simonis 96650373f8 [MERGE] forward port branch 8.0 up to e3081dbb7e 2017-05-05 15:31:08 +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
Odoo Translation Bot 32ea5ad690 [I18N] Update translation terms from Transifex 2017-04-30 00:29:03 +02:00
Christophe Simonis 283b648c18 [MERGE] forward port branch saas-6 up to 5c05e39713 2017-04-26 19:41:00 +02:00
Christophe Simonis 5c05e39713 [MERGE] forward port branch 8.0 up to 2a65b8156d 2017-04-26 19:38:17 +02:00
Christophe Simonis 2a65b8156d [FIX] base: run defined modifiers tests 2017-04-26 19:36:10 +02:00
Odoo Translation Bot 91c00bc011 [I18N] Update translation terms from Transifex 2017-04-23 00:31:08 +02:00
Christophe Simonis 53288aa837 [FIX] base: show "Contact Creation" group option in non-debug mod 2017-04-21 12:20:00 +02:00
Odoo Translation Bot 5d5bd2c404 [I18N] Update translation terms from Transifex 2017-04-16 02:54:21 +02:00
Odoo Translation Bot 2c75ad396f [I18N] Update translation terms from Transifex 2017-04-16 00:30:18 +02:00
Raphael Collet 975086c039 [FIX] fields: avoid invalidation of fields computed on new records
Issue: when a field is computed on a new record, the record is not marked as
"being computed", and it could therefore be invalidated.  The fix consists in
using the standard method that marks records before calling the compute method.
2017-04-12 17:15:03 +02:00
Christophe Simonis f10ef71f06 [MERGE] forward port branch saas-6 up to 87b21d19eb 2017-04-12 12:58:19 +02:00
Christophe Simonis 87b21d19eb [MERGE] forward port branch 8.0 up to ded636eae1 2017-04-12 12:56:09 +02:00
Raphael Collet 4f98311623 [FIX] fields: recompute recursive stored fields
This is a backport of rev 3481f0faff.
2017-04-12 09:18:23 +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
Odoo Translation Bot 086723152e [I18N] Update translation terms from Transifex 2017-04-09 00:30:47 +02:00
Christophe Simonis 51fe54dd8d [MERGE] forward port branch saas-6 up to d92c048f9a 2017-04-07 16:30:03 +02:00
Christophe Simonis d92c048f9a [MERGE] forward port branch 8.0 up to 6595cfdf0c 2017-04-07 16:16:03 +02:00
Christophe Simonis d4d5181285 [MERGE] forward port branch saas-6 up to 271067f50c 2017-04-07 15:11:50 +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
Christophe Simonis 271067f50c [MERGE] forward port branch 8.0 up to 3128e84243 2017-04-06 14:46:56 +02:00
Jeremy Kersten 7db14bbe69 [FIX] res_users: show the computed base.user_groups_view view in dev mode
Before this commit, in dev mode, the view was read from xml with the dummy
template. Set arch_fs to False will force to use the view in database and so
the automatically computed view.

This commit closes #16179
2017-04-03 09:34:26 +02:00
Odoo Translation Bot 794c9f5118 [I18N] Update translation terms from Transifex 2017-04-02 02:56:31 +02:00
Odoo Translation Bot 963c9ffa4a [I18N] Update translation terms from Transifex 2017-04-02 00:32:12 +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
Odoo Translation Bot 1e476e59fe [I18N] Update translation terms from Transifex 2017-03-26 00:31:50 +01:00
Christophe Simonis 8376f538b5 [MERGE] forward port branch saas-6 up to 9d04d14669 2017-03-24 17:11:48 +01:00
Christophe Simonis 8caac6bc44 [MERGE] forward port branch 8.0 up to 5847de4aaf 2017-03-24 15:23:16 +01: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
Mike Mugge 177a25ff10 [FIX] base: correct example spelling in docstring
hdfs is the scheme for hadoop, not hadopp

Closes #15926
2017-03-20 17:00:50 +01:00
Nicolas Lempereur bc0313791c [FIX] fields, web: improve form onchange to x2many
In a form view, when a field onchange lead to a change on a x2many,
there was two different behavior:

- if the x2many had an embedded view (eg. a tree view inside a form
view) the onchange would notify that it expected the x2many field in
this embedded view to be changed and handled the changes correctly.

- if the x2many had a default view, the onchange ORM would not be
aware the x2many could be modified and would not sent the changes
back causing blank or not updated x2m lines and error on save.

---

Two solutions were birthed to solve the second point:

=> PR #10557 = solving everything

With this PR the onchange in the ORM is aware of every fields in the
current view (even field in a x2m in a x2m in a x2m in a form view) and
if any of these are change the javascript gets back the value of the
fields present in the view.

This PR has currently not been merged by fear of changing too much and
anyway could only be done in master.

=> PR #12249 = if no field for x2many, send its form view fields

With this change, if the ORM onchange is not aware of the fields in the
x2many widget to returns, all the field in the x2m default form view are
returned.

This was merged in bbdf960 but introduced a number of other issue:

- in most situation the x2many is represented by a list view, which may
have fields missing of the form view,  so the original is still present.

- the view used may differ from the default form view in other way
(depending on value in context or other possibilities).

- the form view could have fields not present in the form view which
could end up in `write` on fields which should not be written to.

---

This commit reverts bbdf960 and adapts a small part of #10557 so the
x2many with default view works as an embedded x2many. For more than one
level (eg. a x2many in a x2many) this would still not work but it is
only solvable by a PR such as #10557 which could only be targetted for
master.

With this commit:

- the list of fields sent to ORM onchange is computed at the first onchange
- the fields from a x2many field default view is sent for onchange
- the initial onchange on record creation is delayed to when x2many are loaded

closes #12249, closes #15336, closes #15890
fixes #11236, fixes #12249, fixes #15129, #15419
opw-705965 opw-716095 opw-715619 opw-710440

note: already present in 10.0 (with a test) as f65475d68
2017-03-20 13:28:34 +01:00
Odoo Translation Bot a09e4aa7aa [I18N] Update translation terms from Transifex 2017-03-19 02:55:34 +01:00
Odoo Translation Bot 9bbf34231a [I18N] Update translation terms from Transifex 2017-03-19 00:31:31 +01:00
Nicolas Martinelli af64780a2d [FIX] base: no-break hyphen
- Create an invoice with two products
- Each line has a long description (spread on 2 lines)
- The second line has a negative value
- Print the invoice (PDF)

The amount spreads on two lines, split as:
$ -
1,000.00

This is due to the wkhtmltopdf version with patched QT. Unfortunately,
upgrading to the latest version 0.12.4 doesn't solve the problem.

The solution is to replace the '-' by a non-breakable hyphen.

opw-711002
2017-03-17 09:07:15 +01:00
Christophe Simonis 73d6f9023a [MERGE] forward port branch saas-6 up to 31474efec2 2017-03-13 13:53:54 +01:00
Christophe Simonis 31474efec2 [MERGE] forward port branch 8.0 up to 7a15e52cea 2017-03-13 13:38:04 +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 dcd78c2c39 [I18N] Update translation terms from Transifex 2017-03-12 00:30:59 +01:00
Denis Ledoux eaddb7caff [FIX] uninstall: unlink of many2one fields having one2many dependencies
The revision
ea9ef7c39d
introduced a regression:
many2one fields having one2many depending on it declared before
the declaration of the many2one itself were not unlinked
during a module uninstall.

As a result, the column in the table was not dropped,
and the table itself was not deleted either, not even truncated.

Therefore, when you tried to reinstall the module, you had data
left.

The check of the one2many dependencies must not be performed
during an uninstall. Anyway, this wasn't blocking the uninstall
of the modules,
it was just preventing the field  to be deleted, that's all.

opw-710291
2017-03-06 13:02:39 +01:00
Odoo Translation Bot 1246680756 [I18N] Update translation terms from Transifex 2017-03-05 02:55:35 +01:00