Commit Graph
2635 Commits
Author SHA1 Message Date
Raphael Collet c96d4cdbad [FIX] base: ormcache invalidation in ir.config.parameter
Writing on a parameter invalidates the ormcache and propagates the invalidation
to other workers.  Setting a parameter to its current value should not trigger
ormcache invalidations.
2018-11-23 14:02:17 +00:00
Raphael Collet e181f592f3 [FIX] odoo: ormcache invalidation on loading registry
Do not propagate cache invalidations to other workers when simply loading the
registry.  Only do it when installing/upgrading/uninstalling modules.
2018-11-22 11:05:30 +00:00
Raphael Collet ad065093eb [FIX] models: ormcache invalidation on import
Do not propagate cache invalidations to other workers when changes must be
discarded, because of an import error or a dry run, which are both handled as
successful transactions.
2018-11-22 11:03:51 +00:00
Christophe Simonis 4cbcbe9ea4 [FIX] base: adapt property field optimization to native date(time) fields
See b6d32de31e
2018-11-22 20:33:22 +01:00
Christophe Simonis 70f9cb33ac [FIX] base: remove leftover print statements 2018-11-22 20:19:06 +01:00
Christophe Simonis b4e1be8ab0 [MERGE] forward port branch saas-11.3 up to b09f624f20 2018-11-22 20:06:48 +01:00
Christophe Simonis b09f624f20 [MERGE] forward port branch 11.0 up to 263b388c50 2018-11-22 17:52:57 +01:00
Christophe Simonis 263b388c50 [MERGE] forward port branch saas-15 up to e44c35f407 2018-11-22 17:06:31 +01:00
Raphael Collet 9d72263717 [FIX] base: partner.user_ids only shows active users
Returning inactive users breaks many features based on the partner's user ids
(among which the company switcher).

This reverts a small part of commit 14af2c7f2fe6c14afb96d7e9f2bb02b2a022eaae
which is related to #25939.  That part was not necessary and had some
unintended side-effects.

closes odoo/odoo#28947
2018-11-22 15:03:06 +00:00
Toufik Benjaa 23a7b15276 [FIX] http: avoid crash on jsonp POST+GET
- This commit fixes a crash that happens when the server receive a
  JSON-P call done in two requests (a POST followed by a GET).

  The issue is due to the fact that when the first request is done (POST
  one) the member `params` is never initialized.

  This parameter is then used in the module `auth_signup` on an override
  of the method `dispatch` thus crashing the code.

  To avoid the crash, we now initialize `params`.

closes odoo/odoo#27369
2018-11-21 10:09:10 +00:00
Lucas Perais (lpe) 07d4505759 [FIX] base: res_partner: clarify string of commercial_partner_country_id
To avoid confusion in the filters and elsewhere

OPW 1910654

closes odoo/odoo#28848
2018-11-20 14:39:14 +00:00
Odoo Translation Bot c487d2c26c [I18N] Update translation terms from Transifex 2018-11-21 09:40:22 +01:00
Raphael Collet 5eb2fbdec3 [FIX] base: create parent XML ids before XML id
When a module creates a record from a model M that `_inherits` from some parent
model P, the method `_load_records` creates an XML id for the record, and an
extra XML id for the parent record.  The corresponding `ir.model.data` entries
must be created in the right order (parent record, then record), so that the
record is deleted before its parent record.

closes odoo/odoo#28805
2018-11-19 14:57:52 +00:00
Raphael Collet 4894419b61 [FIX] cache: ormcache logger
The adaptation to Python 3 was done with two mistakes: the iteration on the lru
cache does not return keys, and functions are not sortable.

closes odoo/odoo#28870
2018-11-21 10:16:06 +00:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Katherine Zaoral edfcee0190 [FIX] base: fix name for country state of Buenos Aires
Change "Buenos Aires City" to "Ciudad Autónoma de Buenos Aires" accordingly to
http://www.afip.gob.ar/fe/documentos/TABLA%20PROVINCIAS%20V.0%20%2025082010.xls

closes odoo/odoo#28584
2018-11-20 18:11:20 +00:00
Raphael Collet b6d32de31e [FIX] base: optimize property fields
Implement the getter method in plain SQL.  This makes reading company-dependent
fields 33% faster (on 20000 partners, reading 'property_product_pricelist'
takes 3700ms instead of 5500ms.)

closes odoo/odoo#28769
2018-11-19 15:38:17 +00:00
Christophe Simonis 4b8bd36219 [MERGE] forward port branch saas-11.3 up to bab2a191d2 2018-11-16 15:39:02 +01:00
Odoo Translation Bot 1da3ff5a0a [I18N] Update translation terms from Transifex 2018-11-18 03:15:42 +01:00
Christophe Simonis 15f686eef6 [MERGE] forward port branch 11.0 up to 468dab6748 2018-11-15 20:39:10 +01:00
Lucas Perais (lpe) 50e5f73b4e [FIX] fields, test_new_api: monetary related custom
This commit allows for not copying the currency_field attribute
of a monetary field when the monetary field is related,
and when the currency_field attribute is not explicit

