Commit Graph

7783 Commits

Author SHA1 Message Date
Alejandro Santana 21d3be87b3 [FIX] tools: image size as power of 2
Backport of 6a8f395
Fixes #5677
2015-04-17 14:17:19 +02:00
David Monjoie cd94f10e1d [FIX] base: fixed display of address in IE11
Spiritual backport of 5de677208c
which should have been fixed in 7.0 back then.
2015-04-16 14:27:12 +02:00
Christophe Simonis ba54a668d4 [MERGE] forward port of branch saas-3 up to 2ffbb5f 2015-04-14 12:12:39 +02:00
Christophe Simonis 2ffbb5f93d [MERGE] forward port of branch 7.0 up to d246e36 2015-04-14 11:40:23 +02:00
Christophe Simonis d1031c34ac [FIX] ormcache: correct stat counter usage. 2015-04-13 13:17:23 +02:00
Christophe Combelles 737728a7a0 [FIX] base: import po file with comments only
Do not crash when importing a po file with only comments lines (e.g.
autogenerated files)
Fixes #4887
2015-04-13 11:38:42 +02:00
Christophe Simonis d3e7a8ef5e [MERGE] forward port of branch 7.0 up to 856bc6f 2015-04-10 18:24:46 +02:00
Olivier Dony 856bc6f2b1 [FIX] apply same visibility rules as base 2015-04-10 17:15:50 +02:00
Olivier Dony 8d750ecdc8 [FIX] apply same visibility rules as base 2015-04-10 17:14:59 +02:00
Olivier Dony 56c95d2843 [FIX] report_sxw: setLang() should discard browse_record cache
`setLang` alters the "browse" context of the documents
being printed, but it must also discard any values
already cached, as they could be using a different language.
This is the case when the report uses translatable fields
on `res.partner`, because `setLang` is usually called
with the target partner language, hence prefetching
the translatable fields with the user's language instead
of the partner's language.

E.g. `setLang(o.partner_id.lang)` will cache any
translatable field on `o.partner_id` in the language of
the *user*, not the *partner*.
2015-04-07 18:33:49 +02:00
Ravi Gohil ffacce7140 [FIX] orm: export on empty one2many
When exporting the content of a one2many, if the first row got an empty value,
it was filled with the name_get of all lines and skipped the next lines.
The guessed reason of this was for the representation of the m2m lines but was
left after a proper export of m2m has been implemented (91cafbe).
This code was problematic as it prevented to properly export records with
an empty value on the first line (e.g. credit amount on account.move.line).
Fixes #4218, opw 620178
2015-04-07 15:54:01 +02:00
Christophe Simonis b5e1e14c5d [MERGE] forward port of branch saas-3 up to 59d82e6 2015-04-07 14:08:15 +02:00
Christophe Simonis 59d82e6fe7 [MERGE] forward port of branch 7.0 up to 5042d91 2015-04-07 13:36:01 +02:00
Christophe Simonis 5042d91330 [FIX] base: translation update
When updating translations, the source (`src`) is irrelevant for
`field` and `help` translations. Theses translation types are only
matched through their `name`.
2015-04-07 12:37:11 +02:00
Nicolas Lempereur bbeca2ddb3 [FIX] web: encoding css on multi page
In the small cases where utf-8 is not escaped in the CSS of a module*, an error
could happen when breaking minified CSS on multiple page (for IE9).

For the issue #5050

*currenlty for 8.0 : https://gist.github.com/nle-odoo/e353b22f89031ced21a5
2015-04-07 11:15:40 +02:00
Nicolas Lempereur b8b8329044 Revert "[FIX] web: set_cache want unicode when caching css"
This reverts commit e75e2ce2e5.
2015-04-07 10:55:24 +02:00
Nicolas Lempereur e75e2ce2e5 [FIX] web: set_cache want unicode when caching css 2015-04-07 10:29:33 +02:00
Nicolas Lempereur 37959d45f3 [FIX] qweb: css minified in multiple page for IE
On internet explorer 6, 7, 8 and 9, the limit of CSS rules in a stylesheet is
4095 (http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/10164546.aspx).

This commit breaks down a CSS bundle in several pages for these IE versions.

