Commit Graph
127612 Commits
Author SHA1 Message Date
sri-odoo f177f6787d [FIX] website_slides: open 'review' tab on click
Open the right tab clicking on "Write a review"

part of: https://github.com/odoo/odoo/pull/34151

closes odoo/odoo#34151

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-06-17 07:17:16 +00:00
sri-odoo f0c33d082a [FIX] website_slides: replace 'back' icon, mobile
Keep consistency using the same icon (home) when referring to the main
course page.

Prior to this commit both "back to course" and "exit fullscreen" actions
had the same icon.

part of: https://github.com/odoo/odoo/pull/34151
2019-06-17 07:17:16 +00:00
sri-odoo 508e374306 [FIX] website_slides: don't show sidebar, mobile
On mobile, don't show automatically the sidebar in order to
avoid covering the lesson's content.
The user will have to click on the toggle button to open it.

part of: https://github.com/odoo/odoo/pull/34151
2019-06-17 07:17:16 +00:00
Odoo Translation Bot 48a9f5a633 [I18N] Update translation terms from Transifex 2019-06-16 06:15:35 +02:00
Christophe Simonis ced0e5becf [FIX] test_lint: also ignore js files in static/src/tests directory 2019-06-14 18:09:58 +02:00
Nicolas Martinelli 0c302e30a0 [FIX] event_sale: no company on SO
Do not crash at currency conversion when no company is set.

closes odoo/odoo#34155

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-14 15:36:14 +00:00
Christophe Simonis 131e478ae6 [FIX] account: avoid usage of this in closure
Oversight of previous forward-port.
2019-06-14 17:29:51 +02:00
Ankita Raval 41870f0000 [IMP] mrp : Crash when products of type service in BoM
Before Commit:
If a product type service in a bom, create a manufacturing order
of product's bom they returns empty recordset because if product
type is not storable and consumable is returns empty object of
stock move else they returns the data dictionary.

After Commit:
If product type service in a bom, create a manufacturing order
we returns the empty dictionary rather than empty object of stock move

Add a testcases
1) to check manufacturing order is generated of product
type of service in bom or not.
2) to check manufacturing order is generate from sale
order of product type sevice in bom or not.

Task ID - 1981790

closes odoo/odoo#33337

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-06-14 14:39:44 +00:00
Christophe Simonis 34a8754d4f [MERGE] forward port branch saas-12.2 up to 498b4b4350 2019-06-14 15:20:01 +02:00
sri-odoo 498b4b4350 [FIX] website_slides: add missing <h1> tag (seo)
closes odoo/odoo#34137

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-14 10:16:58 +00:00
xmo-odoo 867fb21b05 [FIX] survey_crm: re-remove
Was apparently re-introduced by a forward port (of an export in 12.0).

closes odoo/odoo#34136

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-14 10:00:17 +00:00
qmo-odoo 974418b169 [FIX] website_slides: Fix tag link on slide card
Before this commit, clicking on tag located on a
slide card in the course page would filter the channels
instead of the slides

Now, it filters the slides in the course

closes odoo/odoo#33635

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-06-14 13:18:48 +00:00
qmo-odoo 4ccd859bd4 [FIX] website_slides: Fix the breadcrumbs on a slide content
This commit adds the name of the currently viewed slide
to the breadcrumbs at the top of the page

Task ID: 1999672
PR: #33635
2019-06-14 13:18:26 +00:00
Jeremy Kersten 856685d640 [FIX] website_slides: use bigger image for shared content
Before this commit, share a slide was done with a small picture and so ugly

closes odoo/odoo#34133

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-14 09:42:03 +00:00
Christophe Simonis 5b2f64fd5d [MERGE] forward port branch 12.0 up to 4870251f0b 2019-06-14 10:15:49 +02:00
Laurent Smet 94dc2fe5f7 [FIX] account: Fix matching rules with empty communication
The way to find a matching about structured communication is done by:
1 - making a filter to keep only numerical values.
2 - splitting the result into array.
3 - finding an intersect between the sets.

For example,
"Payment about +++123/456789+++ and +++987/654321+++" is matching "123456789 blablabla"?
1 - "123456789 987654321" is matching "123456789" ?
2 - ["123456789", "987654321"] is matching ["123456789"]
3 - YES because "123456789" intersects both sets.

This commit is about the check is always TRUE when both sets are empty.
In this specific case, the result must be FALSE.

-opw: 2008299

