Commit Graph
118063 Commits
Author SHA1 Message Date
goliveirab e14fd1ae62 [FIX] l10n_mx: fix mexico accounts nature
Fix mexico accounts nature of the following SAT accounts:

- 119.01
- 119.02
- 119.03
- 199.04
- 180.01
- 503
- 505.01
- 505.02
- 607.01
- 610.01
- 612.01

Currently some debit accounts are being labeled as creditors and vice
versa. For example the account 119.01 IVA pendiente de pago should be
labeled as a debit account but is set as a credit account.

closes odoo/odoo#33287

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-26 14:33:52 +00:00
Christophe Simonis d01db48087 [MERGE] forward port branch saas-15 up to 82f88478cf 2019-05-08 17:27:30 +02:00
Christophe Simonis 82f88478cf [MERGE] forward port branch saas-14 up to 98b10f98bb 2019-05-08 17:13:30 +02:00
Christophe Simonis 98b10f98bb [MERGE] forward port branch 10.0 up to a48318cb33 2019-05-08 17:09:40 +02:00
Nicolas Martinelli 709e59b4e9 [FIX] account: analytic account and cash basis
- Activate cash basis
- Set a tax
Tax Due: Based on Payment
Include in Analytic Cost: true
- Create an invoice, add the tax and an analytic account on the invoice
line
- Validate and pay

The analytic account is correctly set on the tax line, but it is not set
on any of the cash basis entries.

Partial backport of 079a13a349.

opw-1971751

closes odoo/odoo#33236

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-08 12:41:00 +00:00
Nicolas Martinelli 6ff5498fc0 [FIX] base: barcode fallback
- Set a product barcode to a 8 letters value, e.g. 'AAAAAAAA'
- Print 'Product Barcode (PDF)' (or any other report containing the
barcode)

The barcode doesn't print.

All templates assume that:
- a 13 characters barcode is EAN13
- a 8 characters barcode is EAN8

But this assumption is too restrictive: one could want to generate
barcodes with such length without following the EAN13 or EAN8 structure.

We fall back on Code128 when the barcode generation fails.

Backport of 06cfdbaab8
opw-1981988

closes odoo/odoo#33240

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-08 09:02:45 +00:00
Nicolas Lempereur f89d2f3599 [FIX] hw_blackbox_be: typo e8574502e1
There was a syntax improvment in the commit merged but it was not
intended to be unfinished.

fixes #33228
opw-1981839
closes #33239

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-05-08 08:55:41 +00:00
Joren Van Onder 41871bf562 [FIX] payment: prevent duplicate payments with payment tokens
When paying an eCommerce order with an acquirer which doesn't
redirect (payment_flow: s2s) the "Pay Now" button is correctly
disabled after clicking it. This prevents a user from clicking it
multiple times and being charged multiple times.

When paying with an existing payment token however the button was not
disabled and the user gets no feedback his request is being
processed. Charging an existing payment token takes a while (~5
seconds with Authorize) and so it's possible users will hit the button
multiple times.

This disables the button when reusing an existing payment
token. Additionally it now uses the correct font awesome icon (fa-lock
instead of fa-plus-circle).

opw-1981064

closes odoo/odoo#33196

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-07 17:42:33 +00:00
Nicolas Lempereur b87454ee1b [FIX] hw_blackbox_be: adapt code to posbox 17 py3
Python2 uses byte strings by default and python3 text string, so adapt
the code communicating with blackbox to still only use bytestring.

Also raspbian image has been updated in posbox 17 to Raspbian 9
(stretch) so ifconfig command returns has different format output (
`ether {MAC address}` instead of `HWAddr {MAC address}`) so the way we
get the MAC address is changed.

opw-1981839
closes #33150

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-05-07 12:39:51 +00:00
Pedro M. Baeza a48318cb33 [CLA] update Tecnativa signature
Remove Tecnativa's old employees, add new ones

