Commit Graph

6990 Commits

Author SHA1 Message Date
Richard Mathot 6f1b820d33 [REF] OpenERP --> Odoo in various UI texts (2)
Some things missed by commit 8b67a7202d
2014-07-18 14:59:38 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Olivier Dony 15174e9a70 [IMP] base, mail: cache user.has_group() + ir.ui.menu.load*()
Loading the menus is the most expensive
operation for an average page load, and
the result does not change often.
The menu filtering already uses a separate
cache based on groups, but the rest of the
loading includes reading actions and
translating menu names, which is also
expensive.

Added a cache keyed on user + user
lang, plus relevant cache invalidation
when any of the following are touched:
access rights, user data including
groups and language, menus or mail.group
subscriptions.

The menu filtering cache is still
useful in parallel has it is invalidated
under different conditions.

User.has_group() is cheap but still
called very often, so it is an easy
win as well, and also frequently
used when rendering page templates.
2014-07-17 18:46:10 +02:00
Christophe Matthieu 6e6f12144d [IMP] model: when the orm create/update a table check if they are at least one row of the table to load column default values 2014-07-17 18:46:10 +02:00
Christophe Matthieu fe64988ae2 [FIX] res.users: use read method to compute default values to don't create browse record and fetch all fields, browse record crash for install or update module 2014-07-17 18:46:09 +02:00
Christophe Matthieu 82a1ea0935 [FIX] model: The user install / update / test is different from the normal mode (no prefetch in test mode) some errors are hidden. 2014-07-17 18:46:09 +02:00
Xavier Morel b1f1596aef [FIX] "prefetching" removing even the records specifically asked for
16d6744 turns out to not be great, because it filters out the todos for
prefetched fields (rather than those just for the field being asked) there are
situations where it ends up not fetching the records it was originally asked
for and breaks a bunch of stuff e.g. unreconcile line in bank statements

Force the ids explicitly asked for back in the fetched set, so that the
prefetch is at most a noop, rco will have to take an actual look at it.
2014-07-16 16:29:24 +02:00
xmo-odoo ec89c9cead Merge pull request #1169 from xmo-odoo/8.0-remove-async-db-create-xmo
Remove asynchronous XML-RPC database creation function
2014-07-16 10:29:21 +02:00
xmo-odoo 16d67445da Merge pull request #1076 from xmo-odoo/8.0-shop-fix-xmo
Fix access rights issues in new API for the shop home page
2014-07-16 10:28:51 +02:00
Xavier Morel f98c610310 [FIX] creation of new threads where a new API environment should be initialized
* fix #1149 courtesy of @andreparames
* remove useless threaded yaml import
* openerp.service.server thread spawning get an API environment further down
  the stack
2014-07-15 13:33:38 +02:00
Xavier Morel 29a6dad803 [REM] threaded yaml import (useless and unused) 2014-07-15 13:21:57 +02:00
xmo-odoo 511efddd02 Merge pull request #1160 from xmo-odoo/8.0-custom-models-xmo
Handling of custom models initialisation
2014-07-15 12:40:35 +02:00
Xavier Morel 92be431236 [REM] asynchronous database creation method
It's broken (though easy to fix) and not very useful, if third parties want to
create databases asynchronously they can handle the asynchronicity on the
client-side (an HTTP request is easy to make asynchronously after all) and
call the synchronous `create_database()`.

fixes #1137, after a fashion
2014-07-15 12:26:55 +02:00
Christophe Simonis a5419ca800 [MERGE] forward port of branch saas-5 up to e0759c1 2014-07-15 11:21:59 +02:00
Christophe Simonis e0759c1350 [MERGE] forward port of branch saas-4 up to de696f1 2014-07-15 10:39:08 +02:00
Christophe Simonis de696f14f8 [MERGE] forward port of branch saas-3 up to 24484c8 2014-07-15 10:38:14 +02:00
Christophe Simonis 24484c8bcd [MERGE] forward port of branch 7.0 up to 7a928b1 2014-07-15 10:36:54 +02:00
Xavier Morel b2ddda47e5 [FIX] missing part of initialization in ir.model and ir.model.fields 2014-07-15 08:56:58 +02:00
andreparames 5b932ec98b Merge 8083afe7c3 into 736c5dd87e 2014-07-14 11:55:01 +00:00
Xavier Morel 7a2961da76 [FIX] ensure all g_inner content is correctly encoded
fixes #1130

* provided `inner` data may or may not have been encoded
* `element.text` is either ascii-compatible `str` or `unicode` when
  non-ascii-compatible, which could force the decoding of utf8-encoded content
  during g_inner's join
2014-07-14 13:44:37 +02:00
Xavier Morel 7c540bc4ee [FIX] exception rendering with pretty printed XML
had not been migrated to lxml
2014-07-14 13:44:37 +02:00
André Paramés 8083afe7c3 [FIX] setup Environment for the report thread 2014-07-14 12:41:07 +01:00
Xavier Morel 3491b7de34 [REM] cache setting in _prefetch_field 2014-07-14 10:45:34 +02:00
Thibault Delavallée 7a928b151a [FIX] tools: mail: fixed last commit, solving an issue with the html2plaintext introduced another issue with notes. Reverting to the first version. 2014-07-11 16:21:01 +02:00
Xavier Morel 7d732b1011 [FIX] broken translation cache for absent translation of 'false' 2014-07-11 15:46:12 +02:00
Christophe Simonis 182acc9274 [FIX] base: make ir_attachment._filestore callable with kwargs 2014-07-11 14:58:32 +02:00
Xavier Morel 269a6ee128 [FIX] filtering out of records which shouldn't be fetched/prefetched
A todo would only filter out records selectioned by the same field's caching,
it should filter out on the whole prefetching selection or an other field
could/would just add it back to the set of records to fetch (and lead to Bad
Things).

