Commit Graph
118333 Commits
Author SHA1 Message Date
RomainLibert 2d8ba22b4e [FIX] hr_holidays: add a constraint on interval numbers
Before that commit we could ask for an accrual allocation of 0 hours
every 0 weeks for instance.
As it means nothing to ask for this, we add an sql constraint on these
fields and a default value of 1.
2018-07-03 17:19:00 +02:00
Christophe Simonis a0c5b58d5d [MERGE] forward port branch saas-11.3 up to 4846c30c90 2018-07-02 15:16:20 +02:00
Christophe Simonis 4846c30c90 [MERGE] forward port branch saas-11.2 up to 611c86dbc7 2018-07-02 15:02:48 +02:00
Romain Derie 683b0746be [FIX] sale_payment: Pay Now was always hidden in SO panel-heading
Since refactoring of account, payment and sale with commit 01216345 the
`Pay Now` button in the panel-heading of the SO in the portal was always hidden
except if there was a pending transaction.

The button should be visible when there is no transaction. In that case
`payment_tx_id` is an empty recordset, we can safely access its `state` field.

Closes #25529
2018-07-02 12:24:22 +02:00
Christophe Simonis 611c86dbc7 [MERGE] forward port branch 11.0 up to 21b2617d6f 2018-07-02 12:17:00 +02:00
Xavier Alt 21b2617d6f [FIX] account: show statement line info popover on reconciliation widget
This popover is the only way to get extra information like the note or the reference of the bank statement line.

Was PR #25543
2018-07-02 09:40:45 +02:00
Goffin Simon 2ab3fa86fe [FIX] mrp: Adding a stock move line when creating a raw material
In stock.move.lots.form view, the field product_uom must be readonly like
the field product_uom_qty.

When creating a raw material, it was not possible to add a stock move line
with a finished product for a product which is not tracked.

The consumed field must be readonly in mrp_production_form_view view to avoid
to send to the server wrong value manually set.

opw:1861321
2018-07-02 07:32:15 +02:00
Odoo Translation Bot 703c64bb53 [I18N] Update translation terms from Transifex 2018-07-01 07:13:39 +02:00
Odoo Translation Bot 5316406ad7 [I18N] Update translation terms from Transifex 2018-07-01 04:09:17 +02:00
Christophe Simonis 4d0a1330e0 [MERGE] forward port branch saas-15 up to ce84bacd72 2018-06-29 18:39:03 +02:00
Christophe Simonis ce84bacd72 [FIX] event: remove access right to gone model 2018-06-29 16:33:37 +02:00
Christophe Simonis 6e24b5b5e3 [MERGE] forward port branch saas-14 up to e338542f93 2018-06-29 15:29:48 +02:00
Christophe Simonis e338542f93 [MERGE] forward port branch 10.0 up to 58c70226b7 2018-06-29 14:32:03 +02:00
Christophe Simonis 58c70226b7 [MERGE] forward port branch 9.0 up to 4ca9ee2548 2018-06-29 13:50:31 +02:00
Martin Trigaux 13f02f2c0a Revert "[FIX] mail: Render mail in the template language"
This reverts commit 5a0dcd3c20.

Same as 6ad6df59b5
Was mistakly merged, should not be integrated into stable
2018-06-29 13:02:16 +02:00
Alexandre Kühn 5dcfb30fb3 [FIX] mail: no crash on opening messaging menu after receiving a needaction message
Revision on https://github.com/odoo/odoo/commit/299ebb2cdf63de2e3967da0d2f3e7effd239812b
    [IMP] mail: add moderation on channels

The commit above adds moderated channel. When a message is pending moderation,
it is not yet linked to the channel server-side, which is why there is a hack
to set `channel_ids` on the client side so that the message is visible on the
corresponding channel (only for author of message and moderator of channel).

It is only when the message is accepted that this message is linked to the
correct `channel_ids`. The server provides the updated list of channels that
this message is linked to, but it misses static channels that only make sense
on the client-side, such as "Inbox" or "Starred".

This commit solves the issue by only extending the list of channel registered
on the message when it is accepted, so that static channels are not unlinked
from the message.

