Commit Graph
379 Commits
Author SHA1 Message Date
Odoo Translation Bot 43487b73d6 [I18N] Update translation terms from Transifex 2017-12-31 00:42:46 +01:00
Odoo Translation Bot a19c462902 [I18N] Update translation terms from Transifex 2017-12-24 00:42:06 +01:00
Nicolas Martinelli 2aa3132d09 [FIX] base: prevent App Switcher as home action
This reverts commit 1ffe85f1cb and replaces the domain with a
constrain.
2017-12-21 13:47:24 +01:00
Lucas Perais (lpe) 1ffe85f1cb [FIX] base: prevent App Switcher action to be selected as home action on user
Before this commit, one could choose the App Switcher as his Home action.
and arriving on /web would trigger an infinite loop at startup

After this commit it is not possible to choose the App Switcher as Home action anymore

OPW 800323
2017-12-20 15:08:53 +01:00
Odoo Translation Bot cfe0ebcc59 [I18N] Update translation terms from Transifex 2017-12-17 00:42:09 +01:00
Richard Mathot 2b32f52b48 [REV] "[FIX] base: language code for Khmer (Cambodia)"
This reverts commit 3830621075.

This patch was unstablie as updating language code is actually forbidden.
2017-12-15 09:11:52 +01:00
Sanjay Jamod 3830621075 [FIX] base: language code for Khmer (Cambodia)
Closes #17633
2017-12-14 13:44:14 +01:00
Christophe Simonis 1022e4fb25 [MERGE] forward port branch 9.0 up to 22f8660e22
Works better when you add files...
2017-12-13 15:17:22 +01:00
Adrien Peiffer (ACSONE) 2a9e6e6a3b [FIX] res_partner: bad sudo.
Using sudo on super call can turn into infinite call in odoo.

opw:785415
2017-12-12 15:58:59 +01:00
Christophe Simonis 219c93252f [MERGE] forward port branch 9.0 up to 7a24a2f45f 2017-12-12 14:15:15 +01:00
Christophe Monniez 17c9208889 [FIX] base: backport of set mimetype on js and css assets
On MS Windows, the mimetypes module relies on the Windows Registry to
guess mimetypes. As a consequence, when generating assets bundle for
javascript files, the mime type of js files may be wrong. In that
particular case, the Odoo user is facing an empty web page.
This commit enforce 'application/javascript' for js assets when they are
saved as ir_attachment in the database.

This commit is a backport of 77ca51f
2017-12-12 09:42:55 +01:00
Odoo Translation Bot f3623f1513 [I18N] Update translation terms from Transifex 2017-12-10 00:42:03 +01:00
Nicolas Martinelli 9d0b4d0c2d [FIX] base: deactivate lang
- Install a new language
- Set it as default for several users
- Open the language and click on "Deactivate"

Traceback.

Fixes #21418
opw-786342
2017-12-06 10:20:35 +01:00
Adrian Torres 78aef7605c [FIX] *: ordered group_by for field with capital letters
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.

Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.

This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.

Fixes #21348

Cherry-Pick of c338e24ee7 as previous
forward-port has been badly done...
2017-12-04 18:49:31 +01:00
Odoo Translation Bot 60801e5375 [I18N] Update translation terms from Transifex 2017-12-03 00:41:36 +01:00
Adrian Torres 3d1e23aaba [FIX] *: Reset module states on registry init error
Commit 763d714 introduced cron job locking for databases which had
modules with states set to 'to x', however if an
installation/uninstallation/upgrade fails, the state will stay at 'to
x', and it may stay in that state for an indefinite amount of time,
meaning that cron jobs could stay locked forever.

This commit fixes this in part by adding a cleanup function to loading.py that
will be executed whenever load_modules fails, the function will change
every 'to x' module to their original state, effectively unlocking the
execution of cron jobs.

This however only works to prevent "zombie" transient states for
brand new databases, however for existing databases which already
contain some modules in a zombie state it won't do anything unless
a module is installed/uninstalled/upgraded, which may never happen.