Before this commit, the currency_field attribute on the related monetary
was set as the one on the distant model

After this commit, the currency_field attribute takes the field on the
current model

Though the test may appear like an incoherent use case,
it is on the contrary totally legit, as web_studio allows it

OPW 1903113

closes odoo/odoo#28144
2018-11-14 15:14:36 +00:00
Géry Debongnie aa18aaa292 [FIX] web: restore formview mode when coming back (breadcrumbs)
Before this commit, when the user is in a form view (edit mode) and
click on a stat button, a new action is added to the action stack.  When
the user then comes back to the form view by clicking on the breadcrumb,
it is supposed to be in readonly mode.  Before this commit, this was not
the case.

This bug comes from the action manager refactoring, which removed the
view manager. With this commit, we add a new action lifecycle method
which is called when the action is restored.

Note that this commit implicitely changes the semantic of actions with
'target=inline'. As far as I can tell, this only applies to the settings
form view, which can easily be fixed by overriding the restore hook.

closes odoo/odoo#28663
2018-11-14 11:19:40 +00:00
Nicolas Martinelli 79d29c51df [FIX] base_import_module, cli: deploy
The use of the `deploy` command always fails because of an incorrect
CSRF token since commit 9bae56acd4. Indeed, the latter
re-introduces the session rotation, i.e. the session ID is changed at
authentication.

Practically, what happens server-side is:
- authentication
- generate CSRF token
- create the response with the token and a change of session ID

At this point, the token generated is not correct anymore since it is
based on the 'old' session ID. Therefore, when it is reused at
uploading, an error is raised.

It is actually possible to simplify the process by performing the
authentication and the file upload in a single request. There is indeed
no real use of extracting the authentication, since the request is then
only used to upload the module.

opw-1902863

closes odoo/odoo#28653
2018-11-14 09:40:17 +00:00
lul-odoo 21976ca838 [FIX] base: Fix rng for 'templates' tag in calendar view
The following commit https://github.com/odoo/odoo/commit/76e6a0e3560db8257ab0d183463a894ace1e3a7e
renamed in the js calendar view file the template tag from 'template' to 'templates' but forgot
to rename it in the rng file. Since that commit templates in calendar views are not working.
This commit fixes this issue.

closes odoo/odoo#28601
2018-11-13 14:10:36 +00:00
Lucas Perais (lpe) 40b4584b00 [FIX] *: boolean in domains should have value True or False
Because the JS cannot handle 1 or 0 being equivalent to true or false, the views should comply
Issues specifically arise in the kanban view when, instead of reloading every record with python,
the JS actually computes which record should be displayed by reinterpreting the domain

From a user point of view, on a fresh db with CRM installed, go to the app kanban view
Click on the contextual menu of the CRM kanban label, click uninstall

The modal opens, but click cancel. The kanban label of the kanban view has disappeared

This is due to commit 33ba61bfdb, which prevents reloading all the view
for performance purposes

This commit prevents the label from disappearing

OPW 1903534

closes odoo/odoo#28484
2018-11-13 10:09:03 +00:00
Odoo Translation Bot 8d77288a8c [I18N] Update translation terms from Transifex 2018-11-11 03:16:11 +01:00
Christophe Simonis 94a9fc9902 [MERGE] forward port branch 11.0 up to e5c8071484 2018-11-08 14:13:52 +01:00
Christophe Monniez 055e1b8324 [REM] packaging: remove useless code
PKG-INFO is generated during the setup phase and is not needed anymore.
Also this file contains outdated informations.

py2exe is not used anymore to build the windows installer.

closes odoo/odoo#28494
2018-11-08 08:50:33 +00:00
Raphael Collet eaa93d1bd4 [FIX] models: update write_date when writing on inherited fields
When changing the field `image` on `res.users`, the `write_date` of the user is
not updated because the field is inherited from `res.partner`.

Related to Issue : 1839603
2018-11-06 11:11:03 +01:00
Christophe Simonis f66a9cdbcf [MERGE] forward port branch 11.0 up to bab5ccfdd7 2018-11-05 17:51:04 +01:00
Odoo Translation Bot 79b701230d [I18N] Update translation terms from Transifex 2018-11-04 03:16:30 +01:00
Olivier Dony 717b7249d5 [FIX] server: always consume wakeup bytes from signals
Due to the implementation of PEP-475[1] in Python 3.5, revision
e98e8e9b1b used the recommended technique
of wakeup file descriptors in order to detect interruption of sleep() and
select() by signals, when running in multi-process mode (workers > 0).