closes odoo/odoo#33197

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-07 08:03:28 +00:00
Lucas Perais (lpe) b3864b8b4a [FIX] point_of_sale: connection failure right before pdf download
ONLINE:
make an order, chose a customer, click on "invoice"
Make the payment, validate

Just **before** the request to download the pdf of the invoice
go OFFLINE
(to achieve this, just put a debugger before the do_action() fires, and kill the server)

Before this commit, the button validate on the payment screen stayed inactive forever
This was because the deferred representing the invoicing flow was still pending

After this commit, we handle the case to invite the waiter to print the invoice
from the backend

OPW 1972301

closes odoo/odoo#33188

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-05-06 13:05:42 +00:00
Romain Derie fb5015d5fc [FIX] website_sale_delivery: show correct fixed price
There was 2 issues regarding delivery price when the delivery was set to fixed
price and free over a certain amount.

1. On /shop/payment step, such deliveries would have the fixed price shown on
   the badge, even if the sale order amount exceed the free over threshold.
2. When clicking on a delivery carrier, it is supposed to compute all the SO
   costs (delivery, taxes..) and display them.
   The delivery price selector would try to get the 'badge.hidden' element
   which never exists for fixed prices. Thus, it would not update the delivery
   badge price.

Now:
1. If the free over threshold is met, we display 0$ instead of the fixed price
   by calling `rate_shipment`.
   Note that `rate_shipment` can't fail in case of a fixed rate (see method).
   The only failing case is if the customer country does not match the delivery
   allowed country, but such a flow is not possible as delivery shown during
   cart payment are already filtered by allowed countries.
2. The delivery value returned after clicking on the carrier is correctly
   updated on the badge.

Fixes #31502

closes odoo/odoo#32938

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-05-06 14:51:43 +00:00
Manuel Vázquez AcostaandNicolas Lempereur 08425316d3 [FIX] stock: rewrite search override style for RPC
Putting *args and **kwargs confuses the function `odoo.api.split_context`.
This causes that a call to `search` via XMLRPC gets the wrong argument: takes
the first argument of ``args`` as the context.

Example which ignores the `count=True`::

```
api.call_kw(self.env['product.product'], 'search', (
    [], False, False, None, True, {'lang': 'en_US'}
), {})
```

would ignore the `count=True` and use the wrong argument for context.

Issue introduced in commit 15ea753a.

Since:

`def search(self, model=None, *args, **kwargs)`

is equivalent to:

`def search(self, args, offset=0, limit=None, order=None, count=False):`

because the call to the super will anyway call the parent method, we can
change the method arguments.

note: this is only for [10.0,saas-14] where 15ea753a is.

closes #33147

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>


Co-authored-by: Nicolas Lempereur <nle-odoo@users.noreply.github.com>
2019-05-06 11:45:49 +00:00
Yenthe666 8b76584892 [FIX] doc: fix typo in qweb documentation
closes odoo/odoo#32670

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-03 09:20:35 +00:00
Adrian Torres d47f0ddbe4 [FIX] base: force unlink during uninstall
This commit is a followup to #25854

If a custom relational field is in a view and the field it references is
in another module and this module is uninstalled, the registry will
crash.

This is not because the ORM doesn't properly cascade-delete the field,
it tries to, but since the field is in a not-to-be-deleted view, the
unlinking of the field is interrupted and an error is raised to prevent
the breakage of the view.

However, module install/upgrade/uninstall cannot be stopped by such
errors and once the registry is reloaded, it crashes because it cannot
find the referenced field.

The solution, while not ideal, is to force the deletion of the field if
we're in uninstall mode... This means that the view in question will be
broken until the field is manually removed from the view, but a broken
view can be dealt with more easily than a broken registry.

opw-1974362

