Commit Graph

8015 Commits

Author SHA1 Message Date
Jesús Alan Ramos Rodríguez 248d4a32d9 [FIX] base: position of MXN currency 2015-10-20 16:31:37 +02:00
Martin Trigaux 92e921bed2 [FIX] project: untranslated terms
Were not present in .pot files
Re-export all project related modules
Fixes #9119
2015-10-19 08:50:05 +02:00
Odoo Translation Bot a7c474b3a7 [I18N] Update translation terms from Transifex 2015-10-18 03:00:56 +02:00
Goffin Simon b00f0185a2 [FIX] models: read_group on many2one fields
When making on model A a read_group with groupby equal to a many2one field F1 to a model B
which is ordered by a inherited not stored field F2, the group containing all the
records from A with F1 not set was not returned.

Example:
model A= "hr.applicant"
model B= "res.users" (_order = "name,login")
inherited model= "res.partner"
field F1= "user_id"(to "res.users)
field F2= "name"(inherited from "res.partner")

In this example, the query generated by the function "read_group" was:

SELECT min(hr_applicant.id) AS id, count(hr_applicant.id) AS user_id_count , "hr_applicant"."user_id" as "user_id"
FROM "hr_applicant" LEFT JOIN "res_users" as "hr_applicant__user_id" ON ("hr_applicant"."user_id" = "hr_applicant__user_id"."id"),"res_partner" as "hr_applicant__user_id__partner_id"
WHERE ("hr_applicant"."active" = true) AND ("hr_applicant__user_id"."partner_id" = "hr_applicant__user_id__partner_id"."id")
GROUP BY "hr_applicant"."user_id","hr_applicant__user_id__partner_id"."name","hr_applicant__user_id"."login"
ORDER BY  "hr_applicant__user_id__partner_id"."name" ,"hr_applicant__user_id"."login"

which always returned "hr.applicant" groups of records with a "user_id" set due to the inner join maked on res_partners.

This inner join on "res_partner" is coming from function "add_join" calling by "_inherits_join_add"
in _generate_order_by_inner.

Introduced by dac52e344c

opw:651949
2015-10-16 12:11:31 +02:00
Carlos Almeida 1fdd5cf975 [FIX] base: BRL currency position to before value
Closes #9098
2015-10-16 11:35:55 +02:00
Nicolas Lempereur b0a4dd0127 [FIX] workflow: don't process workitem several times
In some complex use case of a workflow instance with several workitems,
a given workitem processing could itself somewhat recursively process
one of the following workitems.

This situation was currently not taken into account, so in that given
case, the already processed workitems would be processed again.

opw-647580
2015-10-14 17:37:13 +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
Raphael Collet e410d7d7e7 [FIX] orm: always save boolean function fields, even when they are false
Fixes #4292: searching for records when a related boolean field is `False`
always returns nothing.
2015-10-12 17:26:40 +02:00
Raphael Collet 8ea17a8cc9 [FIX] orm: always save boolean function fields, even when they are false
Fixes #4292: searching for records when a related boolean field is `False`
always returns nothing.
2015-10-12 16:38:17 +02:00
Odoo Translation Bot 5dd33e8ca6 [I18N] Update translation terms from Transifex 2015-10-11 03:04:31 +02:00
Christophe Simonis a6b11a151e [MERGE] forward port of branch 7.0 up to f8b56e4 2015-10-10 14:25:35 +02:00
Raphael Collet 25ea23eb31 [FIX] models: when accessing function fields in multi, read them all at once 2015-10-06 10:04:59 +02:00
Odoo Translation Bot 57b993ffad [I18N] Update translation terms from Transifex 2015-10-04 01:59:01 +02:00
Raphael Collet a9c43bba82 [FIX] fields: fix assignment of related field on several records 2015-10-02 17:05:35 +02:00
Raphael Collet 446d59fd44 [IMP] api: improve documentation of `api.onchange`
This fixes #3968.
2015-10-02 11:58:44 +02:00
Raphael Collet cca7a7a051 [FIX] ir_model_fields: fix and simplify update on custom fields
Avoid "patching" the registry, as this introduces inconsistencies (some field
attributes are lost).  Instead, proceed as follows:
 - update the definition of custom fields in database;
 - clear the corresponding cache on the registry (this was missing);
 - setup the models in registry (this reloads the custom models and fields);
 - update the database schema of the models based on the registry.

This makes the update of custom fields simpler and more robust.
2015-10-01 15:26:07 +02:00
Odoo Translation Bot 78450f2769 [I18N] Update translation terms from Transifex 2015-10-01 00:32:02 +02:00
Leonardo Rochael Almeida 1005299955 [FIX] YAML: `!menuitem` tag handling
The fetched ID was the one of the parent instead of the ID of the imported menu.
2015-09-28 17:15:38 +02:00
Leonardo Rochael Almeida 39745a4290 [FIX] YAML: Add support for `reference` fields in YAML
YAML import was missing support for loading values into fields
where `field.type == 'reference'`.
2015-09-28 17:15:38 +02:00
Leonardo Rochael Almeida 11886f4d9f [FIX] YAML: typos 2015-09-28 17:15:37 +02:00
Leonardo Rochael Almeida 5760a5d547 [IMP] YAML: Better Error message for bad xml_id
Use the original xml_id, which is present in the file, instead of the
checked one.
2015-09-28 17:15:37 +02:00
Ronald Portier (Therp BV) 65d4b25565 [FIX] tools: i18n_extra loading, backport of 7c2795ca
In case of different directory for stroing po and pot files than 'i18n'
(e.g. 'i18n_extra'), a po could be linked to a wrong pot file.
Use the same folder as the po file to look for pot.
Closes #4323
2015-09-28 15:38:39 +02:00
Denis Ledoux 9671ae2a2d [FIX] models: onchange warnings concatenation
This revision is related 420e198aa5.

onchanges can return "False" as warning value.
In such a case, prevent the concatenation with previous results.
2015-09-28 14:45:29 +02:00
Denis Ledoux 420e198aa5 [FIX] models: multiple warnings in onchanges
If multiple warnings were returned by a cascading onchange
call, only the last warning was displayed.

This revision concatenates the warnings in such a case.

opw-649275
2015-09-28 12:06:29 +02:00
Odoo Translation Bot c764b703ca [I18N] Update translation terms from Transifex 2015-09-27 01:58:59 +02:00
Raphael Collet 6dd5071952 [FIX] fields: in binary fields, pass `strip_style` parameter between APIs 2015-09-23 15:28:12 +02:00
Christophe Simonis d05ee26a72 [MERGE] forward port of branch saas-3 up to 24bcdb7 2015-09-22 15:40:28 +02:00
Christophe Simonis 33bb8db05e [FIX] base: do not validate deactived custom views 2015-09-22 15:33:01 +02:00
Christophe Simonis 24bcdb75fb [MERGE] forward port of branch 7.0 up to c2aff47 2015-09-22 15:30:22 +02:00
Martin Trigaux 95a376040f [FIX] tools: error in cafe326b
If defined, use module_name, otherwise not doing much...
Courtesy of @KangOl
2015-09-18 10:49:29 +02:00
Martin Trigaux cafe326b59 [FIX] tools: avoid duplicates when synchronising translation
The "Synchronise translation" wizard almost doubles the number of translated
terms in database.
This is due to the loss of the module reference at the synchronisation
(`module_name` is empty as updating all modules)
Only overwrite the module when it is set (default None)
Fixes #6149

Second part of the patches avoid inserting translations without any module for
locale xml ids.
2015-09-17 17:09:55 +02:00
dufresnedavid cc9113f818 [IMP] Prevent unclosed cursor during tests
If an error happens in an overload of setUp, the already-open cursor
is likely not to get properly released before the next test,
deadlocking the db, because tearDown only runs if setUp has
succesfully completed.

Cleanups were added specifically to run every time, after tearDown has
(potentially) been executed.

closes #8327

Note: cleanups run in LIFO order (as they should).
2015-09-17 12:23:09 +02:00
Olivier Dony 2b1cdd551f [FIX] fields.float: avoid non-deterministic side-effects on other cursors
In 5efac22043 and
1cf5723835 the computation
of the decimal precision of float fields was modified to
reuse a random cursor from the request environments.
Environment.envs is a WeakSet, subject to unpredictable
garbage collections.

This could cause hard-to-diagnose problems by executing
a SELECT query in a cursor that is supposed to be
otherwise idle and untouched.

As an example, this could cause a transaction start in a
cursor that was just committed/rolled back,
and was waiting for another operation to complete.

One such case happened semi-randomly during a module
installation triggered from the web client, where the request
cursor is committed and waiting for the registry
initialization done with a different cursor,
in the middle of _button_immediate_function()

After the registry initialization, the request cursor is
used again to determine the next action (ir.actions.todo),
and this could cause a TransactionRollbackError if the
request cursor was used during the initialization.

Using a new cursor every time is much safer, simpler,
and will not cause any significant performance hit,
because it will usually grab an available connection
from the connection pool, rather than create a new one.

Fixes opw-649151
2015-09-15 19:38:19 +02:00
Xavier Morel 2474a91bc9 [IMP] doc: recommend not using @api.one
* alter docstring of @api.one to mark it as deprecated for 9.0,
  recommend using @api.multi instead
  - deprecation notes were not correctly styled, add styling
    matching "warning" alerts
* move @api.one down the doc page to deemphasize it
* fix "backend" tutorial to remove all instances of ``@api.one``

closes #8527
2015-09-15 14:38:45 +02:00
Odoo Translation Bot 7ed58916df [I18N] Update translation terms from Transifex 2015-09-13 01:55:09 +02:00
Raphael Collet 1a47ac3921 [FIX] models: fix write() on inherited field that is not a column of parent 2015-09-11 17:35:24 +02:00
Christophe Simonis 35233dbbe2 [FIX] core: tools.html_sanitize: allow svg images 2015-09-11 16:42:47 +02:00
Christophe Simonis 1a8569095e [MERGE] forward port of branch saas-3 up to d48aa27 2015-09-11 16:38:00 +02:00
Christophe Simonis d48aa27cce [MERGE] forward port of branch 7.0 up to a7ff110 2015-09-11 16:16:27 +02:00
Christophe Simonis a7ff1104bc [FIX] base: sanitize module description 2015-09-11 14:58:44 +02:00
Stéphane Bidoul 8d58d985dd [FIX] http: no auto-load for modules not installable
Closes #8289
2015-09-09 13:56:55 +02:00
Raphael Collet 085875619f [FIX] fields: in `one2many.set`, replace incorrect query by ORM access
When linking a record into a `one2many` relation with command `(4, rid)`, a
query checks whether the record is already linked to the current record id:

    SELECT 1 FROM {inv_table} WHERE id={rid} AND {inv_field}={id}

where `inv_field` is the name of the inverse field, and `inv_table` is the
table where this field is stored.

The query is wrong if the inverse field is inherited, because the `rid` does
not belong to the table `inv_table`.

The test has been replaced by a plain ORM access:

    rec = obj.browse(cr, SUPERUSER_ID, rid)
    if int(rec[inv_field]) != id:
        ...

This fixes #4685.
2015-09-09 09:36:40 +02:00
Odoo Translation Bot 101540b491 [I18N] Update translation terms from Transifex
Fetch the translations with the option --all to fetch missing languages
and use --minimum-perc 10 to avoid empty files

Fixes #8423
2015-09-08 17:07:59 +02:00
Martin Trigaux 3120357707 [I18N] export translations of models.py and tools 2015-09-08 16:55:40 +02:00
Martin Trigaux 8ac392873b [FIX] tools: export translations of models.py
When exporting the translations, the terms stored in individual files outside of
addons folders (e.g. openerp/models.py) needs to be scanned as well and added in
base translations.
Some folders like osv and report were enough to add these files but with the new
api moving the ORM to openerp folder, a non-recusrive scan needs to be added.

Fixes #7482
2015-09-08 16:55:36 +02:00
Raphael Collet 05f176f418 [IMP] ir_ui_view: do not recompute field `model_data_id` on views
The recomputation should not be necessary, as we normally don't change the
record referred by an ir_model_data record.  This speeds up the creation of
ir_model_data records by 33%, which should be noticeable during module
installations.
2015-09-08 14:14:58 +02:00
Cédric Pigeon 20b5e0a4ab [ADD] base: test to check too long table aliases
Test for rev. 11f538fae6
2015-09-08 11:53:29 +02:00
Thomas Rehn 11f538fae6 [FIX] expression: table alias reaching 64 characters limits
Postgresql has a limit of 64 characters for tables, columns names
as well as for aliases names.

When generating an alias name, e.g. for group by and order
by clauses, if the alias is longer than 64 characters,
use hashing to force the alias length to be within this
64 chars limit.

Fixes #8094
Closes #8142
2015-09-08 11:53:18 +02:00
Denis Ledoux 64e44c0a24 [IMP] base: tests, move patch_order to TransactionCase
In order to be able to redefine simply the order
of a model for testing purposes,
without having to re-define this method in each test class.
2015-09-08 11:53:18 +02:00
agaldona db6514ea48 [IMP] tools: add language eu_ES Basque / Euskara
As a new translation team has been composed.
Closes #8346
2015-09-07 12:30:06 +02:00
Olivier Dony c345d294b1 [MERGE] Forward-port saas-3 up to rev. 10e6ad1355 2015-09-07 11:18:10 +02:00
Olivier Dony 10e6ad1355 [MERGE] Forward-port 7.0 up to rev. 20f69bbce9 2015-09-07 11:12:57 +02:00
Paul Catinean 20f69bbce9 [FIX] res.users: remove check_super duplication
Closes #8403
2015-09-07 11:07:43 +02:00
Raphael Collet 1c4c64fe01 [FIX] fields: add support for date/datetime null values in field methods 2015-09-07 10:27:34 +02:00
Raphael Collet 1d314962fe [FIX] models: handle the case of `_constraints` with empty list of field names 2015-09-07 09:12:14 +02:00
Odoo Translation Bot 927c00525c [I18N] Update translation terms from Transifex 2015-09-06 01:50:52 +02:00
Raphael Collet fa427f15b7 [FIX] models: performance of `mapped` is now in O(n) instead of O(n²) 2015-09-04 17:11:57 +02:00
Denis Ledoux 50f915f3ac [FIX] models: oversight introduced in 1658bee8d4 2015-09-04 13:27:29 +02:00
Raphael Collet f5e5bbdae0 [FIX] expression: fix search on one2many field with inherited inverse field
Consider the following setting:
 - on model A, field F is computed, stored, and depends on field G
 - on model A, field one2many G to model B, with inverse field H
 - on model B, field many2one H is inherited (_inherits) from model C
 - on model C, field many2one H is stored

When adding records of model B, the field F must be recomputed.  In order to
determine which records to recompute, one searches model A with a domain like
[(G, 'in', ids)].  In expression.py, this is resolved with an SQL query like

    select H from B where id in {ids}

This query fails, since the field H is not stored in model B.  This happens in
general if H is not stored (it may be any computed field).  In that case, one
should instead browse records from B, and read field H through the ORM.

A test case has been added: it introduces a many2one field in a parent model,
and a one2many field using the inherited many2one on a child model.  The test
checks whether one can search on the one2many field.
2015-09-04 13:25:51 +02:00
Denis Ledoux 1658bee8d4 [FIX] models: copy_data call in new API.
Context are frozendict in the new API.
Therefore, they cannot be altered.
Any attempt to alter a frozendict
will lead to a crash.

Fixes #7362
2015-09-04 13:17:34 +02:00
Ravi Gohil 0c1e97895a [FIX] server: missing format string argument.
Introduced by 099ae0f70c

Closes #3356
2015-08-31 17:55:00 +02:00
Olivier LAURENT 017688cc29 [FIX] models: old api, prevent infinite recursion in stored function fields
The risk was introduced by b7f1b9c.
IF _store_set_values() recall another _create() or _write(),
the recomputation mechanism enter in an infinite recursion
trying to reevaluate for each call exactly the same fields
for the same records than the previous one

This revision replaces the loop of _store_set_values()
by 2 nested loops:

 - that not breaks the entire consumption
   of recompute_old queue
   (Tested thanks to revision a922d39),
 - that allows to clear the queue
   before each recomputations bundle fixing thereby the recursion

Closes #7558
2015-08-31 17:45:21 +02:00
Odoo Translation Bot b79d492ec4 [I18N] Update translation terms from Transifex 2015-08-30 01:51:03 +02:00
Colin Newell 84857a3f4f [FIX] currency: simple quote in currency symbols
Escape the currency symbol to prevent javascript errors,
for instance when reconciling a bank statement
(with the special reconciliation widget)

Closes #8216
2015-08-27 17:45:59 +02:00
Nicolas Lempereur 3e82c94d69 [FIX] point_of_sale,base: use context timezone for sequence
Previously when replacing time related sequence in a prefix or suffix of
a sequence, the timezone used for the time values would always be the
server's timezone.

With this fix, the context timezone is used if available (UTC is used
otherwise).

closes #8159
opw-646487
2015-08-25 14:08:17 +02:00
Odoo Translation Bot 99931637d5 [I18N] Update translation terms from Transifex 2015-08-23 01:51:13 +02:00
Christophe Simonis 7349e23837 [FIX] models: correct ORDER BY onm many2one fields
Now the we follow many2one when generating ORDER BY, we need to keep
track of visited relations to avoid loops.

Closes #8114
2015-08-20 11:44:04 +02:00
Olivier Dony c2cbb75319 [FIX] web: _serve_attachment should not trigger redirect loops
When the Bundle mechanism caches bundle files into the
ir.attachment table, it can sometimes cache an empty
resource file (For example, if a less/saas compiled file
results in an empty CSS file) for the bundle URL.
The appropriate behavior for _serve_attachment()
when the browser loads that bundle URL is to return
an empty file (which is the correct content), instead of
redirecting again to the same URL, triggering a loop.

In addition, this commit removes the special case for
returning 204 No Content. This HTTP status code is not
really meant for GET requests - returning an empty file
with a 304 or 200 code is more appropriate and allows
for normal browser caching.
2015-08-17 17:01:19 +02:00
Odoo Translation Bot 4359f65522 [I18N] Update translation terms from Transifex 2015-08-16 01:58:03 +02:00
Christophe Simonis 856cb6fcb0 [FIX] models: distribute ORDER BY direction 2015-08-14 15:42:37 +02:00
Christophe Simonis dac52e344c [FIX] models: "ORDER BY" on many2one fields
When ordering results on a many2one fields, results are ordered by
order of the target model. The code was wrongly assuming that this
`_order` attribute only contains `_classic_read` fields (that can be
directly read from the table in database). Now correctly generate the
"ORDER BY" clause using the current table alias.

`res.users` can now be sorted by name.
2015-08-14 15:42:37 +02:00
Nicolas Lempereur cdb9000449 [FIX] website, base: escaping and unescaping html
When saving a template in version 8.0, html would be saved as it should
be displayed once on the site. In particular, if some text should be
escaped once send to the browser, it will be saved as such.

But when rendering, a text node content is unescaped two times:

* for translation which seems wrong since we already use .text of a node
  which already escaped it, doing it one more time is bad,

* when rendering the template, since the html template is stored in xml,

This commit remove superfluous unescaping for translation, and add an
escaping when saving the changed template content.

closes #7967
opw-646889
2015-08-13 15:15:24 +02:00
Christophe Simonis d5a6380726 [MERGE] forward port of branch 7.0 up to f410266 2015-08-11 16:35:00 +02:00
Odoo Translation Bot 4fcc756ef9 [I18N] Update translation terms from Transifex 2015-08-09 02:00:12 +02:00
Olivier Dony fb55b2fa5e [FIX] res.users: more consistent handling of user private fields 2015-08-07 13:16:45 +02:00
Olivier Dony 5e4c09ae53 [FIX] res.users: more consistent handling of user private fields 2015-08-07 13:15:45 +02:00
Alexandre Fayolle 0b74fbed74 [FIX] ir.ui.view: pass context as a kwarg
otherwise when a method such as fields_get is overridden
using the new API, self.env.context is an empty directory,
and the translations cannot be performed correctly

Closes #7911
2015-08-07 02:52:19 +02:00
Christophe Simonis 6e59ea5db9 [FIX] tests: explain why we ignore phatomjs return code 2015-08-06 21:27:03 +02:00
Olivier Dony 77868ec4f9 [FIX] base, auth_openid: wrong implementation of API by auth_openid
Authentication modules are supposed to override res_users.check_credentials()
in order to plug in their own mechanism, without actually modifying the
behavior of res_users.check(), res_users.authenticate() or
res_users._login().

auth_openid was incorrectly overriding check() instead of
check_credentials(), and unnecessarily accessing private
attributes of res_users. Fixing the implementation of auth_openid
to follow the API means we can completely make those attributes
private.
2015-08-06 19:21:12 +02:00
Olivier Dony 54e06907c0 [FIX] base, auth_openid: wrong implementation of API by auth_openid
Authentication modules are supposed to override res_users.check_credentials()
in order to plug in their own mechanism, without actually modifying the
behavior of res_users.check(), res_users.authenticate() or
res_users._login().

auth_openid was incorrectly overriding check() instead of
check_credentials(), and unnecessarily accessing private
attributes of res_users. Fixing the implementation of auth_openid
to follow the API means we can completely make those attributes
private.
2015-08-06 19:19:17 +02:00
Christophe Simonis d8d9c7277e [FIX] phantomjs test: `phantom` variable is undefined inside page. 2015-08-06 17:20:37 +02:00
Olivier Dony 5a41a3011a [FIX] ir_translation: undo asymmetric change of set_ids/get_ids
Partial revert of commit 39d17c2580
of PR #4617, that broke translations by introducing a different
set of criterions for filtering translations in `_set_ids()` and
`_get_ids()`, adding the `module` column in `_set_ids`.

This meant `_get_ids` would see translations that `_set_ids`
would never update: the translation interface did not appear to
be working anymore as soon as a translation entry existed with
no `module` value.
This is likely for manual entries and for entries bootstrapped
by `translate_fields()`, as they do not belong to any module.

The situation described in PR #4617 probably requires an extra
fix in the translation import system instead.
2015-08-05 16:29:16 +02:00
Raphael Collet 9699f510e4 [FIX] res_users: fix wrong index when parsing m2m commands 2015-08-05 14:35:42 +02:00
Olivier Dony c96174da5f [MERGE] Forward-port of latest bugfixes from saas-3 up to 733cb3e76f 2015-08-04 15:22:49 +02:00
Olivier Dony 733cb3e76f [MERGE] Forward-port from 7.0 up to 8b3d69a0d7 2015-08-04 15:17:51 +02:00
Daniel Reis 8b3d69a0d7 [FIX] orm: performance of regex to check search `order` spec
This regex is used for a quick sanity check of
the order_spec in `search(order=<order_spec>)`.
Because it was build on the repetition of a
group ending with a series of optional patterns,
it could cause expensive backtracking when the
order spec did not actually match the regex
(the regex engine was trying all possible ways
to split the groups)

Forcing the repeating group to either end
with a comma or the end of the string prevents
prohibitive backtracking, while being even
more restrictive with regard to the syntax of
the order spec.

Closes #7755
2015-08-04 11:45:01 +02:00
Olivier Dony df002518ee [FIX] models: access error due to prefetch of indirectly referenced records
Complements commit af9393d505
in light of commit 62b0d99cfe,
to really have the correct effect.

When the prefetching failed due to the presence of
extra records in the cache (for which the access is denied),
the `read` operation was indeed retried. However the
result was not stored in the cache because the cache
already held a FailedValue (automatically added when the
prefetch failed).
2015-08-04 00:00:31 +02:00
Martin Trigaux 180b2e7746 [I18N] Transifex project URL
Thank you Transifex to change the URL scheme from time to time, that's cool.
cf https://www.transifex.com/blog/2015/new-url-schema/
2015-08-03 17:25:44 +02:00
Nicolas Martinelli 282fc4a850 [FIX] openerp: export empty string instead of None
xmlrpc 1.0 does not support None/null, so commit f3e4d0a will break xmlrpc api.
Therefore, we export an empty string if the field is empty, instead of False or
None. For integers and floats, zero is exported.

opw-643966
2015-08-03 08:16:23 +02:00
Antony Lesuisse b4f7288193 [REM] test: phantom_jsfile method
deprecate phantom_jsfile method, keeping only phantom_js, phantom_js takes a
code argument to run client side only.

Removing phantom_jsfile will allow to switch from phantom to any other engine
such as running google chrome or firefox directly. The only use of
phantom_jsfile was an example.
2015-08-02 14:37:19 +02:00
Odoo Translation Bot 389252dd95 [I18N] Update translation terms from Transifex 2015-08-02 08:30:05 +02:00
Odoo Translation Bot 218ffc1a5a [I18N] Update translation terms from Transifex 2015-08-02 01:59:36 +02:00
Christophe Simonis ecfaf213c4 [FIX] module loading: pre/post_init_hook execution
New installation was detected using the `installed_version` attribute
(`latest_version` in `ir_module_module` table), but this field wasn't
reset at module uninstallation (now fixed by cb29f9e) avoiding
execution of hooks.

Same logic was applied for migration scripts at 8ff7230.

Fixes #7708
2015-07-29 12:30:14 +02:00
Christophe Simonis e8076c3854 [MERGE] forward port of branch saas-3 up to 5c7190c 2015-07-29 12:11:20 +02:00
Christophe Simonis 5c7190c93f [MERGE] forward port of branch 7.0 up to cb29f9e 2015-07-29 12:07:34 +02:00
Christophe Simonis cb29f9efac [FIX] base: reset `latest_version` field when uninstalling a module. 2015-07-29 12:00:15 +02:00
Christophe Simonis af9393d505 [FIX] orm: access error due to prefetch of indirectly referenced records.
The new-api record prefetching algorithm attempts
to load data for all known records from the requested
model (i.e. all IDs present in the environment cache),
regardless of how indirectly/remotely they were
referenced. An indirect parent record may therefore
be prefetched along with its directly browsed children,
possibly crossing company boundaries involuntarily.

This patch implements a fallback mechanism when
the prefetching failed due to what looks like an
ACL restriction.

The implementation of `_read_from_database` handle
ACL directly and set an `AccessError` as cache value
for restricted records.

If a model (like `mail.message`) overwrites `read` to
implements its own ACL checks and raises an `AccessError`
before calling `super()` (which will then call
`_read_from_database`), the cache will be not fill,
leading to an unexpected exception.

If this commit messae looks familiar to you, that's
simply because this is the new-api counterpart of
b7865502e4
2015-07-24 14:01:09 +02:00
Odoo Translation Bot 0871f423a3 [I18N] Update translation terms from Transifex 2015-07-19 02:01:00 +02:00
Raf Ven 39d17c2580 [FIX] base: avoid deleting translations
When updating a translation, the previous one is deleted and a new one is
recreated (with no module and state). When the source module is updated, the
previous term is inserted again to the lsit of terms.
Instead of dropping and recreating terms during update, simply update the
existing term and create one only if there were no previous translation.
Fixes #4617
2015-07-16 15:14:30 +02:00
Antony Lesuisse 8f07f01783 [FIX] base: res.company _company_default_get
Fix rule processing the criteria user.company_id was not honored.

Closes: #4614, #7504
2015-07-16 14:38:13 +02:00