Commit Graph
2169 Commits
Author SHA1 Message Date
Odoo Translation Bot 62ab7eb88b [I18N] Update translation terms from Transifex 2018-09-30 07:02:39 +02:00
Odoo Translation Bot 2521b9990e [I18N] Update translation terms from Transifex 2018-09-23 07:02:35 +02:00
Yannick Tivisse b3fef6a72a [IMP] base: Order user's type groups by id
Purpose
=======

Traceback when following these steps:
- Install MRP
- Load French translations
- Set language to French
- Activate 'work orders' on MRP configuration

Error: The field 'sel_groups_9_10_1' doesn't exist.

This is because the only selection groups field on the res_users view
that doesn't have a transitive closure (the user's type Internal/Portal/Public)
is ordered by name.

1: Internal User
9: Portal
10: Public

becomes

9: Portail
10: Public
1: Utilisateur Interne

which lead to the traceback.

We should retrieve these groups ordered by 'id' to avoid the issue.
2018-09-20 16:19:24 +02:00
Martin Trigaux 1421949c67 [FIX] tools: import translation file without pot
Due to fccfd36 and 4ba7fbb the translations were only imported, considering the
.pot as the reference.

During import or a manual csv or po file, there is no pot file.

Add tests with Klingon and Dothraki

Fixes #27044
2018-09-18 18:02:19 +02:00
Christophe Simonis a1b384d66b [MERGE] forward port branch saas-11.3 up to 2de573440e 2018-09-17 19:40:47 +02:00
Christophe Simonis 0942a57b5a [MERGE] forward port branch 11.0 up to f2b8caff07 2018-09-17 18:03:41 +02:00
Nicolas Martinelli de1b97f493 [FIX] base: set_value
By default, the `set_value` method doesn't do anything, and is expected
to be overridden. However, `ir.default`, groups and
`ir.config_parameter` are set BEFORE `set_value` is actually called.

This is an issue when it is necessary to retrieve one of these values
before the save, for example in order to compare the value before and
after.

We move the setting of the various values directly in the `set_value`.
This way, it becomes possible to interact with the values before any
modification is performed. On the other hand, the existing logic remains
unchanged.

opw-1882068
2018-09-17 08:28:38 +02:00
Odoo Translation Bot 7fdbc66861 [I18N] Update translation terms from Transifex 2018-09-16 07:08:38 +02:00
Odoo Translation Bot 2bf3c29b0c [I18N] Update translation terms from Transifex 2018-09-16 04:10:49 +02:00
Raphael Collet 70ed882088 [FIX] base: optimize the reading of many2one property fields 2018-09-14 14:25:00 +02:00
Christophe Simonis f3fa5a5ef7 [MERGE] forward port branch saas-11.3 up to 1e0a92c996 2018-09-13 19:30:33 +02:00
Christophe Simonis d76cd50f0e [FIX] base: avoid generating invalid user group view
When no `base.module_category_user_type` Application is found, the group
view was generated with the domain `[('', '!=', <int>)]`, which is will
fail view validation.

This situation happen during database migration or if the module category
is deleted.
2018-09-12 19:05:29 +02:00
Christophe Simonis 2b92f04289 [MERGE] forward port branch 11.0 up to cf7cb147f2 2018-09-11 19:50:13 +02:00
Christophe Simonis 49a7295ce9 [MERGE] forward port branch saas-15 up to 48aac01c13 2018-09-11 19:06:22 +02:00
Christophe Simonis 48aac01c13 [MERGE] forward port branch saas-14 up to 55ab1ac691 2018-09-11 18:54:08 +02:00
Christophe Simonis 55ab1ac691 [MERGE] forward port branch 10.0 up to cd66b0984e 2018-09-11 17:44:14 +02:00
Christophe Simonis cd66b0984e [FIX] base: only sync partners when type change 2018-09-11 17:08:14 +02:00
Martin Trigaux 4ba7fbbf81 [FIX] tools: use pot as reference file
In the first attempt at #26134, the pot_targets was cleared after creating
the pot_rows object.

Since the rows not present in the pot_targets are now skipped, clearing the pot
should not be done.

Still use a temporary list pot_rows to avoid modifying the list we are iterating
on.

Update the .po test file to match the new file format

Closes #26881
2018-09-11 09:16:59 +02:00
Martin Trigaux fccfd36e05 [FIX] tools: skip bad translations
cherry-pick of 428fbd0381 that was reverted at 737ba55e1e as it was making
tests fail

The following commit will correct the tests
This commit only reverts the revert
2018-09-11 09:14:53 +02:00
Christophe Simonis 826cd9b3d3 [MERGE] forward port branch 11.0 up to c3ea0a7811 2018-09-10 19:21:57 +02:00
Adrien Dieudonne 15e1b2a469 [FIX] test_main_flows: automatic install of account_accountant
'account_accountant' is only defined in enterprise.
Before this commit, many of us forgot to manually install it
before running main_flow_tour in enterprise.
Plus, it was difficult to know that a required module is missing
when a step failed. The error was not clear.

