Commit Graph
119334 Commits
Author SHA1 Message Date
Thibault Delavallée 56596e5240 [FIX] mail: avoid concurrent update of notifications
When sending notifications by batch one notification email can be send
up to 50 people. For one mail_mail entry to handle 50 emails can be sent
as those are sent independently for each recipient.

In some cases a bounce may occur while the whole batch of recipients is
not completely mailed. In that case the mailgateway will update the
notification status to bounced. When the cron finishes to send the whole
batch of emails it tries to update the notifications of all recipients.
However as a notification has already been updated due to the bounce we
face a concurrent update, meaning the transaction is rollbacked.

Emails have been sent but notifications are not considered as sent as they
have not been updated accordingly. Next time the cron runs it will send the
same batch again, with probably the same bounce and rollback. We could
therefore face an email loop.

This commit fixes that by setting notifications to a transient exception
state. Notifications are locked, meaning bounced will have to wait for the
transaction to finish before updating them. That way the cron can run
safely on the whole batch and we avoid having emails loop. It has an impact
on query count as a search and write is performed in the send process.

This commit is linked to task ID 1893054. Done in collaboration with
@Xavier-Do .
2018-10-12 12:50:39 +02:00
Aaron Bohy a781083186 [FIX] web: close m2o (in o2m) dialog with ESCAPE
Let's assume a one2many editable list containing a many2one field
(e.g. in a sales order, the product_id m2o in order_line o2m), and
the scenario where the user clicks on 'Create and Edit' in the o2m,
and then presses ESCAPE in the opened dialog.

Before this rev., it crashed because the 'navigation_move' (cancel)
event wasn't stop propagated by the form renderer (the one of the
dialog), and thus bubbled up to the list editable renderer, which
asked its basic model to discard a record it didn't know.

Note: same fix as in 8445baa (done in saas-11.3), but with a
simpler test.

Task 1878254
2018-10-11 11:21:57 +02:00
Christophe Matthieu 4aec0b7740 [FIX] calendar: notifications may appear
Following the transformation into notification service, performed by
commit 07cd24b1ec, calendar has been
forgotten.
2018-10-10 16:29:28 +02:00
qsm-odoo f9a16f7bf5 [FIX] web_editor: properly show all website attachments
Correct commit https://github.com/odoo/odoo/commit/a9366de8f90ea4106d306c585043a42f089c86d4
Indeed some attachments may not have a datas_fname field, like URL
attachments created before saas-11.4 and theme attachments from 12.0.

Closes https://github.com/odoo/odoo/pull/27610
2018-10-10 12:58:07 +02:00
Odoo Translation Bot e06a277c02 [I18N] Update translation terms from Transifex 2018-10-07 07:02:30 +02:00
Christophe Simonis 1d90e93543 [MERGE] forward port branch saas-11.3 up to c43f35ee9d 2018-10-03 17:56:58 +02:00
Christophe Simonis c43f35ee9d [MERGE] forward port branch 11.0 up to 45922f397f 2018-10-03 17:12:38 +02:00
Christophe Simonis 45922f397f [MERGE] forward port branch saas-15 up to 6cb75dc3d6 2018-10-03 16:43:31 +02:00
Odoo Translation Bot 6bb4b305f0 [I18N] Update translation terms from Transifex 2018-10-03 14:27:50 +02:00
Christophe Simonis 6cb75dc3d6 [MERGE] forward port branch saas-14 up to 1929448412 2018-10-03 12:15:33 +02:00
Christophe Simonis 1929448412 [MERGE] forward port branch 10.0 up to 695050dd10 2018-10-03 12:14:41 +02:00
Nicolas Martinelli 695050dd10 [FIX] sale_crm: quotes count
- Create a SO from an opportunity, keep the status draft
  => the 'Quote(s)' number is 1 on the opportunity
- Confirm the SO

The 'Quote(s)' number is 0 on the opportunity, but when clicking on the
stat button 1 quote is displayed.

The `search_default_draft` (and the `search_default_sales` of the Orders
stat button) are not working since the action doesn't use the
appropriate search view.

opw-1888442
2018-10-02 12:13:52 +02:00
Goffin Simon 73b4abfcbc [FIX] sale_mrp: Updating delivered qty
Steps to reproduce the bug:

- Create three stockable products: Kit, C1 and C2
- Create a phantom BOM for Kit with C1 and C2 as components
- Set the invoicing policy of the kit based on delivered qty
- Create an SO for the kit and validate it
- On the delivery order, just deliver C1 and create a backorder for C2
- Cancel the backorder and duplicate it
- Deliver the duplicated backorder and validate it

Bug:

The delivered qty on the SO line has not been updated to 1.