closes odoo/odoo#34115

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-14 07:28:41 +00:00
Christophe Simonis 8a19a6a2a3 [MERGE] forward port branch 11.0 up to ec8c66991d 2019-06-13 16:52:40 +02:00
Christophe Simonis ec8c66991d [MERGE] forward port branch saas-15 up to 641ca4f7f4 2019-06-13 16:22:23 +02:00
Nicolas Martinelli 4870251f0b [FIX] payment: save credit card
- Set a payment provider with:
'Save Cards': 'Always'
'Payment Flow': 'Redirection to the acquirer website'
- Process an order on the eCommerce

The payment token is not saved.

The `save_token` value is based on the checkbox which is only added in
'ask' mode:

https://github.com/odoo/odoo/blob/4b8f72eb2315e675ca6d5a0d0961272fc024c475/addons/payment/static/src/js/payment_form.js#L162

We hide and pre-check the checkbox in this case.

opw-2008441
opw-2008275

closes odoo/odoo#34106

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-13 13:52:03 +00:00
Christophe Simonis 641ca4f7f4 [MERGE] forward port branch saas-14 up to 6a247212f8 2019-06-13 15:32:55 +02:00
Christophe Simonis 6a247212f8 [MERGE] forward port branch 10.0 up to 818d34630d 2019-06-13 15:25:43 +02:00
Nicolas Martinelli 5af6928107 [FIX] google_spreadsheet: boolean
It seems that Google Spreadsheet only recognizes `true` and `false` as
valid boolean values.

opw-2000623

closes odoo/odoo#34100

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-13 12:10:20 +00:00
Christophe Simonis a526ff3f70 [FIX] mail: use correct variable
Oversight of previous forward-port.
2019-06-13 18:20:47 +02:00
Christophe Simonis a0a11fd5e2 [MERGE] forward port branch saas-11.3 up to 8a19a6a2a3 2019-06-13 18:18:17 +02:00
Julien Castiaux dad9265d69 [FIX] project: correct filename on portal attachment
Create a project visible to a portal customer, create a task and attach
an attachment. As a portal user, go to the task and download the
attachment, the downloaded filename is the numeric identifier of the
document instead of the document filename.

The `?download=true` force the download of the attachment and correctly
set the filename.

opw-2008517

closes odoo/odoo#34098

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-06-13 13:22:22 +00:00
Nans Lefebvre ea064c81c9 [FIX] website: fix access error at settings save
Let a database with company C1, C2,
and a website W belonging to C1, used for both companies.
Settings in C2 cannot be saved without setting a website.
At settings load W is removed from C2 because it belongs to C1.
So reset C2's website to W.
This triggers a (useless) write of company_id (C1.id) on W.
Then we have w.user_id.company_id.id != self.env.user.company_id.id, (C1 != C2).
So if contacts are not shared, then accessing w.user_id.company_id would cause
an access error because of record rules, preventing the save.
As a result, settings are unusable for company C2.

opw 2008887

closes odoo/odoo#34102

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-06-13 12:41:15 +00:00
mreficent 255088ba52 [FIX] purchase: wrong uom in demo data
closes odoo/odoo#34099

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-06-13 11:56:39 +00:00
Goffin Simon 07e6cc73c1 [FIX] sale: sales_to_invoice_count in Sales Channel
The count sales_to_invoice_count was wrong due to the domain
wrote in function _compute_sales_to_invoice. Using 'order_line.qty_to_invoice'
in the domain included duplicate orders in the read_group on 'sale.order'
because there is auto_join=True on the field order_line.

opw:2009808

closes odoo/odoo#34391

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-26 14:44:34 +00:00
Christophe Simonis f7d442a2f6 [MERGE] forward port branch saas-15 up to cf18c9bae1 2019-06-26 19:28:52 +02:00
Nicolas Martinelli 98a590b359 [FIX] l10n_fr_fec: remove new line
- Make a SO with a product that have a carriage return in its
description
- Export FEC report

The CSV contains new lines and is not correctly formatted. This is due
to c712231745.

opw-2026861

closes odoo/odoo#34386

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-26 12:54:28 +00:00
Nicolas Martinelli aad824067c [FIX] l10n_fr_fec: wrong forwart-port
Incorrect forward-port of commit cd26eb8e7c

opw-2026861
2019-06-26 12:53:20 +00:00
Goffin Simon 06375de3bc [FIX] crm: Wrong opportunities_count in Sales Channels
Steps to reproduce:
- Go to CRM > Reporting > Sales Channels
- Click on link Open Opportunities,

Bug:

It displayed all the opportunities instead of just the open opertunities.

opw:2009808

closes odoo/odoo#34365

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-26 14:41:42 +00:00
Goffin Simon 87685fc9b3 [FIX] stock: Inventory of one product only
Steps to reproduce:
- Enable serial numbers
- Create two products P1 and P2 tracked by lots
- Create an inventory adjustment and specify inventory of one product only
- Select P1 and create a serial number for it
- Save the adjustment and change P1 to P2, adapt the quantity to 10 and
validate the inventory adjustment