Now, the post hook will check if this module exist (it's the case in
enterprise) and will install it.
2018-09-10 14:48:47 +02:00
Yannick TivisseandWolfgang Pichler b7e6f28100 [FIX] base: user fields_get no add group if asked
The override of fields_get adds "virtual" fields corresponding to
groups.

If for example we make "res.users" have inherit "mail.thread", we get
these "virtual" field as if they had "track_visibility", since we do a
"fields_get" with fields having track_visibility expecting to only get
back "track_visibility" ones.

So the system would then fail trying to track visibility on fields like
"in_group_5" and for example a res.users could not be created anymore.

With this fix, we fix the fields_get so it respect the fields we ask of
it.

fixes #22332
opw-1878654
closes #22338
closes #26705

Co-authored-by: Wolfgang Pichler <wpichler@callino.at>
2018-09-10 14:23:43 +02:00
Yannick Tivisse c3717f3018 [IMP] base: Erase user's groups if converted to public/portal 2018-09-10 14:23:43 +02:00
Yannick Tivisseandjem-odoo bb3f20710a [IMP] base: Display Internal Users/Portal/Public as a selection
Co-authored-by: jem-odoo <jem@openerp.com>
2018-09-10 14:23:43 +02:00
Yannick Tivisse 43dd9ecd82 Revert "[IMP] base: Remove the reified view on 'groups_id' in res_users' form"
This reverts commit bd49f9fd17.
2018-09-10 14:23:43 +02:00
Yannick Tivisse 4587816198 Revert "[IMP] base: Remove unused module categories"
This reverts commit 382fbd3520.
2018-09-10 14:23:43 +02:00
Yannick Tivisse 7978d4ba0f Revert "[IMP] *: Define groups on res.users models"
This reverts commit 99f497b390.
2018-09-10 14:23:42 +02:00
Yannick Tivisse dae8ca3f87 Revert "[IMP] base: Add compute/inverse methods to manage user groups"
This reverts commit ab179bb2d7.
2018-09-10 14:23:42 +02:00
Odoo Translation Bot 5e4d4c305f [I18N] Update translation terms from Transifex 2018-09-09 07:07:47 +02:00
Odoo Translation Bot 01d853e295 [I18N] Update translation terms from Transifex 2018-09-09 04:11:03 +02:00
Odoo Translation Bot 988cadaf5d [I18N] Update translation terms from Transifex 2018-09-09 00:29:00 +02:00
Christophe Simonis 5020f41b95 Revert "[FIX] tools: skip bad translations"
This actually broke some valid use cases (catch by new translations tests)

This reverts commit 428fbd0381.
2018-09-07 17:24:10 +02:00
Christophe Simonis 49c3264ce0 [MERGE] forward port branch saas-11.3 up to 4850fb0838 2018-09-07 14:43:48 +02:00
rocketgithub a5d28e0e95 [FIX] base: correct currency code for Guatemala
The correct code is GTQ, QTQ does not exists
https://www.xe.com/currency/gtq-guatemalan-quetzal
2018-09-07 14:24:06 +02:00
Christophe Simonis 4850fb0838 [MERGE] forward port branch 11.0 up to 9b602ae648 2018-09-07 12:38:59 +02:00
Christophe Simonis 1884c71245 [FIX] test_translation_import: correct test and add required i18n files ignored during forward-port 2018-09-07 12:06:24 +02:00
len-odoo 9b602ae648 [FIX] base: allow to use Python builtins in views
Py.js does support Python builtins, e.g. abs, len, str, which can
be used in views if the view validation accepts it.

opw 1879160
2018-09-07 11:38:22 +02:00
Christophe Simonis 21a186dadd [MERGE] forward port branch 11.0 up to 737ca0eb42 2018-09-06 18:13:56 +02:00
Christophe Simonis 13e91ac467 [FIX] base,account,product: correct currency convertion when company is get from context
Method `_convert` expect a browserecord, not an integer.
2018-09-06 14:24:01 +02:00
Uku Lagle 900341bed8 [FIX] assetsbundle: prevent unlink old_attachments twice
When bundle contains both, sass and less, the unlink on old_attachments
will be called twice and thus results in MissingError.

This commit closes #26110
2018-09-06 13:56:39 +02:00
Christophe Simonis f19e6ce561 [MERGE] forward port branch 11.0 up to 213759b03e 2018-09-05 18:52:27 +02:00
Toufik Benjaa 7700bd172f [FIX] mail: Avoid using default value for track fields logging
- When a tracked field is modified, a mail.message is created.
  When create is called its tries to fill missing values with "default
values".
  It first tries to find the default values in the context, which may
occurs.
  For example, modifying a tracked field on a subtask will add a key
"default_parent_id" in the context, which is the parent_id of the project.task.
  Create will try to use "default_parent_id" for the mail.message
