Commit Graph
126133 Commits
Author SHA1 Message Date
Nicolas Lempereur 8557bcfa30 [FIX] website: language prefixed URL on website bis
Reintroduces 5324284f5 that was reverted because in the case of an URL
like /payment_stripe/static/src/js/stripe.js directly inside a QWeb
template, we would possibly get:

  /fr_FR/payment_stripe/static/src/js/stripe.js

Which is not accepted by werkzeug SharedDataMiddleware we use to serve
static data in /{module_name}/static/ directories.

Added test without changeset failed with:

- test_process_att_no_request_lang: <AssertionError>
  line: self._test_att('/en_US/', {'href': '/'})
  wrong result: {'href': '/en_US/'}
- test_process_att_with_request_lang: <AssertionError>
  line: self._test_att('/', {'href': '/fr_FR/'})
  wrong result: {'href': '/'}
- test_process_att_matching_cdn_and_lang: <AssertionError>
  line: self._test_att('/en_US/a', {'href': 'http://test.cdn/a'})
  wrong result: {'href': 'http://test.cdn/en_US/a'}
- test_process_att_no_route: <AssertionError>
  line: self._test_att('/my-page', {'href': '/fr_FR/my-page'})
  wrong result: {'href': '/my-page'}
- test_process_att_url_crap: <IndexError: list index out of range>
  line: request.httprequest.app._log_call[-1],

opw-1922051
closes #32095

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-02 14:45:24 +00:00
Nicolas Martinelli f1744a31a1 [FIX] stock: scrap and validate
- Sell 4 units of a product in stock
- On the picking, create a scrap for 1 unit
- Validate
- In the immediate transfer wizard, validate

The scrap is reset to zero.

This is because the wizard overwrite the done quantity with the reserved
quantity (0.0).

If the move is already done, there is no reason to overwrite the
quantity.

opw-1958514

closes odoo/odoo#32410

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-04 09:19:23 +00:00
jev-odooandNicolas Martinelli 82d733d68c [FIX] survey: incorrect selector
The jQuery selector is slightly too permissive, and therefore incorrect
elements may be matched. See opw for example.

Co-authored-by: Nicolas Martinelli <nim@odoo.com>

opw-1947698

closes odoo/odoo#32149

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-03 13:41:57 +00:00
Florent de Labarre b9f2d8f3f4 [FIX] account: add date field in account.move.line form view
closes odoo/odoo#31800

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-03 16:12:06 +00:00
Denis Ledoux a7ac88e68c [FIX] point_of_sale: crashing tax cash basis when no reconciled order line
Because of rev. d3453f7d15
when none of the pos order lines were reconciled,
the closing of the point of sale sessions failed
because of the tax cash basis entry generation.

There is no need to create the tax cash basis entries as nothing has been reconciled.

A known case is when the the bank journal credit account is set to a receivable account,
which has as effect to fully reconcile the payment line with its counterpart,
leaving no payment lines to reconcile with the order debit lines.
This is obviously not a correct accounting configuration,
but the point of sale validation did no fail because of this previously.

Fixes #32330

closes odoo/odoo#32399

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-04-03 15:22:12 +00:00
Cas Vissers 436eb69450 [FIX] account: reconcile older invoices first
Often an invoice with the same amount is send to the same customer every week/month. If the customer pays just the amount, without any matching invoice information, common practice is to take the oldest invoice first.

Odoo currently suggests the invoice with the highest due date.
After the fix Odoo will suggest the invoice with the lowest due date.

closes odoo/odoo#32334

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-03 14:01:47 +00:00
Nicolas Lempereur 2a89f0c7f8 [REV] "[FIX] website: language prefixed URL on website"
This reverts commit 5324284f56
This reverts commit ad826f56ba.

If for example we had in a template:

 <script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script>

it has been reproduced to be gotten as:

 <script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script>

which is unexpected and could cause an error.
closes #32090

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-25 10:53:25 +00:00
Gert Pellin 6814f27bbc [FIX] hw_escpos: opening pulse cashdrawer
Some cashdrawers will not open when the command is send. This can be
solved by sending a longer opening pulse.

Used fix of newer library:
https://github.com/python-escpos/python-escpos/blob/0a89ee2b8610452f18b521af71b1ab1af7932894/escpos/constants.py#L40
Explanation for command:
http://www.beaglehardware.com/howtoprogramcashdrawer.html

closes odoo/odoo#32079

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 10:03:54 +00:00
Colinliz a4f9b48667 [CLA] add Colinliz to Inspur CCLA
closes odoo/odoo#32076

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 10:02:08 +00:00
Nicolas Martinelli d3bd48d67b [FIX] stock: has_tracking
The field `has_tracking` should be read-only, there is no reason to make
it writeable.

