Commit Graph
112100 Commits
Author SHA1 Message Date
Christophe Matthieu 4f5fc6ee55 [FIX] web: properly set parent when using mixins
The parentedMixin doesn't automatically set the parent, so when this mixin
is used, the parent must be set manually. This wasn't done at several places,
and thus those elements weren't destroyed with their actual parent.

In master, we should probably make the ParentedMixin set the parent itself.
2018-02-08 15:45:30 +01:00
Christophe Matthieu 83795d37f3 [FIX] web: Views: always destroy BasicModel instances
Before this rev., it might happen that the parent of BasicModel instances
wasn't correctly set to the Controller instance. It was actually set to the
ActionManager instance, which is never destroyed. So when this happened,
the BasicModel instance wasn't destroyed when it's controller was.
2018-02-08 15:45:30 +01:00
Christophe Simonis 23752102a0 [MERGE] forward port branch saas-15 up to 830327c66a 2018-02-07 15:18:07 +01:00
Christophe Simonis 830327c66a [MERGE] forward port branch saas-14 up to af8de1a3ed 2018-02-07 14:55:37 +01:00
Christophe Simonis af8de1a3ed [MERGE] forward port branch 10.0 up to 66e76d681d 2018-02-07 14:29:24 +01:00
Romain Derie 66e76d681d [FIX] payment_stripe: integer currencies (portal payment)
Before this commit:
On portal (My Account > Invoices > Pay Now), a stripe payment in a normal
currency (eg: a non integer currency) would debit the amount *100.
This comes from b335ae0348 which added a workflow to handle integer
currencies but it also sent the *100 amount to /website_payment/transaction
that would create a TX with that amount instead of the normal amount.

Now, the normal amount is correctly sent to the backend, the multiplied amount
is just sent to StripeCheckout handler to correctly display the amount on the
popup after clicking on "Pay Now".

Note: the amount will be multiplied on the backend independently ecda057e11
2018-02-07 13:59:33 +01:00
Christophe Simonis ae3643ba2a [MERGE] forward port branch 10.0 up to a93a9d43e6 2018-02-07 13:34:03 +01:00
qsm-odoo a93a9d43e6 [FIX] website: allow "Customize theme" when CDN option enabled
Traceback because the `_get_asset` function was called by the
`theme_customize` route without the `values` argument (which is not
necessary for the feature).

Closes https://github.com/odoo/odoo/issues/22516
2018-02-07 12:50:28 +01:00
Christophe Simonis 7f153c021a [MERGE] forward port branch 9.0 up to 80f88ad63b 2018-02-07 12:32:32 +01:00
celm1990 80f88ad63b [FIX] point_of_sale: unmark order finalized when invoice failed
When we validate an order that need to be invoiced, and the customer is
not set, you have to enter a customer, but your order is finalized so
you have a traceback saying it cannot be modified when you try to set
the customer.

When the invoicing fails, we don't set the order as finalized.
2018-02-07 11:00:48 +01:00
Martin Trigaux 34d2765faa [FIX] crm: allow to unlink multiple records
Closes #22647
2018-02-06 20:12:37 +05:30
Miquel Raïch d219963192 [FIX] purchase_mrp: correct manifest
Title underline was too shat, making the rendering crash

