Commit Graph

8171 Commits

Author SHA1 Message Date
Martin Trigaux 0df7a1ca2f
[FIX] base: decode params_store content
The parameter bin_size=True will display the size of the binary field.

Fixes #12681
2016-07-06 16:24:50 +02:00
Odoo Translation Bot 1986980a51 [I18N] Update translation terms from Transifex 2016-07-03 02:59:06 +02:00
Odoo Translation Bot 3e965ecf58 [I18N] Update translation terms from Transifex 2016-06-26 02:57:50 +02:00
Raphael Collet ff93777099 [FIX] models: inverse several computed fields based on a common computed field
Consider fields G1 and G2 being computed fields with inverse methods that
require the value of a common dependency F, which is also a computed field.
For inversing G1 and G2, their values are put in cache, then their inverse
method is called.  If the inverse method of G1 requires the computation of F,
setting F's value will invalidate both G1 and G2 in cache.  Hence the value of
G2 is lost when invoking its inverse method!

The fix consists in marking G1 and G2 as being computed before invoking their
inverse method, which prevents them from being invalidated by field F.
2016-06-22 14:01:59 +02:00
Odoo Translation Bot 41ec7eec56 [I18N] Update translation terms from Transifex 2016-06-22 07:12:57 +02:00
Christophe Simonis 5b1beec1f2 [FIX] models: commit *before* trying to set NOT NULL constraint
Setting NOT NULL constraints on required fields may fail if there are
any row with unset value for this column.
The ORM handle this case by catching the exception raised and warning
user.

However, not commiting the current transaction before, will rollback
changes made before like setting default values or renaming a column.
2016-06-20 11:53:59 +02:00
Odoo Translation Bot cd369396d9 [I18N] Update translation terms from Transifex 2016-06-19 02:59:13 +02:00
Xavier ALT f02b23006b [FIX] fields: during an onchange(), do not invalidate *2many fields because of their domain
Our usage of domain on fields One2many seems to trigger an obscure behaviour on
onchange.

With the following (simplified) config:

    Message(models.Model):
        _name = 'test_new_api.message'
        important = fields.Boolean('Important')

    Discussion(models.Model):
        _name = 'test_new_api.discussion'
        name = fields.Char('Name')
        important_emails = fields.One2Many('test_new_api.emailmessage', 'discussion',
                                           domain=[('important', '=', True)])

    Email(models.Model):
        _name = 'test_new_api.emailmessage'
        _inherits = {'test_new_api.message': 'message'}

        discussion = fields.Many2one('test_new_api.discussion', 'Discussion')
        message = fields.Many2one('test_new_api.message', 'Message')

Steps:
- We change 'name' on discussion, triggers an `onchange()` call
- we ends up filling cache on virtual record (on secondary fields, we calling
  record.mapped('important_emails.important'))
- we get a cache miss ('important' field not provided, only 'important_emails' ids,
  i.e with no change on existing records)
- we fill the cache, this mark 'important' field as modified
- because of commit 5676d81 and because 'important' is that case is a related (i.e
  computed) field we triggers cache recomputation
- as there is no way to recompute 'important_emails' for virtual record (no real
  ID) we ends up with empty 'important_emails' generating removal of existing records.

=> Finally changing any value for 'test_new_api.discussion' that trigger an onchange
will always reset 'important_emails' to empty

Fixed by Raphael Collet <rco@odoo.com>, and test by Xavier Alt <xal@odoo.com>.
2016-06-17 17:50:25 +02:00
Martin Trigaux de78b1b3da
[FIX] http: force removing the debug in redirection
In case of local_redirect with
* forward_debug=False
* qwery={'debug': True}

the debug mode should be removed.

cf discusion on #12107 and dd4980b0
2016-06-13 15:18:09 +02:00
Odoo Translation Bot 3215a81bab [I18N] Update translation terms from Transifex 2016-06-12 03:06:37 +02:00
Martin Trigaux dd4980b0a8
[FIX] http: keep debug mode in rediction
The parameter forward_debug is used to keep the debug mode during redirection.
Previous code was setting the debug to None which is ignored by werkzeug, making
the option useless.