opw-1958266

closes odoo/odoo#32080

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 08:24:01 +00:00
Odoo Translation Bot fa12433867 [I18N] Update translation terms from Transifex 2019-03-24 03:11:51 +01:00
Yenthe666 92313e11dc [FIX] mrp: make product_tracking readonly to avoid write operation
closes odoo/odoo#32070

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-23 09:46:07 +00:00
Nicolas Martinelli 719b0ab683 [FIX] stock_account: standard price currency
Oversight during forward-port of 950d0f1849

closes odoo/odoo#32488

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-08 10:09:10 +00:00
Nicolas Martinelli 2d17baa07c [FIX] product: archived template
When a new `product.template` is imported with `active` set to `False`,
the associated `product.product` is active.

This is not consistent with what happens in the UI: when a template is
archived, all variants are archived.

At variant creation, we keep the `active` value of the template.

opw-1955116

closes odoo/odoo#32461

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-05 14:14:59 +00:00
Nicolas Martinelli 0f971130d6 [FIX] base: inactive lang
Make sure to retrieve the lang in case it is inactive. Note that a lang
cannot be deactivated if it is set on a `res.users`, but no check if
performed on a `res.partner`.

opw-1964655

closes odoo/odoo#32457

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-05 13:04:04 +00:00
Olivier Dony 28a1371035 [FIX] payment_ogone: send client info in S2S tx data
The client IP and email are useful pieces of information for auditing
transactions, and are used by the Fraud Detection Module(s) of Ingenico.

closes odoo/odoo#32058

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-22 18:35:28 +00:00
Nicolas Lempereur ad826f56ba [FIX] http_routing: ignore # when checking multilang URL
With 953a693df when a route is not found we assume it is a website.page
that can be multilang.

But with #31792 we should once again prefix URL by the language if
necessary.

The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.

With this fix, `#fragment` is not taken into account when searching
route.

related to #31792
related to opw-1922051
closes #32059

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-22 16:51:09 +00:00
Nicolas Lempereur 5324284f56 [FIX] website: language prefixed URL on website
In 10.0 and before, if we were eg. on website page /fr_FR/contact, if
`fr_FR` language (french) is installed and not the default website
language we would have all URL towards translated content (route with
multilang=True) prefixed with /fr_FR/ (the language code).

With 9cd982bcc some improvments were done to CDN but this also breaks
language prefixing, so this cause an unecessary redirect:

- we are on /fr_FR/contact and click on "Shop"
- we go to /shop
- odoo redirects US /fr_FR/shop

With this PR, URLs are prefixed with language once again.

note: the added test is hackish but the function tested depends on a lot
of odoo.http things that are hard to use for test (request.render,
request.context, request.httpreqest).

opw-1922051
closes #31792

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 16:14:09 +00:00
Christophe Simonis 3a0bedd655 [MERGE] forward port branch saas-15 up to 48e4c18fc4 2019-03-22 16:26:33 +01:00
Christophe Simonis 48e4c18fc4 [MERGE] forward port branch saas-14 up to cded89b531 2019-03-22 13:26:19 +01:00
Christophe Simonis cded89b531 [MERGE] forward port branch 10.0 up to f1c72ee8ee 2019-03-22 13:25:55 +01:00
Adrian Torres 353474fba2 [FIX] sale: do create of sale.order.line in batch
With this patch, `sale.order.line` records can now be created in batch,
this means that operations such as:

    - SO copy
    - SO create + commands
    - SO import

will benefit from this patch in terms of performance.

E.g.

For a SO of 2k lines, duplicating the SO takes:
Before patch: 1515s
After patch: 171s

Creating an SO with SOL as o2m commands:
Before patch: 181s
After patch: 43s

closes odoo/odoo#32040

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-22 12:08:35 +00:00
Nicolas Martinelli f15a19d127 [FIX] delivery_hs_code: help on field
At the moment, the HS Code is only used in FedEx. This is confusing for
users, since they expect it to be supported for all providers.

We improve the tooltip.

opw-1961472

closes odoo/odoo#32445

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-05 08:25:04 +00:00
Nicolas Martinelli 6e1170b3c3 [FIX] sale: send sample
In a multi-company / multi-currency / multi-pricelist environment,
sending the sample SO may crash because the `company_id` field on the SO
line is not yet defined when a price conversion is necessary.

This is because it is a stored related field used in `product_id_change`
which is called programmatically at creation.

opw-1948629

closes odoo/odoo#32443

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-05 07:51:05 +00:00
Martin Trigaux 489494e733 [FIX] base: upsert translations during copy_translations
When doing a copy, create the new translations directly in SQL and handle
potential conflicts.