Bug:
Go to Lots and serial numbers and the created lot was linked to P1 intead of P2

opw:2010934

closes odoo/odoo#34373

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-26 09:10:06 +00:00
Nans Lefebvre c6ae7eea03 [FIX] stock: do not update moves when writing quantities lower than UoM precision
Suppose product P has UoM U with rounding R, and the stock move has quantity Q.
Edit the quantity done to be Q + e, with e << R.
By the semantic of the UoM rounding, this should mean that no change has been
done.
However no such check was done, so a message was posted in chatter, of the form:
The done move line has been corrected.
P:
Quantity : 1000.0 -> 1000.0000000000001

opw 2006831

closes odoo/odoo#34124

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-06-14 11:26:16 +00:00
Nans Lefebvre a5a4b154ee [FIX] stock_account: round quantities to UoM precision when updating moves
Have a product P values in FIFO, create an incoming stock move.
Suppose P has UoM U with rounding R, and the stock move has quantity Q.
Edit the quantity done to be Q + e, with e << R.
By the semantic of the UoM rounding, this should mean that no change has been
done. However no such check was done, so the move was updated.
As a result, this would mess up the valuation of P.

opw 2006831
2019-06-14 11:25:56 +00:00
Nicolas Martinelli 963475bcfd [FIX] stock: use float_compare
Use proper `float_compare` method when comparing floats.

opw-1958608

closes odoo/odoo#34370

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-26 07:46:19 +00:00
Olivier Colson 13f5dc905b [IMP] l10n_lu: remove unnecessary space at the end of some tax report line name
closes odoo/odoo#34094

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-13 10:59:05 +00:00
shreya thakrar ffeb855bc7 [FIX] sale_timesheet: remove the down payment line in project overview
Before this commit, in project overview, there was an advance payment
line under 'Timesheets' section which was unnecessary for the timesheet.

After this commit, down payment line will not considered in project overview.

task-1957272

closes odoo/odoo#34062

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-06-13 09:16:05 +00:00
Nicolas Martinelli 988018a5ba [FIX] account: fiscal year end dates in wizard
- From Accounting dashboard > Configuration panel > Configure fiscal year
- Set opening date: 01/07/2018
- Set fiscal year end: June 30
- Click Apply button

An error is raised: 'Invalid fiscal year last day'.

This is because the 3 fields are linked by the constraint
`_check_fiscalyear_last_day`. However, non-stored writeable related
fields are evaluated one at a time, meaning that the constraint is
evaluated one value at a time.

We do a fancy workaround to write the 3 values at once on the company,
hence evaluating the constraint for the 3 fields once.

opw-2024927

closes odoo/odoo#34275

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-20 10:51:56 +00:00
Odoo Translation Bot 53b6ab9f05 [I18N] Update translation terms from Transifex 2019-06-23 01:17:13 +02:00
Julien Castiaux 81147140ac [FIX] calendar: shift midnight to current locale
Configure your system to be in the Mexico timezone, configure your Odoo
profile accordingly. Go to calendar, show daily events, add an event at
the end of the day (like 10pm). The resulting event is not visible on
the daily view although it is on the weekly view. The same problem
occurs on the weekly view if the event was create late the last day.

The problem is the initial `search_read` has a domain to filter the
events using 00:00 UTC to 23:59 UTC boundaries. Those boundaries are not locale
aware, they should be shifted to the MX timezone.

opw-2009877

closes odoo/odoo#34247

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-06-19 14:38:00 +00:00
Martin Trigaux e6b9e6a032 [FIX] hr_payroll: unify the field labels
The field module_account_accountant is called "Account" in account module
but was changed to "Account Accountant" in hr_payroll, making the source of
a translated record to change based on the module installed (which can lead
to confused translators or broken universes)

Terms export was unified at #34296

closes odoo/odoo#34298

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-06-21 11:41:11 +00:00
Martin Trigaux 3db15c0818 [FIX] account: export source terms
The view content was changed at 3b5f33281d but the changes were not
reflected in the pot file

opw-2025750

closes odoo/odoo#34296

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-06-21 11:26:31 +00:00
Nicolas Vannieuwerburgh 818d34630d [IMP] stock: noupdate on stock location
Stock.locations should be in no-update:
Limit the impact of recompute fields during the upgrade of stock module. (especially method _compute_product_availability)
Limit the impact on migration

Method _compute_product_availability is triggered during an upgrade of module and during migrations.
This may take a lot of time of big databases