Closes #12107
2016-06-10 16:51:41 +02:00
Denis Ledoux 950fd97d06 [FIX] fields: translations of the help of inherited fields
This is similar to revision 54140331f3

opw-673716
2016-06-06 11:44:34 +02:00
Odoo Translation Bot eb48b94cea [I18N] Update translation terms from Transifex 2016-06-05 03:01:35 +02:00
Odoo Translation Bot cb70a8ff98 [I18N] Update translation terms from Transifex 2016-05-29 02:58:42 +02:00
Ondřej Kuzník dbdc8e1cef
[FIX] server: Do not listen when --no-xmlrpc is set
This is a fix for f04f409943, which only
prevented the workers from being spawned in Prefork mode, while the
socket was still being bound to - this is a problem when starting a
worker-only server as it cannot coexist with the XMLRPC server on the
same machine.

Closes #1828
2016-05-26 11:01:42 +02:00
Martin Trigaux 0af32f3f84
Revert "[FIX] res.currency: allow duplication"
This reverts commit d780f9476d.

Did not work due to the size=3 on name field that strips the code to the first
three letters only (removing the " (copy)" part).
Copying a currency has a few business cases as the rates are not copied.
As can not increase the size of a field in stable, remove the method that had no
effect.

Fixes #11036
2016-05-23 10:39:15 +02:00
Odoo Translation Bot 95c9036aef [I18N] Update translation terms from Transifex 2016-05-22 02:57:09 +02:00
Christophe Simonis 393c14d31a [MERGE] forward port of branch 7.0 up to f4cb884 2016-05-17 13:16:50 +02:00
Sylvain GARANCHER f4cb884cdc [FIX] base: Add missing return values
The _auto_init method was overriden without keeping the return value of
the super on some models.
This break the new stored computed fields computation at field creation.

Closes #11985
opw-677232
2016-05-17 10:39:54 +02:00
Odoo Translation Bot 8f46a6fe73 [I18N] Update translation terms from Transifex 2016-05-15 02:56:59 +02:00
Christophe Simonis 5e18f5a080 [FIX] tools: correct Burmese locale 2016-05-13 12:53:17 +02:00
Nicolas Seinlet 3a32021122 [IMP] models: mark records as recomputed as soon as they are
When recomputing stored function fields, the `write` may trigger a
cache invalidation which lead to a recompute of all the recordset
values, even the ones already saved in database.
2016-05-12 11:44:57 +02:00
Martin Trigaux e93cf3f3dd
[ADD] tools: Burmese language 2016-05-11 11:42:02 +02:00
Andreas Stauder 9b70650adc
[ADD] tools: Swiss German language
Closes #4722
2016-05-11 11:41:32 +02:00
Olivier Dony ac8b7e90b5 [FIX] http: clear environment/caches on transaction rollback
Backport of 8423a0df3482567b0e2f77852dda14b80a029401

Clear the cache/environment in addition to rolling back
the cursor, in order to retry the transaction with fresh
data, not partially stale data.
2016-05-11 01:01:54 +02:00
Raphael Collet 5676d8121d [FIX] fields: invalidate x2many fields with a domain
Invalidate the cache of a x2many field when any of the fields appearing in its
domain is modified.  Use the invalidation triggers mechanism for that purpose.
2016-05-09 12:10:23 +02:00
Odoo Translation Bot 859fe655d2 [I18N] Update translation terms from Transifex 2016-05-08 02:57:57 +02:00
Olivier Dony a0484cbe45 [FIX] import: broken translation cache for absent translation of 'false'
Backport of 7d732b1011