Note that it is necessary to update `channel_ids` of the message,
because there could be "relay" channels. In other words, when the moderated
message is accepted, there could be more channels that contain this message.
2018-06-29 12:57:05 +02:00
Christophe Simonis d54a3726ec [FIX] account: correct test after e095733a3a
Since e095733a3a, Aged Report is not
inclusive, we should then get report for a day after the bank statement.
2018-06-29 11:40:01 +02:00
Martin Trigaux 6ad6df59b5 Revert "[IMP] mail: Subject and body readonly if mass_x composition_mode"
This reverts commit 2774e3b4a8.

Wrong manipulation of the "merge button"
The fix was already merged at 5a0dcd3c2
2018-06-29 10:39:46 +02:00
Nicolas Martinelli 8643175d00 [FIX] website_sale_wishlist: prevent adding to cart
Extension of commit c4f5b9f751

Instead of disabling only the button on which the user has clicked, we
disable all 'Add to Cart' buttons until the end of the transaction.

Closes #24853
opw-1858080
2018-06-29 10:39:41 +02:00
Martin Trigaux 4ca9ee2548 [FIX] google_calendar: backport 052bc38805 to 9.0
Backport following opw-1851612

[FIX] google_calendar: do not create an event with an invalid id

The id is useful to update existing events but sometimes we are getting some
ids that are not accepted by Google

Getting an error:
odoo.addons.google_account.models.google_service: Bad google request : {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid resource id value."
   }
  ],
  "code": 400,
  "message": "Invalid resource id value."
 }
}

Looks like existing events can have a _ in their id but new one, no longer.
It seems that these events are created by outlook calendar when synchronized
with Google Calendar.
2018-06-29 10:32:28 +02:00
Christophe Simonis c302a90b6e [FIX] resource: oversights of previous forward-port 2018-06-28 21:50:23 +02:00
Carlos Dauden 2774e3b4a8 [IMP] mail: Subject and body readonly if mass_x composition_mode 2018-06-28 21:06:32 +02:00
Nicolas Martinelli 5a0dcd3c20 [FIX] mail: Render mail in the template language
On an optimization done for not rendering each time the template, the possibility
of sending the template in the proper language when multiple recipients was lost.

This is being refactoring in master, but for this version, Odoo won't merge a
change in the behavior, although it's the correct one as in previous versions.

Extracted by pedrobaeza from https://gist.github.com/nim-odoo/8a9749037370343f05c7e6681324f576

(cherry picked from commit 386a936)
2018-06-28 21:06:32 +02:00
Christophe Simonis c8bb02141d [MERGE] forward port branch saas-11.3 up to 3cdcbce93c 2018-06-28 19:01:52 +02:00
Christophe Simonis 3cdcbce93c [FIX] im_support: make js tests pass 2018-06-28 17:00:37 +02:00
Swapnesh Shah ef0907d5b0 [fIX] stock: stock.move.line: write
When updating the reservation of an partially available or available
move line, use the current record of the loop and not the whole
recordset.

Closes #25445
2018-06-28 16:06:49 +02:00
Martin Trigaux c02fe10add [FIX] auth_signup: display meaningfull error message
Similar as 676022e3af for reset form
2018-06-28 15:56:16 +02:00
Nicolas Lempereur 8c250b73fa [FIX] account: batch deposit in reconcile uncut
The CSS of reconciliation highly uses `overflow: hidden` to hide
elements, but this cut the bottom part of the "Select a Batch Deposit"
list of deposits.

There is no possible overflow in this situation anyway, since in the
given circumstances the `max-height` is set to none.

opw-1859408
closes #25524
2018-06-28 13:57:53 +02:00
Nicolas Martinelli fa1f050218 [FIX] sale_stock: performance
In some undertermined circumstances, a `KeyError` might appear in:
https://github.com/odoo/odoo/blob/f9737d79e77e9abf634c8eaa4b6ea331e2aa814d/odoo/models.py#L4898-L4904

Despite the lack of reproducible use case, it seems that this was
introduced from 59b010ac36. In the meantime, other
optimizations were introduced in the prefetching of related fields, and
it seems that the fix is not necessary anymore.

Running the same script than described in
https://github.com/odoo/odoo/issues/19536#issuecomment-333118947 , we
observe the following performances:

Before the fix:
```
On change with 10 lines (10 new, 0 existing) took 0.306
On change with 20 lines (10 new, 10 existing) took 0.221
On change with 30 lines (10 new, 20 existing) took 0.208
On change with 40 lines (10 new, 30 existing) took 0.271
On change with 50 lines (10 new, 40 existing) took 0.306
On change with 60 lines (10 new, 50 existing) took 0.319
On change with 70 lines (10 new, 60 existing) took 0.354
On change with 80 lines (10 new, 70 existing) took 0.382
On change with 90 lines (10 new, 80 existing) took 0.506
On change with 100 lines (10 new, 90 existing) took 0.503
```

After the fix:
```
On change with 10 lines (10 new, 0 existing) took 0.238
On change with 20 lines (10 new, 10 existing) took 0.259
On change with 30 lines (10 new, 20 existing) took 0.250
On change with 40 lines (10 new, 30 existing) took 0.233
On change with 50 lines (10 new, 40 existing) took 0.287
On change with 60 lines (10 new, 50 existing) took 0.325
On change with 70 lines (10 new, 60 existing) took 0.345
On change with 80 lines (10 new, 70 existing) took 0.451
On change with 90 lines (10 new, 80 existing) took 0.496
On change with 100 lines (10 new, 90 existing) took 0.423
```

The fix doesn't seem to be necessary anymore, so we go back to the
previous implementation of the computed field.

Closes #25448
Fixes #19536
opw-1861468
2018-06-28 13:24:15 +02:00
Christophe Simonis 1bf8f685c4 [FIX] stock_landed_costs: avoid useless changes on UoM in tests 2018-06-28 13:17:15 +02:00
Christophe Simonis fc1789c40f [FIX] sale_mrp: avoid useless changes on UoM in tests 2018-06-28 11:35:10 +02:00
Christophe Simonis 2c4b555b95 [FIX] stock: use renamed xmlid in newly added test 2018-06-28 11:01:25 +02:00
Christophe Simonis b06af028e6 [MERGE] forward port branch saas-11.2 up to d112a163cd 2018-06-28 10:55:12 +02:00
Christophe Simonis d112a163cd [MERGE] forward port branch 11.0 up to f6d36d81f7 2018-06-28 10:32:03 +02:00
Géry Debongnie 6d0824b894 [FIX] base: properly render settings form view after reload
Before this commit, something strange could happen after reloading a
settings form view: all 'sections' were displayed.  The issue was caused
by the fact that the state of the view was read from the arch of the
form view at render time.  Also, as a form of optimization (I suppose), the
settings did not call the initModules method twice, when it rerenders.
This is unfortunate, because the very same method is actually
responsible for removing unused sections.

This fix is the safe fix, but definitely not the perfect fix (this would
involve a larger change, something like reading the state from the arch once in
the view (factory), then only rendering what is necessary).
2018-06-28 09:13:40 +02:00
Nicolas Lempereurandqsm-odoo f6d36d81f7 [FIX] mail: discuss smileys on several lines
In the discuss composer on google chrome, when when the smileys have
more width than available, they stayed on one line and would increase
page size (adding an horizontal scrollbar).

This happened really easily in saas-11.3 because we have more smileys,
but still happened in 11.0 depending on the screen size.

opw-1861191
closes #25507

Co-authored-by: qsm-odoo <qsm@odoo.com>
2018-06-28 09:05:36 +02:00
Nicolas Martinelli a0173bbbce [FIX] stock: fix test setup 2018-06-28 08:35:23 +02:00
Nicolas Martinelli 50a10fd736 [FIX] stock: search route name
opw-1862275
2018-06-28 08:16:31 +02:00
Christophe Simonis 9dcc32c304 [FIX] stock: avoid useless changes on UoM in tests setUp 2018-06-27 20:14:47 +02:00
Christophe Simonis d44a4df863 [FIX] stock: correctly check UoM and Locations modifications 2018-06-27 20:13:37 +02:00
Swapnesh Shah bb78b7608a [FIX] hr_payroll: prevents maximum recursion depth
When computing a salary sheet, a maximum recursion error could happen if there
is a cycle in the rules or in the categories.

Add constrains for salary rules and categories.

Closes #25405
2018-06-27 17:44:03 +02:00
Toufik Benjaa 29c00a56da [IMP] http: Sessions implicit deactivation
- Store a token inside sessions to allow implicit session deactivation when needed.