To do this, the CSS tag added is of the kind : /web/css.0/{xmlid}/{version} in
which there is:

- the whole CSS if there is no more than one page,
- a list of @import pointing to the multiple pages.

note: if a modification lowers the number of page, an old page may stay in
ir_attachment (e.g: go from 4 to 3 pages, the old 4th page of another version
will not be deleted untill the number goes again up to 4).

Note: the method css(self) previously returned an unicode variable (the first
time) or an str variable (the following times, if already cached), the fix
also correct this so an str variable is always returned.

fixes #5050

opw-627116
2015-04-07 09:56:44 +02:00
Christophe Simonis 3171fd472e [FIX] core: correct LRU cleaning
Do not change dictionary size since during iteration
2015-04-03 16:33:18 +02:00
Christophe Simonis 14fd77c132 [FIX] core: ormcache is now per regisry.
A cross-registry cache was introduced by e2ea691ce.
The initial idea was praiseworthy but sub-optimal for servers with a
lot of registries.
When there is lot of registry loaded, the cache size was huge and
clearing some entries took a lot of CPU time, increasing the chances
of timeout.

Also, the cache was not cleaned when a registry is removed from
registry LRU (this operation would also consume time).
2015-04-03 16:11:57 +02:00
Christophe Combelles 3d11e6fae3 [FIX] ir_mail_server: _get_default_bounce_address
fails due to ir.config_parameter permission

At rev. 80017b04c2
ir.config_parameter model has been restricted to employees

Getting parameter from this model should therefore
be done as SUPERUSER_ID where the uid could
be a user which is not an employee.

Closes #5280
2015-04-03 12:54:25 +02:00
Denis Ledoux eaad70daac [FIX] ir_attachment: upload of attachment for non-employees
This rev. is related to eb9113c04d

if a model or a resource id is not defined on an attachment
restrict access to employees only if the creator
of this attachment is not the current user.

So non-employees can access their attachments without
models/resource id, which includes attachment of
discussions threads.

Fixes #4309
Closes #4310
2015-04-03 12:44:44 +02:00
Raphael Collet 9a365e83e7 [FIX] models: do not prefetch fields while the model schema is created
The following case has shown the issue: extend the model `res.company` by
adding at least two fields F and G, where F has a default value defined as:

    lambda self: self.env.user.company_id.name

If the column F is created before G in the database, the existing records will
be filled with the default value of F.  When the default value is computed, the
field `name` from a `res.company` is read, and other fields are prefetched,
including G.  This operation fails, because G does not exist in database yet!
2015-04-02 16:54:39 +02:00
Christophe Simonis ad55981b4b [IMP] base: url redirection through attachments
Special case for binary attachments with an url, when there is no data
to serve. If the attachment name is an url, redirect to this url,
otherwise return a 204 HTTP error.
2015-04-02 16:00:34 +02:00
Samus CTO 27d1199e90 [FIX] db manager: do not use registry to backup a database
Do not load registry to backup a database. This is
allows backing up databases whose registry cannot
be instantiated at the moment (wrong version, missing
modules, etc.)

Closes #5775
2015-04-02 10:10:04 +02:00
Denis Ledoux 90f998da0b [FIX] *: alias help message
When going to logged calls through opportunities,
and no logged calls were listed,
the mail alias of opportunities was displayed
within the placeholder help message,
wrongly, as we were in the logged calls list.

This was due to a context propagation, due
to have defined empty_list_help_* keys within
window actions. It was the case in several
modules.

Besides, we do not find the usefulness of the
custom_context passed to the get_empty_list_help
method: indeed, none of the methods get_empty_list_help
overriden in modules need any other keys than
'default_type', which do not require an evaluated
context.

We therefore remove the whole code regarding this
custom_context, and we therefore get rid of this
useless context evaluation thing within one of
the most accessed method of the web client.

opw-630673
2015-04-01 10:52:37 +02:00
Nicolas Lempereur 10c6fe4a6c [FIX] mail: make read more term translatable
opw-631860
2015-03-31 12:16:33 +02:00
Raphael Collet f2930c548e [IMP] ir_translation: improve usage of `ormcache` by method `_get_source`
Convert the arguments to avoid a cache error when the method is called with a
list of ids.
2015-03-31 10:12:14 +02:00
Olivier Dony f87570e83f [FIX] base: no cache for ir.attachment._filestore, restore context
Due to a compatibility problem between the new API
implementation and the @ormcache decorator, the
context parameter of ir.attachment._filestore()
was dropped at rev. 0beb14f0d2