closes odoo/odoo#33130

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-03 07:50:02 +00:00
Odoo Translation Bot 27aabeaad5 [I18N] Update translation terms from Transifex 2019-05-05 03:10:58 +02:00
Christophe Simonis d5a1ad566b [MERGE] forward port branch saas-14 up to 5728e39181 2019-05-02 09:31:13 +02:00
Christophe Simonis 5728e39181 [MERGE] forward port branch 10.0 up to 903fec011d 2019-05-02 08:48:46 +02:00
Odoo Translation Bot 903fec011d [I18N] Update translation terms from Transifex 2019-05-01 02:43:48 +02:00
Christophe Monniez a21db63375 [FIX] packaging: remove jinja2 from py2exe explicit include
Following the fix in 4c35983d0, it appears that the excludes and
packages options are conflicting. py2exe seems smart enough to include
jinja2 package without the explicit include via the 'package' options.

closes odoo/odoo#32991

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-26 15:53:53 +00:00
Xavier Morel 8371f08202 [FIX] website_hr_recruitment: don't prefetch website_description
Prefetching it triggers its translation, which quickly becomes most of
the overhead of /jobs despite the field not being displayed on that
page: an empty /jobs takes ~150ms, a /jobs with 99 jobs takes ~2000ms,
>70% of which are spent in html_translate and ultimately
translate.py:process (14600 calls, 60% of runtime, 40% own).

Removing prefetching lowers the runtime to ~700ms.

closes odoo/odoo#32985

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-26 12:16:24 +00:00
Lucas Perais (lpe) c6f1921beb [FIX] account_asset: asset report shows only non archived assets
Make a PO then an invoice with a product that will create an asset
cancel the invoice
Open the Assets Analysis report

Before this commit, the asset lines corresponding to the invoice
are shown

After this commit, they are not shown (only non archived assets are by default)

OPW 1974344

closes odoo/odoo#32955

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-25 14:15:50 +00:00
Christophe Monniez 4c35983d08 [FIX] packaging: avoid jinja2 asyncsupport in py2exe
Since 78ba90d5, when building the windows package, py2exe fails to
compiles jinja2 asyncsupport module. Even tough jinja detects the
environement, py2exe tries to compile the async part. The problem comes
from the fact that async keyword was introduced in python 3 and we use
py2exe with python 2.7.

With this commit the async part of jinja is execluded from py2exe.

closes odoo/odoo#32913

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-25 08:46:50 +00:00
Lucas Perais (lpe) 7f6309c60c [FIX] account_check_printing: print checks action defaults
Because of c56b746221
server action "state" (what it should execute) defaults to
Update a record

This commit corrects the check printing action accordingly

OPW 1972938

closes #32928
2019-04-25 09:34:14 +02:00
Damien Bouvy 90af6254ba [FIX] mrp_byproduct: missing oldname
Impacts migrations

closes odoo/odoo#32900

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-04-24 08:53:29 +00:00
Denis Ledoux 0c46c8a929 [MERGE] forward port branch saas-14 up to 6fd092e131 2019-04-24 09:31:49 +02:00
Denis Ledoux 6fd092e131 [MERGE] forward port branch 10.0 up to 4730a884b4 2019-04-23 17:16:26 +02:00
Lucas Perais (lpe) 4730a884b4 [FIX] website_quote: portal optional products qty change
Have a SO with a quotation template and some optional products set
Display it on the portal
On an optional product, click on the cart icon
to add it to the SO

Modify the quantity of the optional product

Before this commit, the feature was barely working:
- the total price of the optional product did not change
- negative quantities were allowed
- there was no reaction when directly putting a number in the input
- when decrementing the quantity, it crashed
- untaxed and tax amounts were not dynamic

After this commit:
- the total price of the optional product changes as a function of the quantity input
- negative quantities are not allowed
- it is not possible to manually input the quantity with a keyboard
  only +/- buttons are used to change the quantity
- decrementing the quantity works
- untaxed and tax amounts are dynamic

OPW 1947769

closes odoo/odoo#32715

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-19 07:41:40 +00:00
Jairo Llopis ab1bd93dde [FIX] web: Trim spaces when selecting option by text
It's quite common that the `$().text()` method returns lots of random whitespaces at the beginning and end of the string. They're pretty unpredictable (extension views can add or remove them) and invisible to the end user.

This code chunk should allow to select an `<option>` based on its raw text content, but most of them will just fail without this patch. And most chances are that current ones just work equally with this patch.

