Commit Graph
117988 Commits
Author SHA1 Message Date
Olivier Dony 6cbecced3d [FIX] requirements: bump up jinja2 reqs
Recommended by GitHub's repository alerts.

We normally stick as close as possible to the version we depend
on in the official DEB packages. This in turn depends on the version of
Debian stable at the time of release - for 11.0 that would be Debian 9
(stretch) and thus Jinja 2.8 (with security backports).

However Jinja2 before 2.10.1 suffers from a few issues that could lead
to crashes of Odoo processes.

It seems it's worth an exception to our rule for pip users, similarly to
previous bump up at d2605bccdb.

closes odoo/odoo#32601

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-10 18:03:01 +00:00
Odoo Translation Bot 330e1ea4ab [I18N] Update translation terms from Transifex 2019-04-14 03:14:27 +02:00
Nans Lefebvre eec428b725 [FIX] account: correct communication when registering payment for multiple invoices
When a user register a payment for multiple invoices,
the communication field is populated using all invoices.
However the payment should use the communication individually for each invoice.
This is a behaviour closer to what is done in 74b6f84cc8 for v12.

opw 1954887

closes odoo/odoo#32143

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-27 09:24:40 +00:00
Nans Lefebvre a441e89c9f [FIX] purchase: update reference onchange of purchase_id
Commit 1be873d removed the modification of the reference field
from the _onchange_origin.
The reasoning was that since this is an onchange on invoice_line_ids, it was
applied too often, which annoyed users in the case they overwrote that field.

However when using the "Autocomplete" field (purchase_id),
then the user expects values to by modified.
Before, it worked by setting the origin field, which trickled down
to the reference.
Since that commit removed this, we re-add it explicitly in that case.

opw 1962364

closes odoo/odoo#32656

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-11 08:11:17 +00:00
Nicolas Martinelli 309f152ca4 [FIX] website_sale: default mail template
The field `order_mail_template`'s purpose is to provide a shortcut to
help the configuration. When `website_quote` is installed, it points to
a template which is actually never used anywhere.

opw-1961866

closes odoo/odoo#32543

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-09 09:28:31 +00:00
Johan Demaret Rivarola 45010151dd [[FIX] account: l10n_mx_edi installation
To comply with Mexican laws, this l10n_mx_edi should always be installed when
both l10n_mx and the accounting modules are installed.

It should ease the onboarding process a bit too.

opw-1960982
closes #32566

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-10 06:57:09 +00:00
Christophe Simonis 492c5b6e17 [FIX] survey: prefill checkboxes
Oversight of 82d733d68c

See #32149

closes odoo/odoo#32557

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-09 16:54:42 +00:00
Jorge Pinna Puissant 1cf284e91e [FIX] calendar: alarm for past events
Before this commit, Odoo notifies the user of all the recurring past
events, existing before the installation of the module Calendar (old
events imported when synchronizing with Google, for instance). This
occurs only the first time a synchronization with Google is made. This
occurs because Odoo notify all the events that occurs since the last
time it notified, and the first time you install the module the date of
the last notification is empty.

Now, when the module Calendar is installed, the date of the last
notification is set by default to the current date (the date of the
installation of the module)

opw-1942443

closes odoo/odoo#32535

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-09 06:16:41 +00:00
Christophe Simonis 9a7e3c8b49 [MERGE] forward port branch saas-15 up to cd28e53a31 2019-04-08 16:46:31 +02:00
Christophe Simonis cd28e53a31 [MERGE] forward port branch saas-14 up to 32c2af2376 2019-04-08 15:53:36 +02:00
Thibault Delavallée 32c2af2376 [FIX] mass_mailing: correctly find partner email in mass mailing
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.

However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).

This commit fixes it by correctly matching partner id and its found email.

[1] See 65ed4553a5
2019-04-08 15:18:18 +02:00
Christophe Simonis e831064d93 [MERGE] forward port branch 10.0 up to 6431e366a8 2019-04-08 15:12:52 +02:00
SimoRubi 6431e366a8 [FIX] web: call method with correct record
_compute_website_url can only be called on singletons
It should not be called with self but the record we are iterating on

