diff options
| author | qsm-odoo <qsm@odoo.com> | 2015-11-26 14:18:39 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2015-11-26 15:57:17 +0100 |
| commit | bbc67ec4024369074aee8ceda2367a719a66fce2 (patch) | |
| tree | 90b99a47f242cc688836960f539bb4a212595f50 /addons/web | |
| parent | 53cb608b178ec7604ce736770320437a6af93488 (diff) | |
[FIX] web: export data according to domain
Some accounting model (i.e. account.tax) are redefining the ORM search
method, but with misordered arguments (placing count as fifth argument
instead of context).
For the export function, this lead to have the "context" variable
associated to the "count" function variable. As "count" is then
considered as True, the method returns the number of records instead
of the list of record ids. This then exported the last record (the
count'th one) instead of all the records that matched the domain.
The solution here is to explicitly give the context variable by name.
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index f0f455be1e3..b2cb698a256 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1408,7 +1408,7 @@ class ExportFormat(object): Model = request.session.model(model) context = dict(request.context or {}, **params.get('context', {})) - ids = ids or Model.search(domain, 0, False, False, context) + ids = ids or Model.search(domain, 0, False, False, context=context) if not request.env[model]._is_an_ordinary_table(): fields = [field for field in fields if field['name'] != 'id'] |