However the need for caching this method has
disappeared in Odoo 8 (it used to require a
DB query). So it is even better to drop the
@ormcache decorator altogether, and keep the
context parameter.
This avoids a useless change of method signature,
even if that was on a private method.
2015-03-30 18:37:31 +02:00
Robert Rübner ff902f62e2 [FIX] base: update of source value in translation
Make sure pass a list of ids instead of a single id to write calls.
Some models (e.g. blog.post, fixed at 12fc5ea) are assuming that it got a list
of ids and is not checking the type.
Always pass a list of ids as it's the expected format for the orm.
2015-03-27 16:39:26 +01:00
Jos De Graeve 7e7ecf36f1 [FIX] service: error database in use on duplicate database
When trying to duplicate a database, while
having opened connections to it, postgresql throws

```
OperationalError: source database "duplicate_test"
is being accessed by other users
DETAIL:  There is 1 other session using the database.
```

Connections must be dropped before trying duplication
using TEMPLATE to avoid this.
2015-03-27 16:16:02 +01:00
Christophe Simonis d780014248 [MERGE] forward port of branch saas-3 up to ce69064 2015-03-26 18:00:06 +01:00
Christophe Simonis ce690649e9 [MERGE] forward port of branch 7.0 up to 2a0c018 2015-03-26 17:56:05 +01:00
FalcoBolger 95b921d0f7 [FIX] website: move support for ir.attachment resources to web module
Commit 540b753bf8 introduced
support for resources stored as ir.attachment records in
asset bundles too.
This is specifically useful for customizations.

However the HTTP route for reaching those resources
when they are *not* in a bundle was originally created
in the `website` module (as a special handling for
404 requests)

This means that these dynamic resources would only
be partially supported when `website` is not installed,
causing various problems:
 - missing resources in debug mode where bundles are skipped
 - errors when trying to define new client-side Qweb templates
   via XML resources - which are loaded with a direct request
 - ...

This commit moves back the supporting code to the web module.

The `mimetype` column is not present in ir.attachment without
the `website` module, but sniffing it based on the attachment
name works fine at serving time too.

Closes #6002
2015-03-26 17:33:19 +01:00
Raphael Collet c58121e8f1 [FIX] method `ir_model.check` now decorated with `ormcache_context`
The method needs the `context` parameter to translate the error message in case
the access is denied and an exception is raised.
2015-03-26 17:14:42 +01:00
Raphael Collet 0beb14f0d2 [FIX] ormcache: fix calls to `ormcache` with unexpected context parameter
The implementation of `ormcache` does not work on methods that take a `context`
parameter.  Because of the decorator `decorator`, the arguments of the call are
passed positionally to the method `ormcache.lookup`, and positional arguments
are used in the cache key.

The fix consists in removing the `context` parameter from the faulty methods,
either directly, or by caching a private method called by the public method.
2015-03-26 16:42:10 +01:00
Goffin Simon d79a1622bb [FIX] base: ir_filters: filters not in the language of the user
the context of the user must be used in get_filters to take into account
the language of the user.

opw:630057
2015-03-26 13:18:19 +01:00
Christophe Simonis 3540ec53e4 [MERGE] forward port of branch saas-3 up to 6b70b80 2015-03-25 18:00:08 +01:00
Christophe Simonis 6b70b80a0e [MERGE] forward port of branch 7.0 up to 881c10b 2015-03-25 17:41:53 +01:00
Denis Ledoux a93ef48a70 [FIX] base: access to preferences menu for portal users
Since revs 53582c2ea6 & f65c913027,
this was no more possible for portal users to read groups
on purpose, for privacy reasons.

fields_get of res.users model is overriden, for
the access rights form view features
(The groups selections and checkboxes).
At each call to fields_get, which happens at each call
to fields_view_get on the res.users model, operations are
done on the model res.groups (basically, to
build the selection groups and checkboxes). So,
each time a view of model res.users is displayed,
whatever the view, operations on res.group model were performed.