closes odoo/odoo#34074

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-13 07:09:42 +00:00
Christophe Simonis efc64edf70 [MERGE] forward port branch 11.0 up to 242e485b4a 2019-06-12 19:18:42 +02:00
Julien Castiaux 306abd0131 [FIX] mail: send same attachment multiple times
In the Discuss app, using Chrome or IE11, try to send the same
attachment to different channels. The first attachment is correctly
detected but not the next ones.

The problem is due to a browser inconsistency, on firefox selecting the
same file in an `<input type=file>` triggers the `change` event. This is
not the case on Chrome/IE, selecting the same file doesn't triggers an
`onchange`.

opw-2006647

closes odoo/odoo#34076

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-06-12 14:36:03 +00:00
sri-odoo ed7b3b0fa4 [FIX] website_slides: design, questions margins
Slightly increase margins between questions in a test.

closes odoo/odoo#34055

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-12 14:09:15 +00:00
Denis Ledoux 242e485b4a [FIX] http: Unreachable server when db_maxconn reached during registry loading
On `WebRequest` `__exit__`, when an exception occured,
(in `self.registry.signal_changes` or `self.registry.reset_changes`)
cursor were left unclosed as `self._cr.close` was not called
in such cases.

Having exceptions in the above mentioned method do not happen
often, but when it does it left unclosed and unusable cursors
in the connection pool, and in the extreme case explained below,
it left the connection pool with only unclosed and unusable cursors.
The entire server was then unusable as it no longer had working cursors.

Case:
- Start a multi-thread server with db_maxconn set to 5
- Ensure you do not send any request to the server,
not even with a left open tab on `http://localhost:8069` in your browser
- Send 6 parallel HTTP requests to `/web/login`
thanks to an external thread python script
(See below, at the end of this long commit message)

According to your registry state (if you have a lot of modules installed or not),
and the native Python Garbage Collecting state,
you might end with
- either warnings telling some unclosed cursor were garbage collected,
and therefore closed (by a kind of luck thanks to the Python garbage collecting),
- either, a server completely blocked not accepting any other request
(you can try for instance `curl http://localhost:8069`
and you end up with a `500 Internal Server Error`

This observed issue looks to appear only in 11.0. Not 10.0 or 12.0.
This is because only 11.0 clear the cache during registry loading:
`https://github.com/odoo/odoo/blob/f1706c848d41c47646dabca771996e9b9f788241/odoo/modules/loading.py#L236`
This cache clearing doesn't happen in 10.0 nor 12.0
(in 12.0, thanks to e181f592f3)

When sending the 6 parallel requests,
it uses instantly all the 5 available cursors of the connection pool to handle these requests,
and when each request exits, in `__exit__`, it calls `self.registry.signal_changes()`
which tries to open a new cursor because of
- `self.cache_invalidated` which is True, for all the 6 requests, thanks to the call to `clear_caches`
explained above during the registry loading and the fact all requests have been treated in parallel,
- `with closing(self.cursor()) as cr:`, `self.cursor()` attempting to use a new cursor
(the `closing(...)` does not have any incidence on this issue, despite it could look like guilty)

The attempt to use a new cursor fails, as there is no more available (`db_maxconn` is reached),
raising a `PoolError('The Connection Pool Is Full')` exception.

In the request `__exit__` method, because of this exception raised when calling `signal_changes`,
`self._cr.close` is never reached, and the parallel request therefore left only unclosed
cursors in the connection pool,
therefore leaving the server in a state where it only has unusable cursors
and therefore can't do anything more.

This might look like really bad luck to land in such a state,
but we observed multiple actual case on Odoo.sh,
the one referenced in this commit (opw-2008340) was because of an Outlook client
which launched 18 parallel requests to fetch the email images,
and the server wasn't spawned, therefore neither was the registry.
The server registry was therefore just loaded when it received the 18 parallel requests,
and it therefore triggered this extreme use case.
The server was left unusable for several minutes, until a forced restart.

For reference, here is the script that has been used to trigger the 6 parallel requests:
```
import requests
import threading

threads = []
for i in range(6):
threads.append(threading.Thread(target=lambda: requests.get('http://localhost:8069/web/login')))
for thread in threads:
thread.start()

```

opw-2008340

closes odoo/odoo#34071

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-06-12 13:10:45 +00:00
Christophe Simonis 92ef6daa19 [MERGE] forward port branch saas-15 up to e14fd457b9 2019-06-12 15:46:40 +02:00
Martin Trigaux 52936ec260 [I18N] *: export saas-12.3 source terms
closes odoo/odoo#34068

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-06-12 12:39:50 +00:00