This will make frontend tours more pleasant to write.

closes odoo/odoo#32791

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-18 09:45:52 +00:00
Pierre Masereel 0f532c3dbf [FIX] delivery: picking weight computation
The depends value on picking weight and package_ids of picking are only
set on the move_line_ids, which lead to compute the value of the picking
weight only when move lines are created or deleted and not when a
package is set on a line, quantity done changed and/or unit of measure
changed.

To fix this issue, we've changed the depends, of thos computed fields.

closes odoo/odoo#33114

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-02 13:07:33 +00:00
Christophe Simonis 82c901c937 [MERGE] forward port branch saas-15 up to d5a1ad566b 2019-05-02 09:39:20 +02:00
Nicolas Martinelli bc6d051fca [FIX] account: multi-currency payment matching
- Set the company currency in USD, activate multi-curency
- Create an invoice in EUR
- Create a payment in EUR for less than the invoice
- Open the payment matching => all amounts are in USD
- Create a write-off, reconcile

The write-off amount is incorrectly converted.

The write-off amount is sent in USD, but considered in EUR in the
server since the currency considered is the one of the line. However,
the currency in the widget is computed based on the account currency:

https://github.com/odoo/odoo/blob/b6f55dac5633d8ccb16568e0c85a5c32072e8846/addons/account/models/account_move.py#L654

Note that this is the opposite of commit 1806ea1859,
introduced in v9. Since the widget was refactored in v11, many changes
have been introduced, and we assume that this change is now justified.

opw-1907332

closes odoo/odoo#32723

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-18 08:10:24 +00:00
Nans Lefebvre 500d42ffec [FIX] l10n_in_hr_payroll: fix view inheritance after refactor
Commit d7a3f39d refactored hr views.
This broke the inheritance of the view in that module.

opw 1971570

closes odoo/odoo#32972

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-30 09:23:29 +00:00
Nicolas Martinelli 7b5b41ee88 [FIX] stock: onchange performance on picking
The use case is similar to 084dbf9b8f, but
applied to pickings.

When the picking contains many stock move, the manual edition of the
quantitites is quite slow due to the `onchange` call. In the example of
the OPW with 300 stock moves, the modification of the done quantity
triggers an `onchange` which lasts about 1 second.

The reason is the same than in the mentioned commit: the `onchange` is
triggered on all lines in the case of an inline tree view, and there is
not much we can do to optimize the business logic.

Therefore, the solution is the same: add a stat button to access the
stock moves directly in a tree view instead, to avoid this `onchange`.

opw-1965248

closes odoo/odoo#33004

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-29 08:53:49 +00:00
Nicolas Martinelli d9e76c66fe [FIX] account: payment receipt
- Create 2 invoices for a customer:
  Inv 1: 100
  Inv 2: 200
- Register a partial payment of 80 on Inv 1
- Select both invoices and pay the remaining amount (220)
- Print the 'Payment Receipt'

The 'Amount Paid' for Inv 1 is 100, while it should be 20.

This is because the report doesn't take into account which part of the
payment was used in the corresponding invoice.

Closes #32755
opw-1970401

closes odoo/odoo#33012

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-29 12:37:46 +00:00
mreficent c6d718f211 [FIX] In new records *2many, enable to handle multiple RPC inputs
closes odoo/odoo#24458

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-26 13:54:20 +00:00
Odoo Translation Bot 631abaf689 [I18N] Update translation terms from Transifex 2019-04-28 03:09:59 +02:00
Sébastien Theys af02d1da58 [FIX] website_forum: remove unnecessary slow code
Since commit 56645335b7
the subtype `gamification.mt_badge_granted` is not used anymore. Therefore
this method will never return anything.

However, it is very costly on performance, and it is run on every page of the
forum! The problematic performance point is that `needaction` is a computed
field, which implies all existing `mail.message` having the target subtype have
to be fetched to compute this field, which obviously does not scale well at all.

