Commit Graph
1743 Commits
Author SHA1 Message Date
Christophe Simonis 717f458394 [MERGE] forward port branch saas-15 up to 93c22558f3 2018-10-11 14:48:49 +02:00
Christophe Simonis 93c22558f3 [MERGE] forward port branch saas-14 up to 77286e4296 2018-10-11 12:15:02 +02:00
Christophe Simonis 77286e4296 [MERGE] forward port branch 10.0 up to c2688e45f3 2018-10-11 10:34:48 +02:00
Sébastien Theys 80d363cd31 [FIX] tools: expand user and vars for data_dir 2018-10-10 14:03:59 +02:00
Stijn Houben 26d67991c2 [FIX] base: allow admin to modify paperformats
If a user creates a paperformat, he should be able to modify it too.
Employees have no reason to modify the paperformat though (nor create).
Having a malicious employee modifying an existing report may be dangerous.

[CLA] signature for stijnh92

Fixes #26292

closes odoo/odoo#27444
2018-10-10 13:13:19 +00:00
Christophe Simonis a5772d4338 [MERGE] forward port branch 9.0 up to 75388edd9c 2018-10-09 16:23:35 +02:00
Christophe Simonis 0ef5cedebb [MERGE] forward port branch saas-14 up to 637e4c68fc 2018-10-08 17:29:03 +02:00
Christophe Simonis 0efe62d63d [MERGE] forward port branch 10.0 up to 085d504561 2018-10-08 14:51:52 +02:00
Duc Dao 085d504561 [FIX] base: use correct field for Vietnamese
There is no name field but a state_name one
Closes #27512
2018-10-08 12:13:32 +02:00
Odoo Translation Bot fd228ccda4 [I18N] Update translation terms from Transifex 2018-10-07 00:29:41 +02:00
Odoo Translation Bot 0a94a766e6 [I18N] Update translation terms from Transifex 2018-09-30 00:29:10 +02:00
Christophe Simonis a0d832efdc [MERGE] forward port branch saas-14 up to 218eec5482 2018-09-26 12:09:18 +02:00
Jeremy Kersten b732ab3dc9 [FIX] base: fix dev mode for get_view_arch_from_file and inherits
Before this commits, dev mode crash in some case (see below) when you declare
a website_page without field name='arch'.
After this commit, we follow the view_id (limit: only into the same file)

Contactus works luckily before this commit, because compute field xml_id on
View return the first ir_model_data (order by name asc by default).

website.contactus
    is BEFORE
website.contactus_page_ir_ui_view

 -- while --

website.bs_debug_page_view
    is AFTER
website.contactus_page_ir_ui_view

closes odoo/odoo#27234
2018-09-26 09:32:11 +00:00
Christophe Simonis 1b5f14713b [MERGE] forward port branch saas-15 up to 0ef5cedebb 2018-10-08 18:59:03 +02:00
Nicolas Lempereur 56fe8ee9ee [FIX] base: access_token test pass for python2
In 46f2e1918 that replaced traceback when accessing an attachment with
access token with 403 or 404 errors, the added test would fail if run in
python2.

fix for https://github.com/odoo/odoo/commit/46f2e191#commitcomment-30796449
closes #27514
2018-10-08 09:09:58 +00:00
Odoo Translation Bot 47369090db [I18N] Update translation terms from Transifex 2018-10-07 04:11:56 +02:00
Odoo Translation Bot 6bb4b305f0 [I18N] Update translation terms from Transifex 2018-10-03 14:27:50 +02:00
Christophe Simonis 218eec5482 [MERGE] forward port branch 10.0 up to 854eb97b2e 2018-09-26 11:28:33 +02:00
David Tran cf30f35f3e [FIX] base: address_format for Vietnam
Vietnam address should come with Province name, not `state_code`

Closes #27164
2018-09-24 10:21:04 +02:00
Odoo Translation Bot facc3b9a63 [I18N] Update translation terms from Transifex 2018-09-23 00:28:15 +02:00
Christophe Simonis d23601cc67 [MERGE] forward port branch saas-14 up to a119373b5b 2018-09-21 14:18:48 +02:00
Christophe Simonis a119373b5b [MERGE] forward port branch 10.0 up to cda1bec3e0 2018-09-21 10:42:19 +02:00
zeroheure cda1bec3e0 [DOC] cmdline: proper default for limit-memory
The default values for --limit-memory-(soft|hard) had been changed in
Odoo v8.0, but this change wasn't reflected in the cmdline --help.