The thing is, these operations on res.groups
are actually needed only for the user access rights
view, or at least only for users having the group
Administration > Access rights. These group operations
aren't needed for the preferences view, nor for portal users.

We therefore avoid to do these if the user is not part of the
Administration > Access rights group, which lead to
performances improvment, and solves the fact
portal users couldn't access their user preferences view.

opw-627391
2015-03-24 18:25:13 +01:00
Raphael Collet 5aa23f8280 [IMP] ormcache: compute hit/miss/err statistics per database
In ormcache, those statistic numbers were counted per cached method for all
registries.  We introduce separate statistic counters, and create a counter per
(database, model, method).  The existing attributes that are no longer used
have been removed.
2015-03-23 14:36:15 +01:00
Raphael Collet 68969c9716 [IMP] fields: avoid redundant slot in class many2one 2015-03-23 14:36:15 +01:00
Raphael Collet c0d79a78f0 [IMP] fields: rename methods to avoid collisions with `__slots__` names 2015-03-23 14:36:15 +01:00
Raphael Collet 524bb0a520 [IMP] fields: simplify the definition of `__slots__` via the `Field` metaclass 2015-03-23 14:36:15 +01:00
Raphael Collet b156c2e27e [IMP] registry: adapt LRU sizes for registries and ormcache
The registry size is now assumed to be around 10Mb, and ormcache size is
proportional to the maximum number of registries.  Statistics about ormcache
usage is shown to the log when receiving signal SIGUSR1.
2015-03-23 14:36:15 +01:00
Raphael Collet 93c341a52c [IMP] models: avoid using `map` instead of a `for` loop (thanks chs@odoo.com) 2015-03-23 14:36:15 +01:00
Raphael Collet f93a14e3b2 [IMP] fields: remove comments about `_all_columns`, and improve its docstring 2015-03-23 14:36:15 +01:00
Raphael Collet 1df3467888 [IMP] fields: remove unnecessary code
In `__getattr__`, remove the test on accessing `_attrs`.  This situation should
never happen, since the attribute `_attrs` is set in method `__init__()`.
2015-03-23 14:36:15 +01:00
Raphael Collet 4259fe0072 [IMP] openerp/osv/fields: add `__slots__` on all column classes
Use the same technique as for field classes.
This saves about 1.6Mb of memory per registry.
2015-03-23 14:36:15 +01:00
Raphael Collet e7928e1265 [IMP] fields: add `__slots__` on all fields
Introduce slots on all field classes for common attributes; slots take much
less memory than a `__dict__`.  The other attributes are stored in a dictionary
`_attrs`; all fields with an empty value for `_attrs` (common case) share the
same empty dictionary.  This saves quite some memory (around 4.5Mb per
registry), given the number of field instances created for a registry.