closes odoo/odoo#32861

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-23 07:07:57 +00:00
Nicolas Lempereur b09d20ab29 [FIX] web: no ResizeObserver video error on chrome
When displaying a video, with the browser window at a certain size, or
resizing it (or opening developer tools) we could the following error:

 "ResizeObserver loop limit exceeded"

This can be reproduced in chromium just with this JS code:

  window.onerror = function(e){ console.log(e); };
  document.body.innerHTML = '<div><video controls src="v.webm"/>';

The issue only happen if:

- the video server does not support HTTP range requests
- the controls are displayed on the video
- browser size is in problematic size/resized to problematic size

And the error is raised in window.onerror but not displayed in the
developer console.

With this change, we ignore these errors until fixed in chromium.

chromium bug tracker: https://crbug.com/809574

backport of 12.0 535da9e (in pr #30239) since video loader was in 11.0
opw-1928512
closes #32983

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-26 11:53:38 +00:00
Nicolas Martinelli bc27113cf5 [FIX] stock_account: price unit is zero
- Set a product P to average valuation, real time
- Create a PO for 1 unit @ 100, validate the picking
- Create a PO for 1 unit @ 0 (e.g. you receive a free product)

You cannot validate the picking because of the message 'The cost of P is
currently equal to 0...'

This error message is historical, to prevent users from an incorrect
configuration.

Since we still want to prevent misconfiguration, but support the
mentioned use case, we introduce an `ir._config_parameter` for people
who 'know what they are doing'.

opw-1962249

closes odoo/odoo#32550

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>

closes odoo/odoo#32951

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-25 12:01:26 +00:00
Julien Castiaux fd03786c2a [FIX] project: useless project chatter on portal
On the portal, in "/my/projects/x" it is possible to send messages in the
"Message and communication history" section. Those messages are attached
to the project model but it is not possible to access those messages
from the backend. The chatter on the project model is just a dummy
chatter with no message/thread capacities.

As messages are not accessible from the backend, the frontend section is
pretty useless. The section is no more present on v12 either.

opw-1970586

closes odoo/odoo#32952

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-25 12:44:12 +00:00
Lucas Perais (lpe) f2528a6924 [FIX] product: template creation packaging_ids
Create a new product, but don't save it just yet
give it a name,
Add some packagings
Save

Before this commit:
- the form to create the packaging had a mandatory product_id field
which is useless in a x2m context (fixed in v11.5 with a6557a2306)
- the packages disappeared after save
This was because at template creation, all "real" fields that are on
its variants must be manually set after the creation, including packaging_ids

OPW 1970589

closes odoo/odoo#32925

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-25 07:30:10 +00:00
Lucas Perais (lpe) c8fdf32db1 [FIX] point_of_sale: handle failed push of invoiceable order
The use case is a bit complicated so brace yourself:
OFFLINE
- Make an order, invoiceble with a partner
- Pay it, validate it
- An error popup is shown
=> Before this commit, the payment screen was still on
=> After this commit, the receipt screen is shown proposing to
print the invoice

ONLINE
- Make another order, non invoiceable.
- Pay it, validate it
- Both orders are now pushed to the server
=> Before this commit, it was still possible to click on "Back"
and add some products. The result of this will be that the order in DB (server)
would not have the newly added product, whereas the ticket would state that there was a new product
=> After this commit, we basically block the edition of a paid and validated order, even if the invoice
printing failed

OPW 1971028

closes odoo/odoo#32885

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-23 15:18:43 +00:00
Nicolas Martinelli a2d71ce0ea [FIX] point_of_sale: product valuation at invoice
- Create 2 companies A & B
- Set the superuser in company A
- Create a POS and a user in company B
- Create a product P. The 'Inventory Valuation' must be different in
  both companies:
  Company A: Periodic (manual)
  Company B: Perpetual (automated)
- Connect with the user in company B
- Sell the product P, select a customer and print the invoice

The COGS journal entry is not posted.

This is because `action_invoice_open` is called as `sudo()`, but
ultimately `product.valuation` is called in:

https://github.com/odoo/odoo/blob/0cce154794c8de945805d9b9acc4c33e5258191a/addons/stock_account/models/product.py#L325

`product.valuation` is computed based on the property field
`property_valuation`, which is therefore company-dependant.

Closes #32803
opw-1961861

closes odoo/odoo#32903

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-24 09:25:42 +00:00
Nicolas Lempereur c1f354beb8 [FIX] web: date field in calendar no tz issue
The calendar should send to server:

- for an all day event (all_day field on view): the date in UTC (ie. if
we are on 22 august 2018 on UTC+2, not send 21 august 2018 22:00)
- for a datetime event not all day: the UTC datetime corresponding to
UTC (for 03:25 with UTC+5 timezone, we send 22:25 the day before)
- for a date event: the date in UTC (ie. same as all day)

The current code was alright for datetime, but there was a missing case
if the start_date was a Date field (eg. project task calendar view uses
a date_deadline Date field) and not a Datetime field.

This changeset apply the same behavior as an all_day event to a calendar
with a start date that is a Date field.

Note: the issue happen since 11.0's 03d74f4 (26th march 2019) that
solved a similar case but for datetime (a datetime event at 8:00 with
timezone UTC+9 would be moved the previous day when drag and dropped on
the month view).

opw-1969876
opw-1971106
opw-1971019
closes #32796

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-04-24 09:37:29 +00:00
Nicolas Martinelli 7e312c34f7 [FIX] base: float_time
- Record a timesheet entry of '00:14'
  => it is correctly saved as 0.23333...
- Select the entry, and print 'Timesheet Entries'

The tmesheet appears as '00:13'.

This is because `minutes` is equal to `13.99999999999998`, which is
truncated to `13` at formatting.

A simple call to `round` is enough to prevent this. Moreover, we add a
check to convert 60 minutes into an hour. This is similar to:

https://github.com/odoo/odoo/blob/a73206c0b1b1519aef4e7f11d83b6a2fc31eca47/addons/web/static/src/js/fields/field_utils.js#L205-L218

opw-1969149

closes odoo/odoo#32834

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-23 11:51:21 +00:00
Denis Ledoux b71b78035b [MERGE] forward port branch saas-15 up to 0c46c8a929 2019-04-24 10:04:05 +02:00
Nans Lefebvre d6ad22227c [FIX] sale_timesheet: update delivered quantities when changing the sale_line_id
Create a SO with two lines (sol_1, sol_2) selling a given service.
On the corresponding Project/Task, set the partner so that the sale_line_id
can be chosen to one of the lines.
Add an AAL with x hours, save.
This updates the delivered quantity (x) on sol_1.
Edit, change the sale_line_id to the second one:
it updates the delivered quantity on sol_2 (to x) but not on sol_1.
Has a result, the delivered quantity has been doubled.

The issue is that the quantities are only recomputed on the SOL that we write;
instead they should be recomputed on the old one and the new one.

We base ourselves on 371a92fb which solved a similar bug to add the recompute on
both lines.

opw 1959509

11.0-opw1959509-sltmsht-len

closes odoo/odoo#32820

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-19 07:56:17 +00:00
Nicolas Martinelli fccf4f3ca4 [FIX] event_sale: canceled registrations
Fine tuning of ac31252d54

Do not pre-filter on canceled entries since they are used a few lines
below.

opw-1964459

closes odoo/odoo#32835

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 12:40:17 +00:00
Simon Lejeune aac14d23da [FIX] stock: cache invalidation in _action_assign
`reserved_availability` is a computed field of a move depending on its
move lines. We access this field at each iteration of the loop over the
moves to assign and then we create a new move line for it. This triggers
an invalidation of this field, The next iteration will again access this
field and prefetch it for all the next records.

We read the field out of the loop and don't access it again to prevent
these prefetch/invalidation issues.

Confirmation of a PO of ~800 lines goes from 5 minutes to 1 minute.

opw-1953398

closes odoo/odoo#32774

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>

closes odoo/odoo#32805

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-18 12:55:33 +00:00