Conflicts can occure in case of reinstallation as showed in opw-1955062 and
opw-1950117.
In case of "leftovers" of translations (e.g. remaining after the uninstallation
of a module), creating the new translations (when reinstalling the module) may
produce a conflict with (type, name, res_id, lang) and raise an error.

This is NOT a problem of reading .po file during installation (which handles
correctly conflicts) but of business code creating new records and linked
translations (e.g. website copying website.menu records).

Removing old translations during uninstall is handled in a previous commit in
ir.model.fields _drop_column method.
This commit fixes the reinstallation on instances with leftover translations
and fixes the issue without needing a manual intervention (i.e. delete the old
translations manually).

Closes odoo/odoo#32056

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-04 14:41:26 +00:00
Martin Trigaux 112bd835d8 [FIX] base: drop translations when dropping a column or table
Better than if ba58888ced as the records may be removed via ondelete='cascade'
(where the unlink is not called on the record).  Will be faster too.

A solution to opw-1955062 and opw-1950117 with uninstallation of website.

Closes odoo/odoo#32056
2019-04-04 14:40:20 +00:00
Deiber Rincón ad4b5053ba [CLA] add Deiber to Xoe Corp CCLA
Signed-off-by: David Arnold (dar) dar@xoe.solutions

closes odoo/odoo#32403

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-04 19:49:37 +00:00
Swapnesh Shah ec2b4889f9 [FIX] website_sale: Access one order to generate token
closes odoo/odoo#32032

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-22 04:31:49 +00:00
Nicolas Lempereur a11147a091 [FIX] payment_stripe: regression 98fe5054c2
opw-1939323

closes odoo/odoo#32026

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-21 16:51:18 +00:00
Nicolas Martinelli 3a76d45706 [FIX] crm_enterprise: prorated revenue
- Create 2 `crm.lead`:
  Expected Revenue: 100; Probability: 99 %
  Expected Revenue: 200; Probability: 0 %
- Go to Reporting > Sales Channels

The amount displayed next to 'Open Opportunities' is 148.5 is instead of
99.

opw-1947975

closes odoo/odoo#32011

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-21 14:33:36 +00:00
Nicolas Martinelli 723c657dd3 [FIX] website_quote: amount comparison
The price comparison can be incorrect because of float representation
differences. We make the template more robust against this problem.

opw-1945541

closes odoo/odoo#32012

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-21 13:34:55 +00:00
Goffin Simon 02b28bbc39 [FIX] stock_picking_barch: Picking Barcodes missing on batch pickings report
The picking barcode must be displayed in the batch picking report like in 11.0

opw:1958092

closes odoo/odoo#32004

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-21 09:39:42 +00:00
Odoo Translation Bot 7e9a13a64d [I18N] Update translation terms from Transifex 2019-03-24 01:24:01 +01:00
qsm-odoo aed56c9bda [FIX] website_forum: BS4, restore edit profile page
+ Add some spacing between the navbar and the forum layout

closes odoo/odoo#32060

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-22 16:55:29 +00:00
Martin Trigaux 48143116e9 [FIX] base: ignore empty translatable attribute
Complete cd4080839f
  <span class="fa fa-globe" title="Title stuff"/>
is not correctly extracted but
  <span class="fa fa-globe" title=""/>
was also extracted while there is no content

Check the size of the content too

Similar content is present on odoo.com website and should not be translatable
on Transifex

closes odoo/odoo#32018

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-21 15:38:56 +00:00
Toufik Ben Jaa 4a13d5d1f5 [FIX] auth_signup: typo in invitation mail
closes odoo/odoo#32049

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-22 13:03:12 +00:00
Nicolas Vannieuwerburgh 78e8634cf5 [DOC] update upgrade service documentation
- Update active target versions
 - document `skip_test` endpoint
 - use `requests` in python snippets<Paste>

closes odoo/odoo#31071

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 13:06:16 +00:00
Romain Estievenart 52c562bdc0 [FIX] hr_holidays: adapt mobile css of leave request form
This commit adapts the leave request form on mobile.
Dates fields didn't take all device width.

As it's not a critical issue, it's up to the customer
to update this mobule to apply this fix.

Task ID: 1944884

closes odoo/odoo#32020

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-22 10:06:52 +00:00
Julien Castiaux e9026bd522 [FIX] web_editor: editor hang on an infinite loop
In the `getMatchedCSSRule`, the transcoder try to find the real value of
a `text-align: inherit` css rule by ascending the html tree until it
finds a `text-align` with a meaningful value. By default is exits if it
reachs the `<html>` top node but doesn't exit if a call to `.parent()`
exits the dom (the behavior of jquery is to return a dummy element when
calling `.parent()` on an element that has no parent). This lead to an
infinite loop for badly formatted html content.