Fixes #979
2016-05-05 03:39:54 +02:00
Odoo Translation Bot 8651d0815d [I18N] Update translation terms from Transifex 2016-05-01 02:57:51 +02:00
Odoo Translation Bot 534b7c5553 [I18N] Update translation terms from Transifex 2016-05-01 00:28:37 +02:00
Raphael Collet ba5f5614f3 [FIX] expression: fix missing results in direct search on many2many fields
This case corresponds to searches like `[(field, 'ilike', name)]` where `field`
is a many2many field.  The domain processing performs a `name_search` on the
field's comodel, then makes the relation match the returned record ids.

Problem: the call to `name_search` uses the default limit (100), and this makes
the search return less results than expected.  Make the search complete by
forcing `limit=None`.
2016-04-29 15:48:19 +02:00
Raphael Collet c7baab6789 [FIX] expression: fix missing results in direct search on many2many fields
This case corresponds to searches like `[(field, 'ilike', name)]` where `field`
is a many2many field.  The domain processing performs a `name_search` on the
field's comodel, then makes the relation match the returned record ids.

Problem: the call to `name_search` uses the default limit (100), and this makes
the search return less results than expected.  Make the search complete by
forcing `limit=None`.
2016-04-29 15:45:21 +02:00
Raphael Collet 233c7780e6 [FIX] fields: filter result of 2many related fields with related_sudo
When traversing relational fields as superuser, you end up with a recordset for
which only a subset is accessible to the current user.  An earlier fix to this
issue completely dropped the `related_sudo` feature; change its implementation
to keep the feature.
2016-04-28 11:46:44 +02:00
Stefan Rijnhart 0c2f7bdbc2 [FIX] tools: export translated fields not included in _columns
Non-stored new API computed fields are only defined in _fields
but not in _columns, and they were never exported within translation
files.

Closes #9081
2016-04-26 19:12:51 +02:00
Denis Ledoux dc1b8a5a51 [FIX] res_company: some information missed on company creation
On the `res.company` model, the fields
`name`, `phone`, `email`, `website`, `vat` are
related field on the `partner_id` of the company.

When creating a new company, the partner
associated to the company is created automatically,
it's handled in the overrided `create` method
of the model, but it forgots the values
`phone`, `email`, `website`, `vat` at the moment
the partner is being created.

opw-675526
2016-04-25 12:37:06 +02:00
Odoo Translation Bot 0410d1187b [I18N] Update translation terms from Transifex 2016-04-24 02:59:16 +02:00
Raphael Collet 86d276b4bb [FIX] models: fix *2many multi-onchange bug
This fixes the case where the lines of a one2many field are modified several
times by onchange methods: instead of retrieving the most recent updates, we
merge them with former updates.

This solution was written as an improvement of a proposal made by Alexis
Delattre and Sébastien Beau as #11620.
2016-04-22 16:25:11 +02:00
Martin Trigaux fd7a7207ac
[FIX] orm: do not save empty translation as 'false'
When writting a value on a translatable field in a different language than
English, the submitted *raw* value was saved in the database.

This could cause the following issues:
- empty value (provided as `False` by the web client) saved as the string
  'false' in the translations table
- no encoding or sanitization convertion
- ignore size parameter on the translatable field

Process the submitted translation through symbol_set method to clean it before
storing it blindly in the database.

This allows to convert `False` into `''` for empty value and fixes #10862
2016-04-22 16:14:19 +02:00
Denis Ledoux 28e0a1771c [FIX] ir_qweb: regression of 8395f0d217
This revision corrects a regression introduced by
8395f0d217e16df18fcc6f4309fe74b0dd8d50a2:
the possibility to call
`ir.qweb.field.datetime`.`value_to_html` with
a datetime string directly, instead of calling
`ir.qweb.field.datetime`.`record_to_html`
(which call `value_to_html` as well).

opw-675427
2016-04-21 18:35:25 +02:00
Denis Ledoux 8395f0d217 [FIX] website_event: event dates within event timezone
The dates of an event on the website was always
within the user timezone. If not signed in,
it was within the public user timezone
(which is quite not user-friendly to change)

