Commit Graph
114727 Commits
Author SHA1 Message Date
Nicolas Martinelli ad9edfc2dd [FIX] payment_stripe: missing route
In case an invoice is required to be paid thanks to the route
'/my/invoices/', the user is redirected to '/shop/payment/transaction/'.
If website_sale is not installed, this causes a crash.

Complement of 2bd17285ea

opw-813481
2018-02-02 09:17:30 +01:00
Nicolas Martinelli 4df087b24d [FIX] payment_stripe: incorrect route
The route should contain the SO id, not the acquier id.
2018-02-02 09:17:30 +01:00
Nicolas Martinelli ecfcaea080 [FIX] payment_stripe: correctly handle error
If there is an error, we should handle it first. Otherwise, some keys might
not be found in the results (e.g. 'object' or type') and cause a crash.
2018-02-02 09:17:30 +01:00
Christophe Simonis f5e7b86686 [MERGE] forward port branch saas-16 up to 920aa6174c 2018-02-01 17:02:19 +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
Jeremy Kersten 942b9d1a3c [FIX] payment_sips: allow to customize key_version
Some sips provider don't use 2 as key_version.
E.g. mercanet uses '1' as production key.

Now we allow to override it in Ir Config Parameter for stable version.

Todo:
Need to make it customizable by end user into the configuration of acquirer.

Courtesy of BEK for reporting
2018-02-01 14:14:15 +01:00
Jeremy Kersten 70d638b690 [FIX] website: let the 404 exception catch by _handleException
Don't rewrite the wheel with serve_404.
It is the job of HandleException to do it.

In the same time, that will fix the status code that was
previously 200 instead of 404 in serve_404

This commit closes #22438
2018-02-01 14:13:32 +01:00
Jeremy Kersten 8b8de59122 [FIX] http_routing: raise NotFound when ModelConverter don't match
Before this commit, if you call a route with an missing ID, you
see an internal error 500 "Record not existing" (MissingError)

It has been intriduced by commit 9dc173cc2e

Now we catch the missing Error and return explicitely a 404 exception.
2018-02-01 14:13:32 +01:00
Jeremy Kersten 8a1cb4758d [FIX] web_editor: avoid useless 404 during test
removeSrcAttribute should avoid these rpc, but for some
unknown reasons, on firefox it works but not with chrome.

Because the purpose of the test is to check the url and
not the content, that works to use an existing route.

Courtesy of @kangol for the fix
2018-02-01 14:13:32 +01:00
Nicolas Lempereur 5af1223878 [FIX] web_editor: xml editor first level not shown
There is a slight visual inconsistency since: 9af8d5e6 the xml/less
editor for first level of descendants were just prefixed by an invisible
space.

opw-807624
closes #22704
2018-02-01 14:00:06 +01:00
Lucas Perais (lpe) 9fa597c7ec [FIX] web: sequence handlers on modal's one2many list
From a form view (say Bill of materials)
Edit the form
Click on a bom line
Click on the external button that makes the product form pop up
change the order of suppliers on that product

Before this commit, a JS traceback was raised
This was because the changing object was not present in the localData that the Model object holds
or more accurately, it was not the **right** model object that was targetted
and this was due to the propagation of the resequence event

After this commit, no error is thrown, and the resequencing works as expected

OPW 807196
2018-02-01 13:53:52 +01:00
Christophe Simonis 4c9bf7faae [MERGE] forward port branch 9.0 up to cbaecc5cbb 2018-02-01 12:13:51 +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
Lucas Perais (lpe) e6cccbf441 [FIX] web: less boolean_toogle
Before this commit, the boolean_toggle widget was rendered
but the less contained errors that prevented it from displaying correctly
This was due to commit 9dead7e3d3

After this commit, the widget displays correctly

There might be an issue in the future because of
field_utils.formatBoolean, when this function decides to pass the full options dict

OPW 80782
2018-02-01 09:32:46 +01:00
Swapnesh Shah c9ef5742bb [FIX] stock: scheduled date required
The field `scheduled_date` on `stock.picking` is used to set the field
`date_expected` on `stock.move`. Since `date_expected` is required, we
should make `scheduled_date` required as well.

Closes #22684
2018-02-01 08:44:48 +01:00
Odoo Translation Bot cbaecc5cbb [I18N] Update translation terms from Transifex 2018-02-01 02:40:21 +01:00
Tomas Alvarez 1d4a75d930 [CLA] add tomeyro to Vauxoo's CLA
Done at #21952
2018-01-31 17:00:01 +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
Christophe Simonis 373c0c2e57 [FIX] base: allow server actions to en/decode base64
This is usefull when dealing with binary fields.
This was possible in previous versions in python 2 using
`str.encode('base64')`.
2018-01-31 15:00:25 +01:00
Nicolas Martinelli a4c7481f24 [FIX] web: auto-refresh of time
When a TZ mismatch is detected, the datetime value is displayed in the
widget. However, on MacOS, this forces the dropdown list to close at
each refresh of the value, which occurs every second.

The refresh interval is set to 1 minute in case of MacOS.

opw-804035
2018-01-31 14:40:23 +01:00
Nicolas Martinelli b97b6de12c [FIX] mrp: incorrect help
The help is completely incorrect and misleading.

opw-807178
2018-01-31 14:30:26 +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
Nguyen Tan Phuc 00a10fdd00 [FIX] point_of_sale : wrong currency decimals
To have the same behavior as `_compute_decimal_places` in python
When setting rounding of currency > 10, POS will get negative decimals
instead value 0 and crash

Closes #22199
2018-01-31 11:45:31 +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
kaberer c07f78db17 [CLA] signature for kaberer
Done at #22641
2018-01-31 09:56:15 +01:00
Lucas Perais (lpe) 8b97a39907 [FIX] mail_template: replace local links except mailto
Before this commit, all the mailto:xx@ww.com in emails were transformed into
http://web.base.url/xx@ww.com

This was due to the url parsing of werkzeug urls.py, which definitely get the scheme
(mailto), but doesn't get the netloc of the url -- because it has no //

Ater this commit, we transform links to local ones, except if the scheme is mailto,
and the issue disappears.

OPW 807795
2018-01-31 09:20:13 +01:00
Nicolas Martinelli c52b18e65f [FIX] account_check_printing: multiple partners
- Create a bill for partner A of an amount X
- Create a bill for partner B of an amount Y
- Validate both bills
- Select both and register a payment by check.

Two payments are created with the same amount in words: X + Y.

In this specific case, we recompute the amount in words automatically.

opw-805842
2018-01-31 09:14:57 +01:00
RomainLibert a5cbf2105c [FIX] resource: _interval_and not working with disjoint intervals
When we pass two disjoint intervals the behaviour of _interval_and is a
little strange, it returns an interval wich begins after it finishes.
In order to fix that we return None when the intervals are disjoint.
2018-01-30 17:38:30 +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
Martin Trigaux ed54418d62 [FIX] maintenance: translate team name
If the name of a crm.team is translated, why not the one of a maintenance.team

opw-805838
2018-01-30 14:42:09 +01:00
Martin Trigaux 5ae494f2bb [FIX] stock: more flexible xpath
If you have stock installed before 0322f6e5 and try to install stock_account
today, the installation fails.

Should not rely on a field added after the stable freeze

Fixes #21823
opw-802767
2018-01-30 14:35:25 +01:00
Nicolas Lempereur 109ecd5205 [FIX] web_editor: firefox RTEWidget if hidden
It seems that firefox has some difference of behavior from other
browsers as said in:

- https://bugzilla.mozilla.org/show_bug.cgi?id=548397
- https://github.com/whatwg/html/issues/1813
- https://github.com/w3c/csswg-drafts/issues/571

It seems that at least in one instance (a html field hidden on the pos
configuration), firefox fails because of something similar:
window.getComputedStyle(element) returns `null` instead of the element
styles.

In my tests, using the parent window (possible if current frame and
parent have the same origin which should be the case) worked in this
instance, this is examplified by this jsfiddle:
 https://jsfiddle.net/Lpv898ve/2/

This work with window.parent and not using window directly.

So this commit adds fallback on doing getComputedStyle from the parent
window (when testing on chromium this gave exactly the same result that
before).

opw-813363
fixes #22211
closes #22610
2018-01-30 10:37:53 +01:00
Martin Trigaux 622b1d2370 [I18N] l10n_be_hr_payroll_fleet: export translation source terms
Will not be published on Transifex as for Belgium only

opw-805838
2018-01-30 09:39:08 +01:00
Nicolas Martinelli 14c6968224 [FIX] point_of_sale: data translation
- Create a product with name 'EN' in English and 'FR' in French
- Connect to the POS interface with a user having the French language
  set up.

The product name is loaded as 'EN' instead of 'FR'.

The language is missing from the context of the `search_read` calls.
Therefore, the product names (as well as categories, UOM...) are loaded
in the default language.

opw-805431
2018-01-30 08:53:58 +01:00
Martin Trigaux 76840643ad [I18N] sale: export source terms
Some where missing, followup of opw-805838
2018-01-29 16:30:47 +01:00
Martin Trigaux b0ce9ce8ca [FIX] hr: open in list view
This action was not working as the tree view has been removed
This feature was replaced by hr_org_chart module
Just display a list of the employee and subordinates

Fixes #20203
Fixes #22312
Fixes #22536
2018-01-29 16:26:21 +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
Olivier Colson 75857a2c34 [FIX] account: don't ignore default journal_id in payments' onchange on amount field
onchange function getting called when modifying the 'amount' field of account.payment always changed the journal of the payment when this amount was equal to zero. This caused a bug with batch deposits, when trying to create a new payment from the tree view contained in the form view of account.batch.deposit: passed default value for journal_id was ignored.
2018-01-29 14:42:36 +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 Martinelli 6a91ae0c18 [FIX] event: mail after event
Prevent sending emails that were scheduled before the event to be sent
after the end of the event.

opw-802973
2018-01-29 13:53:40 +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 9af65a7efe [MERGE] forward port branch saas-16 up to 0b188b5804 2018-01-29 13:37:12 +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