opw-1951095

closes odoo/odoo#32014

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-21 13:45:12 +00:00
Nicolas Martinelli 3e6b4844d3 [FIX] stock: late pickings
With the demo data:
- Go to Inventory
- On the 'Delivery Order' Kanban card of YourCompany, click on 'Late'

More pickings are displayed than the expected count.

This is because the domain of the filter is not in line with the domain
of `_compute_picking_count`.

Closes #29777
opw-1951090

closes odoo/odoo#31994

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-20 16:43:15 +00:00
Nans Lefebvre 58bfce30fe [FIX] payment_adyen: convert the paymentAmount respecting the Adyen API
Adyen requires the amount to be multiplied by 10^k,
where k depends on the currency code.
https://docs.adyen.com/developers/development-resources/currency-codes
Provides a map of codes to factors.

Before, k was assumed to be 2 (which is correct in most cases).

opw 1928918

closes odoo/odoo#32001

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-21 07:28:19 +00:00
Swapnesh Shah 09e35f2a36 [FIX] website_quote: Add correct product quantity
closes odoo/odoo#31998

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-20 16:55:20 +00:00
Martin Geubelle ed4a457f12 [FIX] mrp: disable WO creation from gantt
Task 1957993

closes odoo/odoo#31995

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-20 16:01:50 +00:00
Odoo Translation Bot 1b932b339a [I18N] Update translation terms from Transifex 2019-03-24 06:23:04 +01:00
qsm-odoo c8339ce10e [FIX] web_editor: remove we validation icons
Since the bootstrap update to 4.2.1 (which was made with
https://github.com/odoo/odoo/commit/63e52e6acfabb927aad6eaf7b020520dc206e50f)
bootstrap includes automatic validation icons when a form is validated.

This allows to remove the Odoo custom ones in the editor (which appeared
on top of the bootstrap ones).

closes odoo/odoo#32051

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-22 13:40:12 +00:00
Sébastien Theys b46cdbbda4 [FIX] website_sale: fix forward-port of product configurator
The method `onChangeVariant` was overridden in 12.2 to fix an issue with the new
web editor and separately overridden in 12.0 to fix an issue with the product
configurator.

After the forward-port, the method was defined twice, and only the second was
taken into account.

This commit fixes it by merging the two methods.

closes odoo/odoo#32041

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-22 11:03:31 +00:00
Romain Estievenart 230ad8c381 [FIX] web: Add support of button type object on One2Many KanbanRecord
Before this commit, there were a crash if you tried to add an optionnal
product in a new sale order without saving it.

Apply same logic as in the ListRenderer: buttons with type="object" are
disabled for no saved yet records, as calling the python method with no
id would make no sense.

To avoid to expose this logic inside all Kanban views, we define a
specific KanbanRecord Class for the One2many case.

This could be refactored to prevent from duplicating this logic in list
and kanban views.

Original Task ID: 1945006

closes odoo/odoo#31695

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-22 10:26:13 +00:00
Alexandre Kühn 7269fb32f4 [FIX] mail: offline status icon
Revision on https://github.com/odoo/odoo/commit/07a261db7196d3f7aa7d50d98575c5b6efca9242

When a user is offline, the icon status should be an outline bullet.
However, since the commit above, the offline icon was a plain bullet.
Also, the offline icon is hidden when displayed next to user avatar.

Task-ID 1957966

closes odoo/odoo#31970

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-03-21 10:39:13 +00:00
Antoine Guenet 1d5daff152 [FIX] web_editor: prevent overriding of toolbar CSS by themes
While waiting for a larger fix of the themes, force prevent overriding
of the web editor's UI CSS by themes. This is achieved by applying
`!important` on all web editor UI CSS. This is a temporary fix until
the themes CSS is fixed and/or the new web editor library is ready.

closes odoo/odoo#31721

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-21 12:57:57 +00:00
Robot Odoo fa93a60e91 [MERGE][FIX] website_slides: clean course and lesson pages layout and fix various small UX issues
Purpose of this merge is to at last perform a cleaning of layout and design for
eLearning pages still not completely updated with magic layout touch.

Impacted pages
 * course (channel) main page: better top and banner, better navigation.
   Improve training content list display, clean documentation content list
   display and navigation;
 * lesson (slide) main not-fullscreen page;
 * lesson (slide) fullscreen page / widget;
 * homepage: clean navigation;

This merge also contains various fixes and UX improvements for fullscreen
lesson display as well as user profile page. Thanks to @stefanorigano and
@qmo-odoo for their input.

This merge closes tasks 1941250 about fixes and layouting of new eLearning
application. Thanks for your attention.

closes odoo/odoo#31977

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-21 14:29:56 +01:00