Another mechanism is used for the default values of attributes, since slots
cannot be assigned on classes.
2015-03-23 14:36:15 +01:00
Raphael Collet 915af86a91 [IMP] fields: simplify definition of ID field 2015-03-23 14:36:15 +01:00
Raphael Collet ffa7f28d34 [IMP] fields: reduce memory footprint of list/set field attributes
The optimization consists in using tuples for attributes `inverse_fields`,
`computed_fields` and `_triggers`, and to let them share their value when it is
empty, which is common.  This saves around 1.8Mb per registry.
2015-03-23 14:36:15 +01:00
Raphael Collet 3df7754087 [IMP] fields: reduce memory footprint of `field._attrs` and `column._args`
The optimization consists in sharing the dictionary when it is empty, which is
the common case.  This saves around 1.5Mb per registry.
2015-03-23 14:36:15 +01:00
Raphael Collet 4d232969a3 [IMP] fields: remove attribute `_free_attrs` and use `_attrs` instead
This saves about 400Kb per registry by not allocating those lists, which are in
most cases empty.  The removal of the attribute will also simplify a bit the
management of free attributes.
2015-03-23 14:36:15 +01:00
Raphael Collet 9aad3d873b [IMP] fields: turn field.digits and column.digits into dynamic properties
The computed value of parameter digits is no longer stored into fields and
columns; instead the value is recomputed everytime it is needed.  Note that
performance is not an issue, since the method `get_precision` of model
'decimal.precision' is cached by the orm.  This simplifies the management of
digits on fields and saves about 300Kb per registry.
2015-03-23 14:36:15 +01:00
Raphael Collet bf703fd9a3 [FIX] models: reorder the base classes of models following an equivalent class hierarchy
Sometimes, the expected mro of the model is not the same as the one built with
a binary class hierarchy.  So we reorder the base classes in order to match the
equivalent binary class hierarchy.  This also fixes the cases where duplicates
appear in base classes.
2015-03-23 14:36:14 +01:00
Raphael Collet 9bce04de79 [IMP] models: build a flat hierarchy of classes for models
Instead of composing classes in a binary tree hierarchy, we make one class that
inherits from all its base classes.  This avoids keeping intermediate data
structures for columns, inherits, constraints, etc.  This saves about 600Kb per
registry.
2015-03-23 14:36:14 +01:00
Raphael Collet 0f9b452c33 [IMP] models: convert deprecated model._all_columns into a dynamic property
The mappings model._all_columns takes quite some memory (around 2MB per
registry) because of the numerous dictionaries (one per model) and inefficient
memory storage of column_info.  Since it is deprecated and almost no longer
used, it can be computed on demand.
2015-03-23 14:36:14 +01:00
Raphael Collet e2ea691cef [IMP] ormcache: turn it into a global LRU cache shared among registries
The ormcache is now shared among registries.  The cached methods use keys like
(DBNAME, MODELNAME, METHOD, args...).  This allows registries with high load to
use more cache than other registries.
2015-03-23 14:36:14 +01:00
Dharmraj Jhala 01f2c5c9d2 [IMP] Allow custom ordering of files contained in zip dumps
This will allow to speed up our migration platform: as funzip can pipe
the output of the first file of the archive, even if the file is not
fully unzipped yet. This is useful to plays with dump.sql without waiting
for the full archive decompression.
2015-03-18 14:22:22 +01:00
Olivier Dony d93148240b [FIX] ir.model.data: update_dummy should mark `inherits` parents too
When a `noupdate` record is processed during an update,
the update_dummy method marks the record as "seen" so
it won't be deleted at the garbage collection step,
and seen as an obsolete external ID.

This needs to be done also for the parent records via
_inherits, because they have also received an implicit
external ID at creation, and must not be garbage
collected, even if their `noupdate` flag (db side)
is not set because the flag was added later.

This rare problem could be reproduced by creating a product
in a module, then referencing it in e.g. a sales order,
then updating the module after changing the product
record to be in a `noupdate` block.
At the end of the update the implicit product.template
record would be garbage collected, and trigger a cascade
deletion of its children - blocked by the SO reference
to the product.
2015-03-18 14:10:18 +01:00
Christophe Simonis e27744df0c [MERGE] forward port of branch saas-3 up to b79f64f 2015-03-18 13:16:23 +01:00
Christophe Simonis b79f64f1f8 [MERGE] forward port of branch 7.0 up to e1daaff 2015-03-18 12:52:33 +01:00
Raphael Collet 6aa28a89bb [FIX] models: compute many2many field on existing records when field is introduced by an update 2015-03-18 09:43:45 +01:00
Raphael Collet e182da22f4 [FIX] base/ir_model: upon custom field creation, always clear manual fields in registry
The invalidation in registry was done only if the field's model was already in
registry.  This situation is not the case when you create a custom model with a
custom field.
2015-03-17 11:51:22 +01:00
Raphael Collet 7ac4639a24 [FIX] fields: fix determination of `field.selection` for custom fields
In the case of custom fields, `field.selection` is set directly instead of
being set in overridden fields.
2015-03-16 15:34:16 +01:00
Thomas Groutars 7e0ff24cca [FIX] base: delete cascade value mapping on server action deletion
When deleting a server action, its fields_lines were not deleted.
It causes an issue for example in this case:

Create a new custom field on any model
Create a server action with
Action To Do: Write on a Record
Base model: model of the custom field
Add a line in the value mapping,
using the custom field you just created

Delete the server action