closes odoo/odoo#32369

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 09:26:01 +00:00
Adrian Torres 3f3d2b2773 [FIX] base: prevent module operations while cron is running
closes odoo/odoo#32234

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-05 13:10:35 +00:00
Damien Bouvy a25abec95c [FIX] orm: don't crash on index creation
For existing installations, creating indices might not always be
possible, e.g. if you have a Text/Char field that has an index=True
set on it in a field override and pre-existing rows longer than
the pg supported size , the index creation will fail.

Instead of failing miserably during the schema modification, simply
log the problem instead and keep going.

closes odoo/odoo#32442

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-05 07:53:07 +00:00
Christophe Simonis 214e819c1b [MERGE] forward port branch saas-14 up to 6e0c89867e 2019-04-04 19:34:35 +02:00
Christophe Simonis 6e0c89867e [MERGE] forward port branch 10.0 up to 60592561d7 2019-04-04 18:33:42 +02:00
qsm-odoo 60592561d7 [FIX] web_editor: support youtube-nocookie.com
closes odoo/odoo#32332

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-04 09:21:09 +00:00
Goffin Simon 94d15e037c [FIX] account_set: Wrong recomputation of the depreciation lines
When a asset is confirmed, it's not allowed to link it to an invoice.
Side effect, it recomputed the depreciation lines of the confirmed asset.

opw:1961468

closes odoo/odoo#32388

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-04 07:02:53 +00:00
Nicolas Lempereur e14c386a19 [FIX] point_of_sale: allow connect proxy https error
Since 79af654fc61 if we had unexpected configuration of usage such as
being in HTTPS, having a POS hardware in HTTPS but an error is received
(eg. the device is closed) => the POS interface can't be opened being
blocked on an error:

 Https connection to IoT Box failed
 Make sure you are using IoT Box v18.10 or higher.

 Navigate to {proxy_ip} to accept the certificate of your IoT Box.

With this changeset, we have a popup that does not prevent to open the
point of sale interface (and  the red disconnected status in the top
left allow to retry connection as before) on first load.

opw-1934413
closes #32306

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-03 10:39:37 +00:00
Christophe Simonis 180f105508 [MERGE] forward port branch saas-14 up to d158a8ffbf 2019-04-02 12:34:15 +02:00
Christophe Simonis d158a8ffbf [MERGE] forward port branch 10.0 up to 2d30bd9698 2019-04-02 12:28:19 +02:00
Nicolas Martinelli 9f2dd49c57 [FIX] product, purchase: seller in multi-company
- Create 2 companies A & B
- For a product P, create a supplier info for each company using the
  same partner, with a different price and delay.
- Order the supplier so that the one for A has a higher priority than
  the one for B.
- Create a reordering rule for P in company B.
- Run the scheduler as admin (e.g. thanks to the cron).

The price taken is the price for company A instead of B.

`_select_seller` is not company-aware, therefore the first matching
supplier is chosen.

opw-1959263

closes odoo/odoo#32328

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-02 08:33:15 +00:00
Jigar Vaghela 9fc21c9b61 [FIX] l10n_pl: incorrect command
The `(6,0,[*])` command is missing from `vs_kraj_7`.

closes odoo/odoo#32358

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-03 06:05:50 +00:00
Odoo Translation Bot 2d30bd9698 [I18N] Update translation terms from Transifex 2019-04-01 02:44:26 +02:00
Nans Lefebvre 6b9b9d8997 [FIX] base_geolocalize: raise a helpful error to configure the Google account
Google maps used to be free, but became a paid API.
Technically, the usage could be part of the free offer,
but to benefit from it the account needs to have billing enabled.
Since it's a paid feature security had to be ramped up,
so now APIs have to be explicitly enabled (here geolocating/geocoding).
All this makes it so that the Google account has to be properly configured
before the calls to the Maps API can work.
As a result we add an explicit UserError if the request fails,
to help the user configure the Google account
(before the error was entirely hidden as to give the user no chance at all).

Also exports transaltions, including for commit e6ca846c65
which raised a similar error message if no API key was found.

opw 1946485
opw 1947292
opw 1947337