backport of @da1f153d61d747d9357694382fe04f96c0ca886a @c8243e71c6da37547a19f61c58f25d5d03e13d38
2018-06-27 16:39:45 +02:00
Nicolas Martinelli 10253a735f [FIX] sale: invoice template
- Activate the Sale option 'Tax-Included Prices'
- Create and print an invoice
  => the total is displayed on each line
- Activate the Sale option 'Sections on Sales Orders'
- Create and print an invoice
  => the total is NOT displayed on each line

The option 'Tax Display' only applies to SO, not to invoices. Moreover,
we make consistent the wording.

opw-1856623
2018-06-27 16:17:27 +02:00
Martin Trigaux c1b6cfaab8 [FIX] google_account: backport of c444b5a293
In this commit, our hero backport c444b5a293 to 9.0

[FIX] google_account: fix google request exception management

Error thrown by google request is an urllib2.HTTPError that can be read
and loaded in JSON. However in some cases the result of the read may
be void or not JSON-ready. This was causing a crash in the error
management and hid the actual issue.

This commit tries to read and JSON-load the error but fall back on
simply displaying the raw error in case of issue when handling it.

opw-1851612
2018-06-27 15:52:03 +02:00
Christophe Matthieu 39f0f5db77 [FIX] ir_qweb: send template options in context to the fields
Application of a fix more specific to the problem of the contact widget
which can not serialize the dictionary because it contains the values of
the context of which browse record. (because contact try to
json.dumps options for multi-edition feature in web_editor)

opw-1859848

https://github.com/odoo/odoo/commit/ab85e9594651fd33ffd2747f4d3c5b360e7c7922
2018-06-27 15:11:37 +02:00
Christophe Simonis f70a3167ee [FIX] stock: inherit from correct model
Oversight of previous forward-port
2018-06-27 15:00:59 +02:00
Christophe Simonis 40836194c2 [MERGE] forward port branch saas-11.2 up to 12ddec3a76 2018-06-27 13:41:00 +02:00
Goffin Simon 787a156f0d [FIX] purchase_requisition: origin and partner_ref erased by a requisition
Steps to reproduce the bug:

- Create a product P with routes MTO and BUY
- Set a vendor V on this product
- Create a BOM B with P
- Create a MO M with B
- A RFQ is created with M as origin
- Create a purchase requisition PR with vendor V
- Set PR as purchase agreement on the RFQ

Bug:

- The field origin with M was erased by the name of PR
- The field partner_ref was erased by the name of PR

The fix is inspired by: c914df5a36

opw:1860430
2018-06-27 13:30:09 +02:00
Nicolas Lempereur f52a5a7255 [FIX] base: print multi record report no outlines
In b446930dc there has been a number of changes in report to improve
performances.

In one of these change, printing several documents with result such as:

```
<div class="article"><h1><span data-oe-model="mymodel" data-oe-id="1" data-oe-field="myfield" /></h1></div>
<div class="article"><h1><span data-oe-model="mymodel" data-oe-id="3" data-oe-field="myfield" /></h1></div>
```

The system will know it is rendering 2 mymodel records (with IDs: 1, 3)
and will try from the document to determines what part (called
"outlines") of the PDF corresponds to these IDs.

This is done by splitting the document over semantical delimitations
such as h1, h2, *.

If all is fine: each part of the PDF will be saved for each record, so
if we print records 1 and 3 they will be saved separately and will be
possibly used as is the next time they are to be printed.

But in the instance of printing a report which has:

- field that are displayed,
- several records printed at the same time,
- save and getting document back from attachment enabled,
- no h1 or other semantic delimitation

The matching of part of PDF and outlines can't be done since there is no
outlines, this was not expected by the code and caused an error.

With this change, if there is no outline each part of the PDF will not
be saved as attachment.

opw-1856469
closes #25496
2018-06-27 13:21:13 +02:00
qsm-odoo 22c9d60ad3 [FIX] web_editor: properly save media dialog without any image
Commit https://github.com/odoo/odoo/commit/50418c481182cb414792da32f2a0529503e59f9c
was correctly forward-ported up to 11.0. This commit fixes the
forward-port from saas-11.2.
2018-06-27 12:42:44 +02:00