Note: this probably deserves a test somehow, but I'm not quite sure how the
todos thing works so...
2014-07-11 14:07:05 +02:00
Xavier Morel 785018cc9c [FIX] only prefetch other cached records with read field uncached during _read_from_database
If expansion of the recordset is done during _prefetch_field, if one of the
prefetches (not the base record(s) but one of those selected by
BaseModel._in_cache_without) can't be read by the current user (due to an
access rule or for field reading reasons, or whatever) the whole read is
failed, even if the record which was specifically asked for could be read on
its own.

By only expanding the read set in _read_from_database, the cache is correctly
set but read() and _prefetch_field() only check the records explicitly asked
for for AccessDenied, prefetched records will only be asked if they are ever
accessed.

fixes #1013
2014-07-11 13:54:01 +02:00
Xavier Morel d5eda984c9 [ADD] demonstrate broken handling of rules access denial in new API 2014-07-11 13:54:01 +02:00
Olivier Dony 924e4b1a08 [MERGE] Fwd-port saas-4 up to e31fd6a 2014-07-11 12:00:42 +02:00
Olivier Dony e31fd6a1e1 [MERGE] Fwd-port saas-3 up to a9d2b65 2014-07-11 11:53:07 +02:00
Olivier Dony a9d2b65da5 [MERGE] Fwd-port 7.0 up to 783b9e1 2014-07-11 11:51:06 +02:00
Martin Trigaux 437116f3c4 [FIX] orm: custom m2m with different label
At rev 84e9a67cdf a check to avoid the creation of ir.model.relation for custom modules was added. The condition is not correct as based on the string instead of the field name. We do not have access to column name at this level but the the m2m relation table do start with x_ for custom fields (see __init__ method).
2014-07-11 11:39:32 +02:00
Christophe Simonis f654a7719b [MERGE] forward port of branch saas-5 up to 73d39a0 2014-07-10 22:49:53 +02:00
Christophe Simonis 73d39a0c8c [MERGE] forward port of branch saas-4 up to a361947 2014-07-10 22:12:16 +02:00
Christophe Simonis a361947143 [MERGE] forward port of branch saas-3 up to a35aec2 2014-07-10 22:02:58 +02:00
Christophe Simonis a35aec2a0b [MERGE] forward port of branch 7.0 up to 6e96ffd 2014-07-10 22:02:01 +02:00
Xavier Morel 19c7380951 [FIX] small potential encoding issue in custom models 2014-07-10 17:34:48 +02:00
Anand-Dharampuriya 5cbc611361 [FIX] Solve some mail issues which are currently present in 7.0 2014-07-10 16:29:54 +02:00
Christophe Combelles 0050a3f797 [FIX] #1065 display_name does not display the address 2014-07-10 14:26:38 +03:00
Raphael Collet 836245564a [IMP] models: iterating over record._cache also returns log_access fields 2014-07-09 15:34:51 +02:00
Raphael Collet 643be98fcf [FIX] models: store FailedValue in cache on log_access fields, too
This should fix an issue discovered by tde when reading all fields on a record
on which you don't have access right:
 - _read_from_database() fetches result and store it in cache
 - read() retrieves values from cache, starting with field 'create_date'...
 - ... which is not in cache, so prefetch that field, read it, which goes into
   an infinite loop

The problem is that _read_from_database() finds out that you don't have access
on the record, and stores a FailedValue in cache on all fields... except magic
fields. Fix the problem by storing the FailedValue on all fields but 'id'.
2014-07-09 15:23:15 +02:00
Raphael Collet ba5f0e7ce5 Merge pull request #1018 from odoo-dev/8.0-fix-display-name-rco
[FIX] models: wrong var used in _compute_display_name(), fixes issue #1002
2014-07-09 10:56:55 +02:00
Raphael Collet ca1be04d7a [FIX] models: wrong var used in _compute_display_name(), fixes issue #1002 2014-07-09 10:26:01 +02:00
Xavier Morel 4ac8682b52 [FIX] False module description blows up in docutils
fixes issue 1005
2014-07-09 08:47:37 +02:00
Raphael Collet 9ccdbcaca3 Merge pull request #989 from odoo-dev/8.0-sql-models-rco
[FIX] models, fields: add model dependencies for models backed up by sql views
2014-07-08 16:27:01 +02:00
Martin Trigaux 84e9a67cdf [FIX] orm: better removal of custom m2m fields
orm: do not try to create ir.model.relation for custom m2m as self._module is either empty (for custom models), either the one of the last inheriting module (which is wrong). The field should be removed manually and should not be impacted by the uninstallation of modules. The removal of the relation table can be done when removing manually the custom field (see rev 6af3193).

ir.model: when removing a model, drop the table with the CASCADE instruction. This will remove left constraints from remaining m2m tables.
This means that dropping a table (either manually removing a custom model or uninstalling a module) will not drop the relation table for a custom m2m field. This is not ideal but better than the previous behaviour (which was to fail the DROP TABLE instruction and keep the table with a few columns and unconsistent data).
2014-07-08 15:56:24 +02:00
Raphael Collet 603bde1b1b [IMP] fields: improve code in former commit 2014-07-08 15:52:02 +02:00
Raphael Collet b05cf32b8f [IMP] fields: add missing case for invalidating fields, when path is None 2014-07-08 15:47:44 +02:00
Raphael Collet 34dac62d32 [IMP] models: add an extension mechanism for attribute _depends on models 2014-07-08 14:52:23 +02:00