Commit Graph

5032 Commits

Author SHA1 Message Date
Jonathan Nemry (ACSONE) 1bc2608490 [FIX] base: add missing context
Propagates context when calling method 'attributes' of ir_qweb
Closes #7582
2015-07-14 11:08:20 +02:00
Odoo Translation Bot 99a7d530e0 [I18N] Update translation terms from Transifex 2015-07-12 01:51:44 +02:00
Christophe Simonis 6e73a31146 [FIX] base: ir.qweb: fault tolerant save of assets.
Do not fail if an asset cannot be cached into the database.
2015-07-10 16:10:59 +02:00
Dariusz Żbikowski 0f4399bb7b [FIX] res.country: address format in polan
Address format in Poland looks like:

Legionów 93
91-072 Lodz
Poland

see: http://en.wikipedia.org/wiki/Address_%28geography%29#Poland

Closes #2416
2015-07-10 11:37:34 +02:00
David Beal d780f9476d [FIX] res.currency: allow duplication
Currencies must be unique per company.
Therefore, without this revision, adding `(Copy)`
to the currency name on duplication, this
is simply not possible to duplicate a currency.

Closes #2443
2015-07-09 17:15:30 +02:00
Nicolas Martinelli f3e4d0a2e8 [FIX] openerp: export None instead of False in raw_data mode
If we export False or an empty string, the Excel export will consider the field
similarly to a boolean, and en empty value will be converted into "=False()" in
Excel. To prevent this, we return "None" in the following cases:

- String
- Date
- Datetime
- Selection
- Reference
- Many2one
- RelationalMulti

Introduced by 6243d18

opw-643966
2015-07-09 11:49:04 +02:00
Denis Ledoux f86d5870fc [FIX] res.country: Preferred address format
According to the USPS, separating the city name
and the zip code with a comma is acceptable,
but the preferred format omits the comma.

http://pe.usps.gov/cpim/ftp/pubs/Pub28/pub28.pdf