Delete the custom field => Throws an error because
required field col1 is not defined
on the ir_server_object_lines object
2015-03-13 11:25:08 +01:00
Fabien Pinckaers 4491c20bf0 Merge pull request #5728 from apertoso/8.0_fix_nl_BE_naming
[FIX] nl_BE language name
2015-03-12 15:28:07 -07:00
Thomas Groutars 3923f4051d [FIX] models: propagate context in action returned by get_formview_action
When opening a record from a many2one,
the context is not propagated to fields_view_get.
This is a problem if you set "form_view_ref" in the context for example.

opw-629628
2015-03-12 15:13:44 +01:00
Jos De Graeve 170674f994 Fix nl_BE language name 2015-03-12 15:08:10 +01:00
Nicolas Martinelli 2275af4b77 [FIX] base: ir sequence number is now reset to the requested value when calling the write method
opw: 626974
2015-03-11 11:35:25 +01:00
Julien Laloux a20545a936 [IMP] web: add no update info on metadata view (debug mode) 2015-03-11 11:10:42 +01:00
Olivier Dony edcbf067d6 [FIX] workflow.workitem: deleting a subflow should never cascade to workitems
It's always dangerous because (cascade-)deleting workitems
has a great chance of killing the workflow instances they
belong to, putting the records in the workflow limbo
permanently. (They will appear stuck as they don't have
enough workitems anymore)

In addition, in some rare cases a subflow activity is
converted into a regular activity during an update, and
nullifying the `subflow_id` column is all there is to
fixing the corresponding workitems. It will simply take
them out of their subflow, and back into the main flow.

This is the case for the modification of the purchase.order
workflow in Odoo 8 (saas-5), for the picking subflow.
2015-03-10 19:35:23 +01:00
Olivier Dony 13476c844d [FIX] fields.html, forum: opt-in stripping of @style attrs
For public-facing HTML content provided by the user,
`<style>` tags and `style` attributes should be stripped
automatically, as they can easily be abused to deface
pages for abusive users and spammers.
<style> tags were already stripped, the optional `strip_style`
for fields.html enables the automatic stripping of style
attributes.

This is opt-in because custom style attributes are still
desirable in trusted HTML fields.
2015-03-09 14:41:14 +01:00
Christophe Simonis 416f0246ac [MERGE] forward port of branch saas-3 up to 4a3c471 2015-03-09 12:03:22 +01:00
Christophe Simonis 4a3c4713e9 [MERGE] forward port of branch 7.0 up to 209ce6f 2015-03-09 11:24:32 +01:00
Christophe Simonis 7bfd56d9c6 [FIX] base: correct test
Bad things happen when you write your code for master and
commit it in 8.0 without testing...
2015-03-04 13:38:36 +01:00
Christophe Simonis d6998061f1 [FIX] base: correct custom views validation.
As custom views validation is done while `self.pool._init` is set,
filter on currently loaded modules was still applied.
As a side effect, only one custom view per base view was validated.
In case this view is depending on another custom inherited view, the
validation failed.
Now force loading all views when validating custom views.
2015-03-04 12:49:06 +01:00
Christophe Simonis 325de62f51 [FIX] base: correct inheritance application
While `apply_inheritance_specs` apply most of its changes inplace, it may
completely replace the `arch_tree` if the root node is replaced.
This new root node wasn't used for `primary` views that inherit from
another.
2015-03-04 12:43:22 +01:00
Stefan Rijnhart 4781deb5b6 [FIX] base: Replace unreliable reference count through ORM by SQL
When the ORM is cleaning up related attachments upon record deletion, the
search() method hides the attachment of the record that is being deleted.
If the same file is used exactly once in another attachment, the reference
count will be 1 and the file will be deleted.
2015-03-04 11:23:44 +01:00
Xavier Morel 603c03799d [FIX] ir.qweb: ensure attributes are generated encoded
closes #2856, closes #4182
2015-03-03 17:04:20 +01:00
Raphael Collet 983dcf193c [FIX] fields: make base_field recursive in case a field is inherits'ed across several models 2015-03-03 13:18:04 +01:00
Raphael Collet 04ba0e99a4 [IMP] models: in _read_from_database(), fetch inherited fields when possible
This should improve the performance of method read() on models with inherited
fields, like product.product.  The inherited fields that are stored as columns
in parent tables (except for translated fields) are read in the same query as
the fields of the model.  Those fields will be directly stored in cache under
the main model, so that no copying will take place in cache for accessing them
(this is the default implementation of inherited fields).
2015-03-03 13:18:04 +01:00
Raphael Collet 2c261a2987 [IMP] models: in _read_from_database(), use the Query object to build the query
This makes the query construction more robust, as it handles joins for
conditions and ORDER BY clauses.  It also makes it easier to read() from
several tables (like inherited fields).
2015-03-03 13:18:04 +01:00
Raphael Collet 021c1a26c5 [IMP] fields: improve performance when reading many2one fields on records
Improve the performance of `name_get()` on many2one field values by making sure
that the records on which `name_get` is invoked are prefetched in cache.  This
is not automatic, because `name_get` is invoked on records in another
environment (sudo mode): the prefetching in the original environment should be
reproduced in the other environment.
2015-03-03 09:38:36 +01:00
FalcoBolger 714fe9135d [FIX] Signature on overriden fields_get method 2015-03-02 16:52:53 +01:00
David Monjoie 71e4d7145b [FIX] Scaffolding: moved two files to better reflect the architecture we currently use for our themes 2015-03-02 16:38:35 +01:00
Aaron Bohy 9ebfa11b8c [FIX] Packaging, Scaffolding: template files extension
Add .template as extension of the template files because RPM packaging
produces an error when trying to compile the python template files,
which contains Jinja instructions.