The technique works well, however the initial patch never bothered to
read the byte that is written to the wakeup pipe when a signal is
processed. This does not matter when the signal is meant to shut down
the server, but it matters when the signal is SIGQUIT: it simply prints
thread dumps, and continues operating normally.
As a consequence, that byte remains in the wakeup pipe forever, causing
all the subsequent select/sleep calls to return immediately because
the wakeup fd *is* already ready. The symptom was that worker
processes would start cycling their main run loop very fast after
receiving a SIGQUIT signal, eating 100% CPU.

This patch ensures we always empty the wakeup pipe after an interruptible
call, to avoid this effect. It also refactors another occurrence of the
"empty pipe" pattern, in the PreforkServer, and incidentally uses readable
aliases for the file descriptors bound to the ends of the wakeup pipe
(wakeup_fd_r / wakeup_fd_w).

[1] https://www.python.org/dev/peps/pep-0475

closes odoo/odoo#28356
2018-11-02 11:04:35 +00:00
Christophe Simonis 21eb31d804 [MERGE] forward port branch 11.0 up to a587325ca7 2018-10-31 19:22:21 +01:00
Christophe Simonis a587325ca7 [MERGE] forward port branch saas-15 up to 00829a0beb 2018-10-31 18:31:53 +01:00
Christophe Simonis 00829a0beb [MERGE] forward port branch saas-14 up to c552e368b3 2018-10-31 17:58:05 +01:00
Christophe Simonis c552e368b3 [MERGE] forward port branch 10.0 up to 93d69933ac 2018-10-31 17:23:32 +01:00
Christophe Simonis 8cf43f1350 [MERGE] forward port branch 11.0 up to ee0ff262f0 2018-10-29 17:12:53 +01:00
Christophe Simonis ee0ff262f0 [MERGE] forward port branch saas-15 up to 953dfe92c2
closes odoo/odoo#28255
2018-10-29 14:16:45 +00:00
Raphael Collet 1ca1918a45 [FIX] base: subscribe new API onchange methods for module fields
Adapt the code to use the new API for onchange methods.  This fixes onchanges
for version 11.0, since support of old-API onchange is actually gone.
2018-10-29 14:51:42 +01:00
Christophe Simonis d692f3b781 [MERGE] forward port branch saas-14 up to 1916fdc1d0 2018-10-29 13:46:47 +01:00
Christophe Simonis 1916fdc1d0 [MERGE] forward port branch 10.0 up to ac08e2ba53 2018-10-29 12:27:14 +01:00
Odoo Translation Bot 19d8adbce1 [I18N] Update translation terms from Transifex 2018-10-28 03:21:03 +01:00
Christophe Monniez 07b855fccf [FIX] tests: remove chrome sandboxing
It appears that chrome headless with sandboxing is failing when running
containerized because it tries to use Linux namespaces.

With this commit, the no-sanbox optional arg is used to avoid this
issue.

Closes #26456
Closes #28053
2018-10-26 11:26:18 +02:00
Christophe Monniez f9ee8cff14 [FIX] tests: avoid remaining requests
From times to times, warning are seen on the runbot during HttpCase
tests with the chrome headless browser.

Those warning are about Odoo trying to join remaining requests threads.
In the dumpstack, the thread seems blocked in the werkzeug
handle_one_request method, when trying to read the HTTP request line.

One explanation could be that Chrome opens a pre-connect socket for
a future use. When the HttpTest cleans the browser, the page stops
loading but (probably) keeps the socket open for a while.

That could explain the problem.

With this commit, a timeout is set on the request handler,
in the hope that it closes the pre-connect socket too.
2018-10-25 17:16:34 +02:00
Christophe Simonis cc8e8237bf [MERGE] forward port branch 11.0 up to 84500c27b1 2018-10-25 13:59:45 +02:00
Marius Žilėnas 3f89774ed0 [FIX] cli: fix broken link
The master file no longer exists

Closes odoo/odoo#26623
2018-10-24 16:15:02 +02:00
Christophe Simonis da08a9e986 [FIX] base: don't ignore new uninstallable modules
When updating the module list (`ir.module.module.update_list()`), new
modules that are not installable were ignored.
This behavior was not consistent with the database initialization [1]
which creates all modules.

[1] https://github.com/odoo/odoo/blob/5d932e5db164fe80fd7c011ddd53f3494ef89ef5/odoo/modules/db.py#L51-L54
2018-10-24 15:36:55 +02:00
Pedro M. Baeza c0e35f84e2 [FIX] migration: use correct migration prefix in docstring
Migration files must contain `-` in its name for being executed
2018-10-23 18:43:59 +02:00
Martin Trigaux 95ceedb7fa [FIX] test_main_flows: adapt tour
To reflect changes in enterprise

closes odoo/odoo#28600
2018-11-12 08:50:52 +00:00
Odoo Translation Bot dcc077afc5 [I18N] Update translation terms from Transifex 2018-11-11 01:26:46 +01:00