For this purpose, we weed get the context
from the record (the context used when using
`record.with_context`), and therefore
the QWeb field
`ir.qweb.field.datetime` is slightly altered,
to use the context from the record.

opw-675427
2016-04-21 17:52:36 +02:00
Stephen Medina 92f1cbeb6f
[FIX] server: support psutils >= 4.0
In version 3, process.memory_info() returns only rss and vms
In version 4, it now returns rss, vms, shared, text, lib, data and dirty
Automatic unpacking is no longer possible in 4.0

Fixes #11052, Closes #11459
2016-04-20 09:13:27 +02:00
Olivier Dony bf163700e4 [MERGE] Forward-port 7.0 up to 38905d686f 2016-04-11 14:23:02 +02:00
Olivier Dony 38905d686f [FIX] res.partner: relax condition in 3ab436fb7b
Users may sometimes need to edit their own partner records directly,
although indirect access by writing on `res.users` directly works
fine in most cases.
2016-04-11 13:33:49 +02:00
Odoo Translation Bot 05223f558d [I18N] Update translation terms from Transifex 2016-04-10 02:59:08 +02:00
Alexandre Fayolle cc60504bff [FIX] base: only run postinstall tests for installed or updated modules
Uninstalled modules are skipped with the filtering on the state.
Fixes #9768, Closes #11378
2016-04-04 14:32:20 +02:00
Odoo Translation Bot 678a84e626 [I18N] Update translation terms from Transifex 2016-04-03 02:59:02 +02:00
Olivier Dony bf75f51ddb [FIX] base: require wizard for passwd change 2016-04-01 20:30:57 +02:00
Olivier Dony 08b7e5ab63 [FIX] res.users: better compatibility of read() override with new API 2016-04-01 20:30:57 +02:00
Olivier Dony a7c2377500 [FIX] res.partner: modifying users requires extra access 2016-04-01 20:30:56 +02:00
Olivier Dony 97a96bc96b [FIX] base: require wizard for passwd change 2016-04-01 20:28:00 +02:00
Olivier Dony 3ab436fb7b [FIX] res.partner: modifying users requires extra access 2016-04-01 20:16:11 +02:00
Odoo Translation Bot 6aa601da2a [I18N] Update translation terms from Transifex 2016-04-01 00:28:28 +02:00
Christophe Matthieu d3557de746 [FIX] ir.qweb: branding breaks editing/inheritance
Could not edit t-field content if modified by inherit xpath,
and could not inherit qweb views with non "xpath" nodes with
`position="attributes"`.