Include *.template files in MANIFEST.in to package them.
2015-03-02 16:38:34 +01:00
Holger Brunn 323233dd02 [FIX] ir_filters: return _auto_init's result
Closes #5204
2015-03-01 03:06:03 +01:00
Ravi Gohil 04de292885 [FIX] http: support old version of psutil
Add support for older versions of psutil (<1.2.0). Only used when
debug_rpc is enabled.

Closes #5108, #5163
2015-03-01 02:17:04 +01:00
Samus CTO fb285d8695 [FIX] prevent unneeded chmod datadir, but check writable 2015-02-27 17:16:16 +01:00
Christophe Simonis e6396deb4e [IMP] models: log source when "Comparing apples and oranges" 2015-02-27 15:57:13 +01:00
Xavier Morel 4bd2ee1aaa [FIX] undefined variable
Variable was added to an error message, then inlined in only one of the
two callsites. Undefined variable error would only appear when an error
is triggered in the actual (postgres-level) backup call.

inserted in ec9a543

fixes #5241
2015-02-27 15:07:15 +01:00
Xavier Morel 68f14c6870 [FIX] handling of big fields in CSV
fixes #2742
2015-02-27 14:11:21 +01:00
Christophe Simonis f0dc416871 [FIX] phantomjs 2.0 compatibility
phantomjs 2.0 remove the deprecated attribute `phantom.args`. Use the
new `system` module.
2015-02-26 15:08:17 +01:00
Raphael Collet 0c1b95d824 Merge pull request #5439 from guewen/test-inherits-3-levels
Reload fields of parent inherits, fixes #5398
2015-02-26 10:06:31 +01:00
Goffin Simon cbb51610ee [FIX] ir.ui.view: qweb translations: allow looking up translation in parent template
- Translations lookup normally uses the namespace of the current
QWeb template, after merging all inherited views.
But when a QWeb template is "cloned" by a child view using
inheritance with `primary` mode, the translations are more
likely to exist for the original (parent) template, and would not
be found when using only the "child" namespace.
This patch adds support for looking up each translation
also in the parent namespace in this case, if none was found
for the child template in the first place.

- ir.translation's _get_source() now supports a list of res_id
to search for, in addition to a single res_id

- Also moved the logic of routes /website/customize_template_get
and /website/get_view_translations to the ir.ui.view model where
it belongs.

opw: 615241

Closes #5325
2015-02-24 14:01:34 +01:00
David Monjoie 46186f54eb [FIX] openerp: fixed stretching of module icons in kanban view 2015-02-24 13:45:23 +01:00
Guewen Baconnier 608e58cce1 Reload fields of parent inherits, fixes #5398 2015-02-24 10:34:09 +01:00
Jeremy Kersten 0c964f0b7b [TYPO] modules: better safe than sorry
Too many people copy-past this line without understand !
2015-02-23 20:15:57 +01:00