parent_id field, which make the SQL Request invalid.
2018-09-05 18:36:54 +02:00
Christophe Simonis e1e27aa009 [MERGE] forward port branch saas-14 up to 6773d3644e 2018-09-05 17:27:46 +02:00
Christophe Simonis 6773d3644e [MERGE] forward port branch 10.0 up to 1d0940d96f 2018-09-05 17:27:13 +02:00
Goffin Simon 9e99e5e641 [FIX] base: Execute group config on modifications only
Fine tuning of a06747c03d
In some cases, it was not possible to change some settings

opw:1881081
2018-09-05 14:11:25 +02:00
Nicolas Lempereur 1d0940d96f [FIX] base: allow get_template serialization retry
When two transactions conflicts (eg. deleting same data, see [1]) Odoo
will retry the whole transaction several times hoping for the best.

But when rendering template, the error handling would prevent this
feature. For example a recurring issue was:

- loading quickly two times the /web route
- for each recompute the assets

=> this could lead to 2 concurrents transactions that would delete
previous same attachment (ie. DELETE FROM ir_attachment where id=3).

With this changeset, when getting a template fails because of a
transaction rollback, we let the issue bubble up so our retry system is
used.

So instead of a "500 Internal Server Error" page and in log:

  bad query: b'DELETE FROM ir_attachment WHERE id IN (3)'
  ERROR: could not serialize access due to concurrent update
  "GET /web HTTP/1.1" 200 -
  "GET /web HTTP/1.1" 500 -
  ... big traceback ...
  load could not load template

we would get the requested page without error and:

  bad query: b'DELETE FROM ir_attachment WHERE id IN (3)'
  ERROR: could not serialize access due to concurrent update
  "GET /web HTTP/1.1" 200 -
  SERIALIZATION_FAILURE, retry 1/5 in 0.8920 sec..
  "GET /web HTTP/1.1" 200 -

As a side node, the issue was exacerbated in some instances:

- when running a database on another server: assets are recomputed
- when a module was installed/uninstalled: assets may are recomputed
- when updating the source code: assets may be recomputed
- when starting server: requests could be stacked waiting for readiness
- when using google chrome: the "Use a prediction service to load pages
  more quickly" option may load a page two times. for example:
    -> an URL is entered in address bar
    -> a prediction request to it is started URL
    -> go to this page (Enter) when that request is not already resolved
    -> the prediction request is cancelled and a new request is started

[1] https://www.postgresql.org/docs/9.6/static/transaction-iso.html#XACT-REPEATABLE-READ

note: 10.0 backport of 11.0 #26778

opw-1849167
closes #26785
2018-09-05 10:20:50 +02:00
Nicolas Lempereur c0c9049f2f [FIX] base: allow get_template serialization retry
When two transactions conflicts (eg. deleting same data, see [1]) Odoo
will retry the whole transaction several times hoping for the best.

But when rendering template, the error handling would prevent this
feature. For example a recurring issue was:

- loading quickly two times the /web route
- for each recompute the assets

=> this could lead to 2 concurrents transactions that would delete
previous same attachment (ie. DELETE FROM ir_attachment where id=3).

With this changeset, when getting a template fails because of a
transaction rollback, we let the issue bubble up so our retry system is
used.

So instead of a "500 Internal Server Error" page and in log:

  bad query: b'DELETE FROM ir_attachment WHERE id IN (3)'
  ERROR: could not serialize access due to concurrent update
  "GET /web HTTP/1.1" 200 -
  "GET /web HTTP/1.1" 500 -
  ... big traceback ...
  load could not load template

we would get the requested page without error and:

  bad query: b'DELETE FROM ir_attachment WHERE id IN (3)'
  ERROR: could not serialize access due to concurrent update
  "GET /web HTTP/1.1" 200 -
  SERIALIZATION_FAILURE, retry 1/5 in 0.8920 sec..
  "GET /web HTTP/1.1" 200 -

As a side node, the issue was exacerbated in some instances:

- when running a database on another server: assets are recomputed
- when a module was installed/uninstalled: assets may are recomputed
- when updating the source code: assets may be recomputed
- when starting server: requests could be stacked waiting for readiness
- when using google chrome: the "Use a prediction service to load pages
  more quickly" option may load a page two times. for example:
    -> an URL is entered in address bar
    -> a prediction request to it is started URL
    -> go to this page (Enter) when that request is not already resolved
    -> the prediction request is cancelled and a new request is started

[1] https://www.postgresql.org/docs/9.6/static/transaction-iso.html#XACT-REPEATABLE-READ

opw-1849167
closes #26778
2018-09-05 09:43:53 +02:00
Christophe Simonis 2a13863f43 [MERGE] forward port branch saas-15 up to 653bbbc733 2018-09-04 17:02:36 +02:00
Christophe Simonis 653bbbc733 [MERGE] forward port branch saas-14 up to 14f8ef59b8 2018-09-04 16:48:31 +02:00
Christophe Simonis 14f8ef59b8 [MERGE] forward port branch 10.0 up to 0f0e43ae55 2018-09-04 16:11:09 +02:00