Examples:
Can't edit: `<data><xpath expr="div[@t-field='object.test']"
position="replace"><div t-field="object.test"/></xpath></data>`

Inherit doesn't work: `<data><h1 position="replace"/><h1
class="test">tata</h1></data>`

Closes #11561
Closes #11547
2016-03-31 18:11:02 +02:00
Odoo Translation Bot 8d9b309f9a [I18N] Update translation terms from Transifex 2016-03-27 03:14:28 +02:00
Odoo Translation Bot f5cc04caa7 [I18N] Update translation terms from Transifex 2016-03-20 02:58:59 +01:00
xmo-odoo c824e50b3f [FIX] scaffold: correctly decode utf8 templates
As its documentation notes[0], Jinja2 only processes unicode template
data (or pure ASCII, which will implicitly decode to unicode).

The scaffolding system would read raw scaffolding data in memory (both
templates and passthrough non-templates), but fail to decode templates
before handing them to Jinja, blowing rendering up if templates
contained non-ascii.

Fix #11331 by always decoding templates from UTF8 before handing them
to jinja. This is backwards-compatible, ascii templates work as they
used to, non-ascii UTF8 templates now work correctly, non-ascii
non-UTF8 templates what are you doing?

[0] http://jinja.pocoo.org/docs/dev/api/#unicode
2016-03-15 11:25:16 +01:00
Odoo Translation Bot 345c83a9d0 [I18N] Update translation terms from Transifex 2016-03-13 02:59:06 +01:00
Jairo Llopis 906bf16a76 [8.0][FIX] Make on_change in address_format divs work
To reproduce the bug:

- Create a partner.
- Set it state "Alaska".
- Country becomes "United States".
- Set a country for YourCompany, such as Spain.
- Create a partner.
- Set it state "Alaska".
- Country remains blank.

Also, `node.xpath("//field")` was running over every `<field>` in the
view, not just those inside the `<div class="address_format">`. Now it
only traverses the right nodes, which renders every affected view
faster.
2016-03-08 13:40:40 +01:00
Nicolas Lempereur 4309bd311f [FIX] base: don't unlink base.open_menu but reset it
The ir.actions.todo record base.open_menu is used to redirect the user
to a menu after installing a module.

To do so, a new module override the record changing its action (toward a
menu) and setting its state to "open".

But with f7fe753 when one such changed action is removed after
uninstalling a module (or removing the action by any other way) the
base.open_menu would also be removed. Thus thereafter the open_menu will
not work anymore (since type "automatic" is lost).

With this commit, when whenever base.open_menu is removed, instead its
action will be replaced by base.action_client_base_menu which is the
original action.

closes #11224
related to: #11216, opw-660269
2016-03-07 14:03:28 +01:00
Odoo Translation Bot aca8a8bebc [I18N] Update translation terms from Transifex 2016-03-06 02:59:52 +01:00
Denis Ledoux 3913667396 [FIX] website: backport of 8d2a3ba12dcec61c7e6afcfd34d00c4167de3baa 2016-03-01 10:53:44 +01:00
Odoo Translation Bot 8c278a4e4a [I18N] Update translation terms from Transifex 2016-03-01 00:29:04 +01:00
Odoo Translation Bot 9f073102ef [I18N] Update translation terms from Transifex 2016-02-28 03:00:41 +01:00
Nicolas Martinelli 68f9f99ed3 [FIX] models: export of booleans
In the case of a `raw_data` export, a boolean which has the value
`False` will not be exported correctly.

The fix handles the `False` value as a valid value for a field.

opw-666142
2016-02-23 15:06:14 +01:00
Odoo Translation Bot 488c693109 [I18N] Update translation terms from Transifex 2016-02-21 02:59:19 +01:00
Odoo Translation Bot f35fd798f1 [I18N] Update translation terms from Transifex 2016-02-14 02:59:46 +01:00
Raphael Collet 5763c32a6d [FIX] addons: fix usage of decorators `api.v7`/`api.v8`
Specifically, when one API implementation calls the other one, it has to call
the method *from the same class*.  Otherwise, overriding the method may result
in an infinite recursion.  Consider:

    class A(Model):
        _name = 'stuff'

        @api.v8
        def foo(self):
            return 42

        @api.v7
        def foo(self, cr, uid, context=None):
            return self.browse(cr, uid, [], context).foo()

    class B(Model):
        _inherit = 'stuff'

        def foo(self, cr, uid, context=None):
            return super(B, self).foo(cr, uid, context=context) + 1

and now call: `env['stuff'].foo()`.  This invokes `B.foo` (new-API), which
calls `B.foo` (old-API), which calls `A.foo` (old-API), which calls `B.foo`
(new-API) instead of `A.foo`!

This issue would not be present if old-API `A.foo` was defined as:

        @api.v7
        def foo(self, cr, uid, context=None):
            return A.foo(self.browse(cr, uid, [], context))
2016-02-09 10:01:43 +01:00
Laurent Mignon d82e489add [FIX] models: use `column._symbol_c` as placeholder for the column value
When generating SQL queries, `column._symbol_c` must be used as placeholder as
for the method 'set' of the column itself.  Otherwise it is not possible to
define specialized columns.
2016-02-09 09:20:17 +01:00
Denis Ledoux ff915dd96e [FIX] import: import new records without xml_ids
This is related to revision 80b373f.

The above revision leads to the inability
to import new records without any `xml_id` set

Technically speaking, this is because
you cannot concatenate `False` with `'_'`, in
`xml_id + '_'`

opw-668962
2016-02-08 16:54:24 +01:00
Odoo Translation Bot 3ff4dae5b0 [I18N] Update translation terms from Transifex 2016-02-07 02:58:52 +01:00
Olivier Dony bc26a49194 [MERGE] Forward-port 7.0 up to 4de3f4c4ba 2016-02-05 15:42:12 +01:00
Cedric Snauwaert 4de3f4c4ba [FIX] expression: fix search for o2m with non existing id
The result of searching on a o2m field for a missing ID was
the whole set of records which do not have any lines in the
o2m fields. This is definitely not the desired behavior,
and could lead to disatrous performance, because the
returned set could be extremely large.

One example of such behavior is for recomputing fields
in the env cache in 8.0+. When a o2m line gets deleted,
it triggers the recompute of any dependent fields.

In order to locate the records to recompute, the ORM
searches for the 'parent' records in the comodel table.
When this operation is done by 2 users concurrently
the o2m line may not exist anymore, and the bug
is triggered: dependent fields are recomputed on a possibly
very large set of records that did not need any recompute!
2016-02-04 17:10:08 +01:00
Raphael Collet a3ec5a35a5 [FIX] fields: in `copy_cache`, add single records to set `todo` 2016-02-04 14:33:53 +01:00
Raphael Collet 0f2e7d783e [FIX] fields: make `copy_cache` use a todo list instead of recursion
The recursion was based on an incorrect assumption: the cache of the target
environment is initially empty.  If another computation left some value there,
the copying is incomplete, and that causes bugs in onchanges.
2016-02-04 13:48:28 +01:00
Olivier Dony 67a63e2cc9 [MERGE] Forward-port 7.0 up to rev. cb609bd425 2016-02-03 16:42:29 +01:00
Olivier Dony cb609bd425 [FIX] tools.misc: log errors when parsing fails 2016-02-03 02:25:09 +01:00
Olivier Dony e8d06f7b20 [MERGE] Forward-port 7.0 up to bdbcbea285 2016-02-03 00:40:27 +01:00
Olivier Dony cc724c2e61 [FIX] base: centralize custom data serialization for builtin types only 2016-02-02 22:42:31 +01:00
Olivier Dony 000c681f1e [FIX] ir.values: remove redundant deduplication logic
Handling update/create of existing values is already
handled by ir.values.set() itself.
2016-02-02 19:49:09 +01:00
Xavier Morel 8848af76f0 [IMP] account: recordset calling conventions for fixed has_group 2016-02-02 18:28:23 +01:00
Xavier Morel ccb0f6db61 [FIX] base: has_group behaviour under the new API
While the signature makes sense in an old API context (sort-of) it's
very easy to misuse in a new API context as one'd expect `has_group` to
use the subject (recordset), not the user in the environment, compounded
by ``env.user`` being browsed as administrator, resulting in the
"obvious" ``env.user.has_group(foo)`` checking if the
administrator (rather than the current user) has the specified group.

Adds a divergent v8 version of has_group which first checks if it's
called on a non-empty recordset, and in that case use the recordset id,
otherwise fallback on the context user (to handle new API conversions
which used the "correct" call convention rather than the obvious one).

fixes #9649
2016-02-02 18:28:23 +01:00
Raphael Collet a688bcdbbd [FIX] fields: make `copy_cache` not invalidate the cache! 2016-02-01 18:01:02 +01:00
Goffin Simon 08b286111c [FIX] models: `MissingError` when writing on recordset with duplicates
When writing on a recordset with duplicates, the ORM raises a `MissingError`
because the rowcount gives a difference with the injected ids.  The fix simply
eliminates duplicates from ids.
2016-02-01 14:56:49 +01:00
Martin Trigaux a46f8bb9c5 [FIX] tools: do not generate translations for exported records
When a record is exported, an external ID, in the form of __export__.<model>_<id>
is created on this record.

When the translations are generated (e.g. "synchronise terms" wizard), the
translations may be duplicated for records that have been exported. If a
translation is submitted before the export (when the record had no external ID
yet), a new empty translation is created as the module differs in the import.

Creating a new translation may be a problem as the new term (equal to the source
term) will be used as the translation value.

Fixes 9480
2016-02-01 14:13:34 +01:00
Odoo Translation Bot 72983cac8e [I18N] Update translation terms from Transifex 2016-02-01 00:29:03 +01:00
xmo-odoo edeb5a8c0f [FIX] module finder path parameter should be optional
According to PEP302, the signature of `Finder.find_module` should be 
`find_module(fullname, path=None)`.

Ever since it was introduced in 64ec5f36df the addons import hook 
defines the second parameter as mandatory, which is an issue for
systems relying on the specified behaviour (and not needing to
provide a path) like the stdlib's `pkgutil.find_loader`.

fixes #10670
2016-01-29 10:20:08 +01:00
Raphael Collet 812332855a [IMP] fields: speedup `Float.convert_to_cache` by not rounding the value 2016-01-29 09:37:27 +01:00
Raphael Collet f0646cb51b [IMP] fields: use a "lazy" cursor to compute attribute `digits`
Borrowing a cursor each time you access `field.digits` may be costly, because
of the connection reset.  Moreover, in most cases, the cursor is not used at
all, since the decimal precision are kept in cache.

For the installation of module `product` with its demo data, the number of
cursor allocations was reduced from ~1500 to about 50!
2016-01-29 09:37:27 +01:00
Raphael Collet 995b257a6c [FIX] fields: make `related_sudo` work for draft records (2)
Traversing new records in a different cache requires that all new records on
the path are copied across caches.  Make the copy across caches recursive when
the first record on the path is a new record.
2016-01-28 16:33:09 +01:00
Yuriy A. Apollov 098c084eae [FIX] orm: iteration on `browse_null` object lasts forever 2016-01-26 17:34:39 +01:00
Holger Brunn 6fd57c2188 [FIX] allow searching for new style function
fields in a search path
2016-01-26 14:15:22 +01:00
Odoo Translation Bot dc48744bf7 [I18N] Update translation terms from Transifex 2016-01-24 03:00:37 +01:00
Raphael Collet 748a719fd9 [FIX] fields: make `related_sudo` work for draft records (used by onchange)
Accessing a related field with `related_sudo=True` on a draft record should
effectively traverse the fields as the admin user.

This fixes #5121, #7138.
2016-01-22 16:06:27 +01:00
Goffin Simon c0571d4066 [FIX] base: by default a company is not a customer
When creating a company, a new partner is created with his field
'customer' = True. But by default a company doesn't have to be
a customer.

opw:667130
2016-01-19 17:02:32 +01:00
Odoo Translation Bot 2efa359e41 [I18N] Update translation terms from Transifex 2016-01-17 03:01:54 +01:00
Raphael Collet b4debe9539 [FIX] test_inherit: wrong model passed to default function on field 2016-01-15 13:54:29 +01:00
Sathors 903cde0522 [IMP] doc: dotted names not supported in @constrains
or in @onchange for that matter. They should already generate a warning,
but only the first time they're used.

This is done lazily because it introspects the instance/class which can
be costly when performed during the repeated setup of registry setup.

closes #5595
2016-01-11 10:59:56 +01:00
Odoo Translation Bot 1c33197828 [I18N] Update translation terms from Transifex 2016-01-10 03:04:15 +01:00
Raphael Collet 152d9de6cf [FIX] fields: in many2many fields, command `5` removes accessible records only 2016-01-08 16:56:02 +01:00
Raphael Collet ece592dbf7 [FIX] fields: in many2many fields, avoid inserting duplicate entries in table 2016-01-08 16:55:43 +01:00