opw:1886315
2018-10-02 11:19:55 +02:00
Goffin Simon e764739d0d [FIX] sale_mrp: price unit of kit
- Create the following products in FIFO costing method and real-time
  valuation:
  Prod Final (F); Invoiced on Delivered Quantity
  Prod Comp1 (C1); Cost = 20
  Prod Comp2 (C2); Cost = 10
- Create the BOM Kit for F:
  2 Unit(s) of C1
  1 Unit(s) of C2
- Create a SO for 3 Unit(s) of F
- Validate SO and picking
- Create the invoice and validate

The price unit taken into account for F in the anglo-saxon accounting
entry is:
20 + 10 = 30
=> entry in Stock Output Account is 3 * 30 = 90

while it should be:
(2 * 20) + (1 * 10) = 50
=> entry in Stock Output Account is 3 * 50 = 150

This should finally fix issues corrected with:
9a7ed7c: price unit multiplied by the qty sold (*)
f1fdb97: price unit taking into account only 1 unit of each
component

(*) In the use case solved, the price unit was:
(6 * 20) + (3 * 10) = 150
=> entry in Stock Output Account is 3 * 150 = 450

opw:1886216
2018-10-01 14:05:58 +02:00
Christophe Simonis 57e387b645 [FIX] stock: correct quant view
Oversight of previous forward-port.
Revert 0b81117295.
2018-10-01 12:03:48 +02:00
Christophe Simonis 998723b909 [MERGE] forward port branch saas-11.3 up to e980af9df0 2018-10-01 11:27:51 +02:00
Christophe Simonis e980af9df0 [MERGE] forward port branch 11.0 up to a9a556178d 2018-10-01 10:44:38 +02:00
celm1990 0105e02fa7 [FIX] account: incorrect use of translation system
Cf https://www.odoo.com/documentation/11.0/reference/guidelines.html#use-translation-method-correctly
2018-10-01 10:08:45 +02:00
Lucas Perais (lpe) cbff00a5d2 [FIX] base_vat_autocomplete: support overload street fields
Install base_vat_autocomplete and base_address_extended.
Try to create a contact with VAT: BE0477472701 (or any valid one)

Before this commit, there was a traceback because the split of the address string into fields
contained a field that is set in base_adress_extended, and not handled by the current module

After this commit, there is no traceback

OPW 1887288
closes #27291
2018-10-01 09:35:51 +02:00
Lucas Perais (lpe) 1bd7adcc8b [FIX] web: debug_manager set defaults
On a form view, click on set defaults, select a value for a field,
then save

Before this commit, there was a traceback because the model on which we apply
the defaults was not found

After this commit, it works as expected

OPW 1887032
OPW 1888715

closes #27148
2018-10-01 09:31:15 +02:00
Odoo Translation Bot 62ab7eb88b [I18N] Update translation terms from Transifex 2018-09-30 07:02:39 +02:00
Odoo Translation Bot 0a94a766e6 [I18N] Update translation terms from Transifex 2018-09-30 00:29:10 +02:00
Christophe Simonis 88fa382664 [MERGE] forward port branch saas-14 up to 503c7a3d65 2018-09-28 19:14:45 +02:00
Christophe Simonis 503c7a3d65 [MERGE] forward port branch 10.0 up to baf3c5712d 2018-09-28 19:10:04 +02:00
Christophe Simonis baf3c5712d [MERGE] forward port branch 9.0 up to 70028701b3 2018-09-28 18:06:03 +02:00
eco-odoo feb792d1cf [FIX] account_budget: allow saving multiple budget lines
The constraint did not take into account the possibility of adding
multiple budget lines at the same time.
2018-09-28 15:31:35 +02:00
Martin Trigaux 21f8ee0119 [FIX] account: fallback for entries with no name
The name of an account.move.line is not mandatory
If a line with no name but analytic tags is posted, the name for the analytic
line should be computed differently (the name of an anlytic line is required).

Apply changes from f2b2d87236 to the _prepare_analytic_distribution_line method

Fixes #27281
2018-09-28 14:55:13 +02:00
Gustavo Valverde a9a556178d [FIX] stock_account: Use product display_name in errors
When working with product variants, if the error which gets displayed does not include the product attributes, it's harder to identify the variant with the error.

closes odoo/odoo#27298
2018-09-28 12:38:34 +00:00
Christophe Simonis 56658ad8de [MERGE] forward port branch saas-15 up to 88fa382664 2018-09-28 19:17:24 +02:00
Gert Pellin 1b5f2ac420 [FIX] hw_scale: read values from Adam scale
with migration from python2 to python3 not all regexes where converted
to byte-array.

backport of b4bcf86f8e to 11.0

closes odoo/odoo#27252
2018-09-28 13:21:56 +00: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
Nicolas Lempereur bedb3a1db0 [FIX] stock_account: visual ok product standard_price
The xml structure would display "$ 0.00Cost" instead of "Cost $ 0.00".