Closes #22315
2018-09-19 14:47:13 +02:00
Odoo Translation Bot 548f8dba82 [I18N] Update translation terms from Transifex 2018-09-16 00:29:05 +02:00
Nicolas LempereurandWolfgang Taferner 46f2e1918f [FIX] base: access_token error handling correctly
When an attachment is requested with an access_token, a server error
would occur in some situation.

With this changeset when an access token is specified:

- returns a 404 error if the attachment does not exist
- returns a 403 error if the attachment has no access_token

Without this change, the added test would fail with:

```
 status = test_access(access_token='Secret')
 self.assertEqual(status, 403,
     "no access if access token for attachment without access token")
 | if not consteq(obj.access_token, access_token):
 | TypeError: unsupported operand types(s) or combination of types: 'bool' and 'str'

 status = test_access(access_token='Secret')
 self.assertEqual(status, 404,
     "no access with access token for deleted attachment")
 | if not consteq(obj.access_token, access_token):
 | odoo.exceptions.MissingError: ('Record does not exist or has been deleted.', None)
```

close #26647
opw-1884419
closes #27275

Co-authored-by: Wolfgang Taferner <wtaferner@users.noreply.github.com>
2018-09-28 10:42:51 +00:00
Christophe Simonis 6ce408c824 [MERGE] forward port branch saas-15 up to a0d832efdc 2018-09-26 12:41:31 +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
Odoo Translation Bot 988cadaf5d [I18N] Update translation terms from Transifex 2018-09-09 00:29:00 +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
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
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
Odoo Translation Bot 8846a0c21b [I18N] Update translation terms from Transifex 2018-09-02 00:29:56 +02:00
Nicolas LempereurandWolfgang Pichler 79e18ac6af [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-08-31 12:02:21 +02:00
Christophe Simonis 6b1b507deb [MERGE] forward port branch saas-14 up to ab8e27382f 2018-08-30 12:43:43 +02:00
Christophe Simonis ab8e27382f [MERGE] forward port branch 10.0 up to 09ad560660 2018-08-30 12:43:12 +02:00
Davor Bojkić - Bole 09ad560660 [ADD] base: add Kosovo to list of countries
According to discussion on jvOrsouw/Odoo11#1

Closes #20605
2018-08-30 11:58:05 +02:00
Odoo Translation Bot 42e41b191c [I18N] Update translation terms from Transifex 2018-08-26 00:27:45 +02:00
Christophe Simonis c619b19f66 Revert "[FIX] manual creation of serialized field from the interface"
Non applicable since b0646f9d2c.

This reverts commit 03395ea103.
2018-08-21 14:13:15 +02:00
Christophe Simonis e80f853ab3 [MERGE] forward port branch saas-14 up to aafa6e38c4 2018-08-21 12:06:23 +02:00
Christophe Simonis aafa6e38c4 [MERGE] forward port branch 10.0 up to 342d037373 2018-08-21 11:33:53 +02:00
Nicolas Martinelli 07b5f205ab [FIX] models: unlink ir.property
On a new DB with demo data, as Demo User:
- Create a partner
- Unlink the partner

An `AccessError` is raised.

The error is raised on `ir.property`, for the field
`property_product_pricelist`. An entry was indeed automatically created
at partner creation. However, a regular user is not allowed to delete an
`ir.property`.

The property can be safely deleted as SUPERUSER as long as the proper
unlink access rights have been tested beforehand.

opw-1870737
2018-08-21 09:32:01 +02:00
Benoit 03395ea103 [FIX] manual creation of serialized field from the interface 2018-08-20 13:56:29 +02:00
Odoo Translation Bot afffcc971f [I18N] Update translation terms from Transifex 2018-08-19 00:28:25 +02:00
Christophe Simonis 52e88036f2 [MERGE] forward port branch saas-14 up to d4ee30b4fa 2018-08-14 17:45:46 +02:00
Christophe Simonis d4ee30b4fa [MERGE] forward port branch 10.0 up to a487d7d397 2018-08-14 17:09:32 +02:00
len-odoo b41baa3c92 [FIX] base: handle RedirectWarning exceptions during import
During an import, account_invoice.py's _onchange_partner_id can return a
RedirectWarning exception, which wasn't properly handled by the load method.
Since it is an Exception, it was expected to have a name field.
We add it as a property so that they can be treated uniformly.

opw 1866965
2018-08-13 13:53:12 +02:00