opw-644000
2015-07-08 11:13:46 +02:00
Nicolas Lempereur e33baecfa3 [FIX] osv: binary size already in human format
In version 8.0, postgresql's pg_size_pretty function is used
(http://www.postgresql.org/docs/9.4/static/functions-admin.html) when
getting the size of a binary field when reading if `bin_size`
or `bin_size_[col_name]` is set in the context.

So in 8.0 the size of a binary field get units bytes, kB, MB, GB and TB
which was not taken into account. e.g: '5.3 GB'.

This fix uses the size of the string to choose to differenciate the two.

e.g: '10000 bytes' (the longest size) will be returned directly, but
for something longer the human size of the content length will be
returned.

There is a corner case if a file is shorter than 12 bytes but
it is an enough of a small scenario with small implications that it is
deemed acceptable.

closes #7485
opw-644085
2015-07-07 19:17:43 +02:00
Christophe Simonis acc7d20ea9 [MERGE] forward port of branch saas-3 up to ac865c8 2015-07-07 15:12:41 +02:00
Christophe Simonis ac865c8a78 [MERGE] forward port of branch 7.0 up to 9fa7624 2015-07-07 13:58:35 +02:00
Nicolas Lempereur 0920c2fae0 [FIX] web: sort tree view by id
Previously, if the ID column was displayed it was not sortable.

The particular case added 247c1972 is no longer needed with the new api,
id is in the list of existing fields (see xmo comment in #7461).

closes #7487, closes #7461
fixes #7459
opw-644009
2015-07-07 12:32:38 +02:00
Samus CTO 6490c62e5d [FIX] mail: backport of rev 752a07c to 8.0
[FIX] res.partner.find_or_create() should match using =like

Otherwise john@connor.com may match sarah.john@connor.com
2015-07-07 08:52:44 +02:00
Odoo Translation Bot fe3835faff [I18N] Update translation terms from Transifex 2015-07-05 01:52:32 +02:00
Frédéric van der Essen fdb9aa29bf [FIX] base: verifying python external dependencies was failing on OSX. 2015-07-03 13:55:52 +02:00
Jeremy Kersten f07be4b675 [REF] base, wesbite_crm: remove placeholder for phone
Some people visiting website doesn't understand that it's a
placeholder and call to Odoo because they see the number on the website.
2015-07-02 15:53:36 +02:00
Matthieu Dietrich f2c807d99d [IMP] account_report_company: performance on partner name_search
The field display_name is present in account_report_company but not in base
on the res.partner (has been added in v8 in base).
Create a hook method to keep using the slow CASE in base and switch to the
faster display_name when installing account_report_company.
2015-07-02 14:10:23 +02:00
Denis Ledoux 49cc4b9d4e [FIX] base: typoe, referencable -> referenceable 2015-07-02 12:59:36 +02:00
andreparames dae0d407c0 [ADD] base: LGPL as possible module license
Keeping in mind than the AGPLv3 core still propagates the license to other
modules.
Fixes #6914
2015-07-02 11:50:40 +02:00
Antonio Espinosa c65fe46569 [FIX] base: runtime error in address_get if ids is empty
Closes #7359
2015-07-02 11:23:34 +02:00
Martin Trigaux 2758aaa6f8 [IMP] models: sanitize error messages in import
Revert 83282f2d for a cleaner sanitizing earlier in the generation of the error
message.

If the import is failing, the error message contains the value that is
problematic. Escape this value in case it contains '%'
2015-07-01 17:04:48 +02:00
Odoo Translation Bot 2326bb7a54 [I18N] Update translation terms from Transifex 2015-07-01 10:45:16 +02:00
Nicolas Lempereur 45faa3a941 [FIX] base: fixing fix, attachment file size and None
In commit 44f2c8d54 we unified the return value of the function to int,
but it seems the returned size could be None which is not a valid input
of the int() built-in function.
2015-07-01 10:12:24 +02:00
Odoo Translation Bot acc1b525fa [I18N] Update translation terms from Transifex 2015-06-29 08:42:08 +02:00
Xavier Morel d1a19bcb7f [IMP] base: performances of view._check_xml
View validation accounts for a fair cost of module installation, most of
that is spent checking for view validity, and a significant fraction
of *that* is spent reading the validated view from the DB.

Turns out _check_xml requested *all* view fields even though it needed
none of them save for the arch. Specifying fields to read_combined
rather than fetching all fields seems to result in a ~30% speedup of
_check_xml (under line_profiler). Most of the rest is spent fetching
sub-views (in get_inheriting_view_arch), I don't know that it can be
improved without hand-crafting a fairly complex SQL request.
2015-06-25 10:39:55 +02:00
Miku Laitinen f5dd09dd84 [ADD] base: Finnish address format 2015-06-25 08:47:05 +02:00
Christophe Simonis b8bf1e0905 [MERGE] forward port of branch saas-3 up to ea659cb 2015-06-24 12:37:08 +02:00
Christophe Simonis ea659cbd87 [MERGE] forward port of branch 7.0 up to 16a545b 2015-06-24 12:34:03 +02:00
Nicolas Lempereur 1942522969 [FIX] base: update File Content for binary field
To distinguish two ir.attachment 'File Content', we base it on the file
size (this I imagine is for efficiency).

This is done by setting bin_size in the context. Doing this, the
returned db_datas field will be the file size of the converted to base64
content (if no filestore).

But this size is returned in string format, so "get_nice_size" (in
openerp/osv/fields.py) which gets this size calculates the length of the
string. e.g: if the size is '2142' get_nice_size will return 4.

This fix solves this by converting the string to an integer, thus
unifying it with the filestore case (where we use os.path.getsize which
return an integer).

Also, the field presenting the issue (FieldBinaryFile) has been changed
so it is always updated even if the size is the same (as it was already
done by 3632949 for FieldBinaryImage widget).

closes #7223
opw-643071
2015-06-23 15:20:33 +02:00
Odoo Translation Bot 35b2463324 [I18N] Update translation terms from Transifex 2015-06-22 13:21:18 +02:00
Damián Soriano 2df9060d97 [FIX] tests: db name moved from constant to function
Avoids initializing the DB constant too early
when subcommand modules are loaded, making them
unable to run db-backed tests later.

Closes #6984
2015-06-12 12:43:01 +02:00
Odoo Translation Bot e2c9699cfc [I18N] Update translation terms from Transifex 2015-06-08 14:03:50 +02:00
SauliusZ 2948ed954b [FIX[ base: Currencies changed for Latvia and Lithuania
Latvia changed its currency to Euro from 2014 and Lithuania from 2015. It is not
possible to buy in old currencies anymore.
2015-06-03 19:03:45 +02:00
Martin Trigaux 4528ccf148 [I18N] First sync of translations from Transifex
Translation is that which transforms everything so that nothing changes.
 -- Grass Günter
2015-05-29 21:58:20 +02:00
Martin Trigaux 409ca3e009 [I18N] Update translations from Transifex
Now I am become Death, the destroyer of worlds
2015-05-29 18:28:10 +02:00
Olivier Dony b17c7d66c7 [I18N] Final sync + cleanup of Launchpad Translations, moving to Transifex
See https://github.com/odoo/odoo/wiki/Translations
2015-05-29 11:22:32 +02:00
Olivier Dony 1cea0dc4e9 [I18N] Final sync + cleanup of Launchpad Translations, moving to Transifex
See https://github.com/odoo/odoo/wiki/Translations
2015-05-29 10:55:06 +02:00
Olivier Dony 3c3581e19f [I18N] Sync latest translations from Launchpad (not the final one) 2015-05-21 18:01:57 +02:00
Olivier Dony ebb5ddcd65 [I18N] Sync latest translations from Launchpad (not the final one) 2015-05-21 14:42:20 +02:00
Christophe Simonis 8a430c4a23 [FIX] base: ir.http: only server_attachement for 404 errors
fixes #6792
2015-05-21 13:46:38 +02:00
Goffin Simon 6e06318828 [FIX] base: value = 0 for record ir_property
When a record is created with a field property of type integer or float equal to 0, there is
no record created in ir_property for this field. Then for a search of a record with this type of
field equal to 0, it must match all the records that have no corresponding property in the table
"ir.property" for this field.

ps: in 7.0, the function search_multi doesn't exist and the bug linked to cost price
doesn't happen because it's a float field.

opw:639746
2015-05-19 09:30:53 +02:00
Denis Ledoux a4c7c564cf [FIX] stock_account: average cost in multi-company environment
When receiving goods with average price set as costing method,
for a move from another company than the SUPERUSER_id company,
the average price updated was the one from the SUPERUSER company
instead of the one of the move.

opw-634167
2015-05-18 11:49:55 +02:00
Raphael Collet 78a20a3dba [FIX] model: wrong alias used in read query for multi-inherited field
In commit 04ba0e99, we introduced an optimization for reading inherited fields
in a single query.  There is an issue when you have more than one level of
`_inherits`.  The query looks like:

    SELECT ...
    FROM table0, table1 AS alias1, table2 AS alias2
    WHERE table0.link0 = alias1.id AND table1.link1 = alias2.id AND ...
                                       ^^^^^^
                             should be alias1

This fixes the issue, and adds a test to reproduce it.  The fix is based on
@emiprotechnologies's own proposal, but is cleaner and does not break APIs.
2015-05-12 13:42:27 +02:00
Denis Ledoux 5d4560676e [FIX] res_users: action_id must be readable by the user
`action_id` is the loaded (window) action on user sign in.
It must thefore be readable by the user.

opw-634402
2015-05-12 11:33:43 +02:00
Christophe Simonis 94aae97c04 [MERGE] forward port of branch saas-3 up to e2bfb96 2015-05-08 18:52:57 +02:00
Christophe Simonis e2bfb969ed [MERGE] forward port of branch 7.0 up to 6e23b2a 2015-05-08 18:10:30 +02:00
Olivier Dony 6e23b2a807 [FIX] ir.model.data._update: create/modify XML IDs as super-user
When importing a CSV file with an "id" column containing
external IDs (XML IDs), the system automatically creates
or updates the corresponding ir.model.data entries.
This would fail for regular users who do not have
create/write access on this internal model.
2015-05-08 10:25:44 +02:00
Nicolas Martinelli 7feb9c112b [FIX] report,qweb: use non-beaking space between amount and currency
Fixes #6369
opw-633975
2015-05-05 08:27:04 +02:00
Nicolas Lempereur dd88f3c82f [FIX] search: searching fields.property not set
When searching if a many2one property field is not set, there may be less
results since only the ones with a reference set to NULL are returned.
We should also get those not in the table.

This commit change this case so instead of returning ['id', 'in', {matching non-set ids}],
the ['id', 'not in', {matching set ids}] is returned.

e.g: if (1, 3, 8) are set, (5, 9) are not set. ['id', 'not in', (1, 3, 8)] would
be returned instead of ['id', 'in', (5, 9)] which might not select all non-set
property fields.

closes #6044
opw-631057
2015-05-04 12:00:22 +02:00
Olivier Dony 622e00baa5 [I18N] Sync 8.0 translations from Launchpad 2015-04-28 09:45:53 +02:00
Denis Ledoux cf4d14ce39 [MERGE] forward port of branch saas-3 up to 09b277c 2015-04-27 14:02:52 +02:00