closes #27280
2018-09-28 12:31:41 +02:00
Olivier Colson 70028701b3 [IMP] l10n_lu: make 9.0 fix match the one done by mat in 11.5 2018-09-28 12:16:25 +02:00
Stefan Rijnhart 22cd49bafb [IMP] l10n_jp: reintroduce account 製品 with correct account code 2018-09-28 12:08:47 +02:00
Olivier Colson 7c9a3840f8 [FIX] l10n_jp: remove duplicate account code
Two account had the same account code. Because of that, one of them always failed to be created and logged a psql error. To fix that, we totally remove this account, as it never got created anyway.
2018-09-28 10:38:01 +02:00
Olivier Colson 51b7168d1b [FIX] l10n_lu: rename duplicate tax xml id
The second tax with the same xml id was never created, and caused a psql error to be logged.
2018-09-28 10:30:58 +02:00
Christophe Simonis 5d4ae94f4d [MERGE] forward port branch 11.0 up to d61a248523 2018-09-27 14:59:50 +02:00
Martin GeubelleandAaron Bohy f4b2060af5 [FIX] web: handle lazy load with previous actions
Before this rev. the lazy loading of views was correctly handled if there was
only one action in the action stack (which is usually the case when performing a
F5, the main use case of the view lazy loading).

Nevertheless, it might happen that the lazy-loading is used in top of other
actions (when performing a `doAction` with a form view for an action with
another view as first view, i.e. when leaving Studio while editing the form view).
The controller was `unshift` in the case (put in the first position of the
controller stack), which is not correct.

This causes the breadcrumb to be misordered and a traceback occured when trying
to access a breadcrumb element.

Co-authored-by: Aaron Bohy <aab@odoo.com>
2018-09-27 12:34:04 +02:00
len-odoo 2a697f1c5b [FIX] document: update environment before attachments update
Fine-tuning of commit:
b3a3ad8099
ac1e187eea

The environment should be updated before the call to _updateAttachments,
as it depends on the env active_id.

opw 1888651

closes odoo/odoo#27277
2018-09-27 10:11:12 +00:00
Xavier Morel 8eb8495710 [FIX] doc: backport of ac37ca39e
github_link compatibility with Sphinx 1.8

Backport to 11.0
2018-09-28 12:23:41 +02:00
Martin Trigaux b18a4cba0e [CLA] Inspur signs Odoo CCLA
Done at opw-1889259
2018-09-28 11:55:10 +02:00
Martin Trigaux cf50388d10 [FIX] product: correct bad translation
Already fixed on Transifex but saas-11.3 is no longer translated
opw-1888807
2018-09-27 11:17:43 +02:00
Christophe Simonis 5f08d82bcd [MERGE] forward port branch 11.0 up to fd122aec52 2018-09-26 19:37:29 +02:00
len-odoo fd122aec52 [FIX] website: fix image carousel
We fix a number of problems:
    - grayscale filter not being applied except on desktop Firefox
    - incorrect vertical-align on iOS
    - image sliders being displayed below the margin on iOS
    - carousel indicators flickering at initial load
    - very short indicator panel, almost unusable on mobile
    - misaligned indicators because of first margin
There are two modes on which these fixes apply:
    - image gallery in slideshow
    - slideshow in modal
       (e.g. obtained by clicking on the gallery set on masonry mode)
Note that due to a refactoring, the gallerySlider was not loaded in the modal,
completely breaking the indicators.

Coauthored by @nle-odoo

opw 1874274

closes odoo/odoo#27226
2018-09-26 14:14:14 +00:00
Christophe Simonis a0d832efdc [MERGE] forward port branch saas-14 up to 218eec5482 2018-09-26 12:09:18 +02:00
Christophe Simonis 218eec5482 [MERGE] forward port branch 10.0 up to 854eb97b2e 2018-09-26 11:28:33 +02:00
len-odoo 09340bb7f0 [FIX] mail: set the thread_id when creating a new thread
After a refactoring for v11, the id of a newly created thread is not returned
anymore.
Therefore server actions weren't being executed on newly created records.

opw 1886383

closes odoo/odoo#27238
2018-09-26 08:36:14 +00:00
Christophe Simonis 854eb97b2e [MERGE] forward port branch 9.0 up to bc14f30ecc 2018-09-26 10:17:05 +02:00
Nicolas Martinelli 7b13888c8e [FIX] mrp: Cost & Structure
- Create the following BOM for 100 Units of A:
   15.0 kg of C1
    1.0 kg of C2
  500.0 g  of C3
- Click on 'Cost & Structure'

The quantities and costs of 100 Units are used for 1 Unit.

opw-1886959
2018-09-26 09:27:47 +02:00
Nicolas Martinelli a6bf3ef7d8 [FIX] point_of_sale: AccessError
Missing `sudo` which prevents a non-admin to close a POS session.

opw-1888252
opw-1888358
2018-09-26 08:05:29 +02:00