closes odoo/odoo#32162

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-29 11:33:00 +00:00
Christophe Simonis 23650d5217 [MERGE] forward port branch saas-14 up to 7dd2a642ed 2019-03-28 16:53:18 +01:00
Christophe Simonis 7dd2a642ed [MERGE] forward port branch 10.0 up to 14a8148e8d 2019-03-28 16:52:53 +01:00
Christophe Simonis 14a8148e8d [FIX] hw_escpos: define used variable
Oversight of #32079
2019-03-28 16:50:16 +01:00
Christophe Simonis 6b54bd88a9 [MERGE] forward port branch saas-14 up to 78f01e3609 2019-03-28 15:46:55 +01:00
Christophe Simonis 78f01e3609 [MERGE] forward port branch 10.0 up to 6814f27bbc 2019-03-28 15:46:04 +01:00
Christophe Simonis 6cd6d1d468 [MERGE] forward port branch saas-14 up to 3c7be1e88f 2019-03-25 13:32:17 +01:00
Christophe Simonis 3c7be1e88f [MERGE] forward port branch 10.0 up to a95811eee2 2019-03-25 13:30:34 +01:00
Bernard Letourmy 8d95b6c172 [CLA] Signature for bletourmy
closes odoo/odoo#32092

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 11:04:58 +00:00
Nicolas Lempereur e1b1d3cd1b [FIX] web_editor: no lose tooltip on selection
The editor has a tooltip editor wizard "Change media description and
tooltip", but when selecting an image there is also a tooltip:

  "Double-click to edit"

added by the editor.

The combination of the two break the functionality, eg:

- if a tooltip is set with editor, then selecting the tooltip: we see
  the set tooltip and not "Double-click to edit"

- if a tooltip is set with editor, then selecting the image back, then
  opening the tooltip editor => the set tooltip is lost

With this changeset, we just do not show "Double-click to edit" tooltip
if there is a tooltip set on the element.

opw-1946801
closes #32482

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-08 08:17:57 +00:00
Odoo Translation Bot 610ab82b51 [I18N] Update translation terms from Transifex 2019-04-07 03:14:49 +02:00
Jorge Pinna Puissant f666d78ff1 [FIX] base_address_city: city field without CSS class
Have the module 'City Addresses' installed.
Open a contact, with the city field and  the zip code field filled.

Before this commit, there is a display error, the city and the zip code
are bonded. This occurs because the 'City Addresses' module override all
views with the city field. In this override the city field don't had a
CSS class.

Now, the city and the zip code are display correctly.

opw-1958175

closes odoo/odoo#32455

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-05 11:56:22 +00:00
Matthew Watkins 1ad2a864df [CLA] signature for matthewdwatkins
closes odoo/odoo#32435

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-05 09:36:43 +00:00
Lucas Perais (lpe) 6524b79652 [FIX] stock: constrains should raise ValidationError
Before this commit, some constrains rose UserError
Which is not compliant with the api.constrains

After this commit, the constrains raise ValidationError

OPW 1949572

closes odoo/odoo#32444

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-05 08:17:05 +00:00
jev-odoo 741ffc45d1 [FIX] account_payment: invalid partner on payment token
The payment token was created using the partner of the invoice,
not the one really paying the bill.

opw 1938787

closes odoo/odoo#32176

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-05 08:15:58 +00:00
Christophe Simonis e3f5f17561 [MERGE] forward port branch saas-15 up to 214e819c1b 2019-04-04 20:07:27 +02:00
Damien Bouvy ce8d651cce [FIX] orm: don't crash on index creation
Creating field indexes might not always be possible.  For instance,
adding an index on an existing Char/Text field will fail if the column
contains values longer than 8192 bytes (PostgreSQL limit for BTrees).

Instead of failing miserably during the schema modification, simply log
the problem and continue.

closes odoo/odoo#32416

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-04 11:47:20 +00:00
Nicolas Martinelli 8b6be83f70 [FIX] stock_account: zero quantity
- Set up a stockable product for which the product category is FIFO / Perpetual
- Create a PO for this product with a unit price of 100$
- Confirm the purchase order
- Receive the item in stock
- Create a SO for this product
- Confirm the SO
- Deliver the item
- Unlock the delivery order and change the done quantity to 0
- Unlock the delivery order and change again the done quantity to a positive value

A `ZeroDivisionError` is raised.

Since `move.product_qty` is still zero, we fallback to `quantity`.

opw-1963984

closes odoo/odoo#32421

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-04 12:05:39 +00:00
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
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