This is where the second part comes in (ir_cron.py), when failing to
execute crons, we check if the failure was due to bad module state
and if an arbitrary amount of time (5 hours as of this commit) has passed
since the last time it was supposed to be executed, if it is the case, it means
that the cron execution failed around 5 * 60 times (1 failure per minute for 5h)
in which case we assume that the crons are stuck because the db
has zombie states and we force a call to reset_module_states.
2017-12-01 14:15:42 +00:00
Christophe Simonis 99f343c7b6 [MERGE] forward port branch 9.0 up to 82bde85030 2017-11-30 10:55:32 +01:00
Martin Trigaux 159bcf3cc2 [I18N] update Danish terms
Courtesy of Visti Kristensen, IT-konsulent
2017-11-29 14:33:19 +01:00
Florent de Labarre 61b3455b96 [FIX] base: action to edit translations of related field (#21014) 2017-11-27 09:56:35 +01:00
Odoo Translation Bot a609541f18 [I18N] Update translation terms from Transifex 2017-11-26 00:40:25 +01:00
Raphael Collet 0d5ac92ff0 [FIX] models: nonsensical special case in CSV export
Remove weird special case: when the first field of the first line of a one2many
is empty, replace this first field by the comma-separated names of the lines,
and discard the other lines.
2017-11-23 11:35:39 +01:00
Laura Piraux 266e6530dd [FIX] base: update Denmark address layout
Update the layout for the address in Denmark

opw-783437
Closes #21092
2017-11-21 09:53:30 +01:00
Odoo Translation Bot 2c7851b8ee [I18N] Update translation terms from Transifex 2017-11-19 00:43:08 +01:00
Nicolas Martinelli a9beee42d6 [FIX] tools: lang in formatLang
- Install French language
- Set language of Customer A to French
- Create an invoice due in the past
- Open the Customer Statements

The customer statement of A is translated in French, but the amounts are
formatted in the company's user language (English by default).

We add the possiblity to take into account the lang in the context when
calling `formatLang`.
2017-11-15 12:57:19 +01:00
Odoo Translation Bot 293dd507fa [I18N] Update translation terms from Transifex 2017-11-12 00:50:30 +01:00
Silvio Fernandez c68b41bff2 [FIX] server: avoid crash with gevent worker on windows
Some people may want to use the gevent worker on Windows, even if
multi-process mode is generally not supported on Windows.

Fixes #17726
Closes #20409
2017-11-11 00:51:36 +01:00
Olivier Dony 7a4c6eb35d [FIX] ir_sequence: add support for PG 10
PostgreSQL 10 move sequences' metadata fields into a new `pg_sequence`
system catalog. As a result, selecting from a sequence relation now
only return three fields, and does not include the `increment_by`
metadata field anymore.

This patch obtains the `increment_by` value from the new system catalog
for PostgreSQL server versions >= 10.

Fixes #20269
2017-11-11 00:51:36 +01:00
Nicolas Martinelli e77fa0051c [FIX] models: blank export
Exporting One2many files gives blank export.

This reverts commit 2c61c54ffa.

opw-781399
opw-781457
2017-11-10 10:35:43 +01:00
Raphael Collet b206d83c03 [FIX] ir_cron: refactor _acquire_job to retrieve useful information
The method `_process_jobs` provides an alternative API to process the cron
jobs, that does not catch exceptions and log them.  This makes the processing
of cron jobs easier for scripting.
2017-11-08 16:03:16 +01:00
Raphael Collet 763d714f0e [FIX] ir_cron: do not run cron jobs during module installation/upgrade 2017-11-08 15:57:33 +01:00
Odoo Translation Bot 6c1c1f6e9e [I18N] Update translation terms from Transifex 2017-11-05 01:11:44 +01:00
Xavier Morel e134dde867 [FIX] base: make partner.company_type properly writeable
In 7eab8e26d3 res.partner was converted
to the new API, at that point company_type was changed from a stored
field manually synchronised with is_company (through create/write
overrides) into a proper computed field.

However to make it "editable" it was simply marked as
"readonly=False", which means even though UI-wise it looks editable
editing it does not actually do anything (things work in the partners
form because there's also an onchange which updates is_company on the
fly).

Fix by implementing an inverse function and actually do this
correctly.

Fixes #20623
2017-11-02 13:14:59 +01:00
Raphael Collet 2c61c54ffa [FIX] models: nonsensical special case in CSV export (#20499)
Remove weird special case: when the first field of the first line of a one2many
is empty, replace this first field by the comma-separated names of the lines,
and discard the other lines.
2017-10-30 17:12:45 +01:00
Odoo Translation Bot 76408ecdd7 [I18N] Update translation terms from Transifex 2017-10-29 04:30:55 +01:00
Wolfgang Taferner 088f1e3fdc [FIX] base: load translation files in correct dependency order
Fixes #19824
opw-776928
2017-10-27 09:52:20 +02:00
Christophe Simonis ea9b574ac6 [MERGE] forward port branch 9.0 up to 6366150484 2017-10-25 11:28:25 +02:00
Odoo Translation Bot b26e0b9292 [I18N] Update translation terms from Transifex 2017-10-24 12:38:17 +02:00
Ayman Nedjmeddine 5f0b7942d5 [FIX] base: Add filter names
To be able to use xpath on it

Closes #20305
2017-10-23 13:44:14 +02:00
Martin Trigaux e180a03af8 [I18N] base: export source terms
Now that 8f1d889e50 has been forward ported to 10.0
Add missing enterprise module description
2017-10-20 09:20:00 +02:00
Christophe Simonis 9b4447e9aa [IMP] test_pylint: check for mixed-indentation 2017-10-19 22:33:37 +02:00
Raphael Collet 2d46dbcbfd [FIX] ir_http: use meaningful ETag for images (#20283)
After setting the image on a product variant, the controller for `/web/image`
incorrectly returns the code 304 - Not Modified.  This bug occurs because
 1. the response ETag is a hash of the **last modified date** of the record;
 2. the record is actually **not** updated in that case, because
     - the image field is a non-stored computed field, and
     - its inverse method only modifies the variant's template.

Fix the issue by making the response ETag a hash of the **content**, which is
read by the controller anyway.

OPW 769302
2017-10-18 14:53:10 +02:00
Christophe Simonis 2198220947 [MERGE] forward port branch 9.0 up to e0fbe7b5be 2017-10-18 14:05:42 +02:00
Agathe Mollé 4d56e76d52 [FIX] Fix canadian province state_ca_NL name 2017-10-17 16:18:13 +02:00
Christophe Simonis cbca27d005 [MERGE] forward port branch 9.0 up to d5c0cae60b 2017-10-17 11:42:05 +02:00
Raphael Collet 7fc6205419 [FIX] base_import_module: retrieve message from exception (#20101) 2017-10-13 12:13:50 +02:00
Jeremy Kersten c0a47980fc [FIX] base: change width by default for apps description 2017-10-13 11:04:45 +02:00
Christophe Matthieu acb4689827 [FIX] ir_qweb: t-esc escape the content only if don't use widget
trusts widgets who must return safe html content
2017-10-12 10:09:59 +02:00
Raphael Collet 10412d351c [FIX] fields: prefetching of related fields (#20017)
Prefetching is underused when all fields are traversed one record at a time.
So instead, traverse all records one field at a time.  This guarantees batch
prefetching/computation on every field being accessed.
2017-10-11 13:39:02 +02:00
Raphael Collet 0af8d4ffd2 [FIX] fields: performance optimization
Add a shortcut in `copy_cache`, to avoid iterating on all fields.
2017-10-11 11:55:02 +02:00
Yannick Tivisse 39f83aa890 [FIX] res_lang: Use a non-breaking space as thousand separator in fr_FR 2017-10-10 16:18:20 +02:00