Closes #21756
2018-02-06 12:46:19 +05:30
Wolfgang Taferner 90ab699d90 [CLA] WT-IO-IT GmbH signature of Corporate CLA
Closes #22825
2018-02-06 12:43:23 +05:30
Géry Debongnie a98beb13db [FIX] web_editor: correct check of 'rules' property
see issue #22517
2018-02-05 20:24:23 +01:00
remi-filament 160ddc8567 [FIX] web_editor: correct check of property 'rules'
Port of PR #22603 from v9 to v10
See Issue #22517

 (#22679)
2018-02-05 20:21:45 +01:00
Christophe Simonis b503e79722 [MERGE] forward port branch saas-15 up to 81003c82e0 2018-02-05 13:08:32 +01:00
Christophe Simonis 81003c82e0 [MERGE] forward port branch saas-14 up to f22cf5f711 2018-02-05 12:36:48 +01:00
Christophe Simonis f22cf5f711 [MERGE] forward port branch 10.0 up to e5f2e6d390 2018-02-05 12:02:02 +01:00
Christophe Simonis e5f2e6d390 [MERGE] forward port branch 9.0 up to b08185fc66 2018-02-05 11:30:42 +01:00
Odoo Translation Bot df1accbf53 [I18N] Update translation terms from Transifex 2018-02-04 00:48:03 +01:00
Nicolas Lempereur b08185fc66 [FIX] product: can't search attribute value
A name_search on attribute line would possibly ends up with a domain like:

 ['|', ('attribute_id', '=', 'm'), ('value_ids', '=', 'm'),
  ('attribute_id', '=', 'm')]

which would just search the attribute.

This is caused by calling the default name_search. This commit forgo
the default name_search when we are in this attribute line special case.

courtesy-of: @fmdl

opw-813505
closes #22619
closes #22760
2018-02-02 17:13:14 +01:00
Swapnesh Shah 2c6cb479d3 [FIX] calendar: added missing float_time widget in calendar tree view
This commit closes #22546
2018-02-02 16:35:54 +01:00
Christophe Simonis dc8698132a [IMP] odoo shell: set expected __name__ for scripts read from stdin
Name of scripts piped to `odoo shell` were `__builtin__` (`builtins` in
python3), which is not really obvious (and awful if your script must
handle python2 and python3).

Change it to `__main__`, allowing to use to common pattern
`if __name__ == '__main__':`
2018-02-02 13:36:32 +01:00
Nicolas Martinelli dccdff2539 [FIX] purchase: purchase kit product
The issue solved with 24eee9d7ba was introduced back with
7333f5e9b8.

opw-808056
2018-02-02 13:26:45 +01:00
Lucas Perais (lpe) 03d50e5f2a [FIX] pad: push HTML to the pad server by default
Before this commit, when duplicating a task,
the pad of the original one was updated with plain text
Hence losing all the layout.

This was because, in all likelihood, Odoo's Etherpad server did not support pushing HTML

At the time of the commit, Odoo's pads can receive HTML.
We then push HTML by default, falling back to pushing text as before
if necessary

OPW 806064
2018-02-02 13:24:53 +01:00
qsm-odoo 76665df0cf [FIX] website_forum: allow portal users to post replies to replies
Before this commit, when connected as a portal user, the user was not
able to post replies to existing replies. This is because the textarea
section was marked to be displayed for connected internal users only.
This commit removes the whole group restriction. Indeed, it makes sense
(as a fix), to show the textarea section for public users too. Indeed,
the "Reply" button is already shown to public users but does not do
anything. With this commit, clicking the "Reply" button shows the
textarea section for everybody and, if the user is not connected,
redirects to the login page when posting the message. This of course
needs usability improvements in master.

Note: the problem had originally been fixed for regular answers with
commit https://github.com/odoo/odoo/commit/b81b03c82d282dc94595a9beb94444041509ef25

Note 2: both mentioned problems were originally introduced by commit
https://github.com/odoo/odoo/commit/9069d0127c176317436b67b23ae5677dd9d53de7

Closes https://github.com/odoo/odoo/issues/22648
2018-02-02 11:04:31 +01:00
Nicolas Martinelli 1b1978eec1 [FIX] account: default taxes
Use `ir.values` for default taxes. Stop using `ir.config_parameter`. The
logic is made in order to be as error-proof as possible.

Backport of a9ede7fdfa

opw-807226
2018-02-02 09:59:59 +01:00
Christophe Simonis bf9024abcb [FIX] web: correctly forward-port 695bd75a13
Match implementation of original backport
2018-02-01 17:05:28 +01:00
Christophe Simonis 920aa6174c [MERGE] forward port branch saas-15 up to e0422bfd6c 2018-02-01 16:40:13 +01:00
Christophe Simonis e0422bfd6c [MERGE] forward port branch saas-14 up to 7d465aa56c 2018-02-01 15:39:39 +01:00
Christophe Simonis 7d465aa56c [MERGE] forward port branch 10.0 up to 4c9bf7faae 2018-02-01 14:16:50 +01:00
Christophe Simonis 4c9bf7faae [MERGE] forward port branch 9.0 up to cbaecc5cbb 2018-02-01 12:13:51 +01:00
Nicolas Lempereur 2014fabfba [FIX] web_editor: firefox editor hidden mass mail
When saving a modified mass mailing, the editor will do a number of
things to improve the mail readability accross mail client.

One of those is replacing font awesome icons by image, but firefox acts
differently than other browser. On a display:none iframe, doing
.css('color') or .height() on an element returns respectively
`undefined` and 0.

This caused an error when getting the color that we could solve by
doing a fallback for firefox like this:

 window.parent.getComputedStyle($font[0]).color

But to get the height() of an element, it seems we always need the
iframe displayed.

With this change, when the iframe is hidden and the browser is firefox,
the code try to display the iframe (with "visibility:hidden;height:1px")
when this part of the code happen.

note: backport of 10.0 13c326caaa

opw-807180
closes #22701
2018-02-01 11:40:42 +01:00
Goffin Simon 695bd75a13 [FIX] web: invalid domain in DomainSelector
Backport of this commit: c13c9e0b5c
Steps to reproduce the bug:

- install application MRP Maintenance
- open maintenance request form view, and from top right corner click Studio icon
- click on Equipment field while you are still in studio interface
- It will show left side studio panel, click Domain box and it will throw an error

opw:813594
2018-02-01 10:31:14 +01:00
Nicolas Martinelli eeebd4ad85 [FIX] web: kanban containment
Set up the following kanban columns:

| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 | F |
|       |       |       |       |       |  Card |   |

<------- Screen width ---------->

Col x are unfolded columns.
F is a folded colum.

Moving the Card from Col 6 to F is impossible: the card won't go 'out of
the screen' on the right, which prevents its center to reach F.

Commit 5ba6d93810 deactivates the drag & drop on read-only fields.
In order to restrict the kanban cards displacements, the `containment`
attribute is used to either restrict the displacement:
- in `o_kanban_view` if draggable
- in the parent if not (to allow the resequence)

The class `o_kanban_view` is too restrictive: when movind the card to
the folded column F, the card must go out of `o_kanban_view`.

opw-803929
2018-02-01 10:12:46 +01:00
Jeremy Kersten e15a7b4c65 [FIX] http: JsonRequest return code error as status code
+ Manage 404 error, avoiding tb in log and respecting status code
in response request.
2018-02-01 09:47:25 +01:00
Odoo Translation Bot cbaecc5cbb [I18N] Update translation terms from Transifex 2018-02-01 02:40:21 +01:00
Nicolas Lempereur 13c326caaa [FIX] web_editor: firefox editor hidden mass mail
When saving a modified mass mailing, the editor will do a number of
things to improve the mail readability accross mail client.

One of those is replacing font awesome icons by image, but firefox acts
differently than other browser. On a display:none iframe, doing
.css('color') or .height() on an element returns respectively
`undefined` and 0.

This caused an error when getting the color that we could solve by
doing a fallback for firefox like this:

 window.parent.getComputedStyle($font[0]).color

But to get the height() of an element, it seems we always need the
iframe displayed.

With this change, when the iframe is hidden and the browser is firefox,
the code try to display the iframe (with "visibility:hidden;height:1px")
when this part of the code happen.

opw-807180
closes #22639
2018-01-31 15:17:37 +01:00
Nicolas Martinelli 513fad42a0 [FIX] barcodes: delay between keys
In order to detect if a barcode scanner is being used, we detect the
delay between keypresses. The value is hardcoded to 55 ms. However, in
the case of a bluetooth scanner, this delay is often not enough,
resulting in an incorrect capture of the barcode.

We add the config parameter `barcode.max_time_between_keys_in_ms` which
allows the user to fine tune this delay for his hardware.

opw-806398
2018-01-31 13:47:17 +01:00
qsm-odoo d295b4360d [FIX] website_sale: properly switch images when selecting a variant
When using product variants, the product page shows:
- The product variant if different from the product image
- The product image
- Extra product images

The product variant image has to be switched dynamically when the user
choose another variant. This was broken with commit https://github.com/odoo/odoo/commit/f98bb2b86bb7c3ff0a549f24b31616c1539420a7
Indeed, it was switching the product image with the product image
variant instead.

This was because the variant/template order changed without switching
their classes. This commit changes their order again.

Also see opw-784737
2018-01-31 10:59:19 +01:00
adekock11 9dce2be273 [FIX] mail: display notification when explicitly grant it
Instead of looking for the "denied" permission, rather look for the "granted"
since there are three permissions: "default", "denied", "granted" - only
"granted" counts toward permission actually being granted

Closes #22633
2018-01-31 10:44:00 +01:00
moutio 8c941cbfb1 [CLA] signature for MouTio
Done at #22605
2018-01-31 09:56:58 +01:00
Nicolas Martinelli 93c4c5cfb1 [FIX] mrp: multi-company bom find
- Create 2 companies A & B
- Create a product P with 2 phantom BOMs:
  Component C1 for company A, with sequence = 10
  Component C2 for company B, with sequence = 0
- Create a SO in company A for P, validate

The picking contains C2, while one would expect C1 since C2 is only for
company B.

opw-807640
2018-01-30 15:20:17 +01:00
Goffin Simon 110613b2cc [FIX] l10n_in_hr_payroll: Error printing payslip details
Programming error

opw:803169
2018-01-29 15:14:50 +01:00
Nicolas Martinelli 5c5098f740 [FIX] stock: performance issue inventory at date
On a production database with ~10000 products and multiple stock
locations, uunning the 'Inventory at date' tales ~50 minutes. Most of
the time is spent in the loop populating `group_lines` thanks to
multiple search queries.

We get rid of this loop by selecting the stock history lines and making
the match between these lines and the `read_group` result manually. On
the reference database, the duration falls to ~30 seconds.

Based on preliminary work by amoyaux

opw-803460
2018-01-29 13:58:18 +01:00
Nicolas Lempereur 5b230c34cb [FIX] web: noshow list view aggregates w/ currency
In df69b5bb the aggregates of a column with currency was shown only if
records were of the same currency when a grouping was closed.

But when the list view is grouped, this would cause a number of issue:

- error if with first grouping is opened, another one is closed
- if the first grouping was closed aggregates were always shown
- the code only acts when closing a grouping
- aggregates could be shown when they should not
- aggregates could be not shown when they should

So this commit change things so this feature is ignored when the list
view is grouped.

There is also a fix so `currency_field` of the column is used instead of
just using `currency_id` that may be wrong.

note: only for saas-14 and saas-15 (feature is not present in saas-16)

opw-810835
closes #22598
2018-01-29 13:37:22 +01:00
Christophe Simonis 0b188b5804 [MERGE] forward port branch saas-15 up to 2629029d03 2018-01-29 13:29:14 +01:00
Christophe Simonis 2629029d03 [MERGE] forward port branch saas-14 up to 8b8f04e14c 2018-01-29 13:28:18 +01:00
Christophe Simonis 8b8f04e14c [MERGE] forward port branch 10.0 up to 6d682cea25 2018-01-29 13:27:28 +01:00
tbe-odoo 6d682cea25 [REV] http: Implicit session deactivation -> Explicit destruction
- This commit degrade the performance and introduce a bug for multiple database servers.

This reverts commit bc69b47073.
2018-01-29 13:25:21 +01:00