Commit Graph
123681 Commits
Author SHA1 Message Date
Aaron Bohy 8d34eb1328 [FIX] web: editable list: shift-tab and readonly fields
Before this rev., navigating with shift-tab didn't produce the
expected result when there were readonly fields on the way. For
instance, pressing shift-tab on a field:
- to the right of a readonly field: the focus was kept in the
  current field, whereas it should have been moved to the first
  editable field to the left of the readonly one
- in the editable first cell of a row, with a readonly field in
  the last column: the focus was moved to the previous line,
  which is ok, but on the first editable cell of it, whereas it
  should have been on the last editable cell.

@KangOl this commit needs to be forwardported up to saas-12.2, not
later (the code slightly changed in saas-12.3, and we did another
version of the fix).
2019-04-08 11:32:18 +00: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
Nans Lefebvre ea1fc124ef [FIX] purchase: update reference onchange of vendor_bill_purchase_id
Commit 1be873d4 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 (vendor_bill_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#32500

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-08 13:18:51 +00:00
Jalpesh Patel e524a25004 [FIX] digest: fix m2m typo that would not do whats expected
m2m ORM operation (4, id, _) was not correctly used, resulting in an
unexpected behavior. Instead of adding the record, it would add the record and
also the res.user(4,).

As that used is generally the public user, without an email address, that bug
would not be that critical but if that res.user(4,) does not exist (eg deleted),
then the code simply crash as it tries to read user 4 from db.

closes odoo/odoo#32425

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-08 09:30:41 +00:00
Christophe Simonis fef49061ea [MERGE] forward port branch saas-11.3 up to 4c61621efb 2019-04-08 19:52:29 +02:00
Christophe Simonis 4c61621efb [MERGE] forward port branch 11.0 up to 9a7e3c8b49 2019-04-08 17:45:00 +02: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
Thibault Delavallée ebba721130 [FIX] mass_mailing: fix statistic state computation
Replied / Bounced / Opened states should be computed prior to Sent state.
Indeed Sent is the default state once the email is sent. Then replied,
bounced and opened are states that happen after sending the email. It
is therefore necessary to re-order the state computation to correctly compute
the statistic state.

Related to task ID 1924711
Linked to PR #32496

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-08 12:39:41 +00:00
Thibault Delavallée b0491c4445 [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.

Related to task ID 1924711
Linked to PR #32496

[1] See 65ed4553a5
2019-04-08 12:39:18 +00:00
Andrey Semko 986e405457 [CLA] signature for andriisem
closes odoo/odoo#32490

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 10:26:36 +00:00
Mohammed Mahgoub 8ac788adff [FIX] doc: Steps to install website theme in v12.0
Correct the instructions needed to install a website theme
In 12.0 the steps have changed

closes odoo/odoo#31886

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 12:41:14 +00:00
Mohammed Mahgoub 8f5a0d782f [CLA] signature for Mohammed Mahgoub 2019-04-08 12:38:15 +00: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
Jorge Pinna Puissant bb17098172 [FIX] mail: only display errors linked to message of current user
fine-tuning commit 1120bffb66

Before this commit, the search on message_has_error (used when clicking
on a failure notification) only display errors linked to message of the
current user. Also, the filter Has_error is true, in the messages view
in technical menu only display the message with errors of current user.

Now, the filter Has_error is true display the message with errors of all
users. The search on message_has_error behave as before.

opw-1958813

closes odoo/odoo#32462

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-04-05 13:20:21 +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 b3d4c2d178 [FIX] account: IndentationError
Oversight of previous forward-port.
2019-04-02 17:44:36 +02:00
Christophe Simonis 1122b62d00 [MERGE] forward port branch 11.0 up to 4df568549a 2019-04-02 16:35:17 +02:00
Christophe Simonis 4df568549a [MERGE] forward port branch saas-15 up to 180f105508 2019-04-02 13:58:03 +02: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
Nicolas Martinelli 180866fe1e [FIX] website_sale: discount
- Go to Sales > Configuration > Settings
- Enable "Multiple Sales Prices per Product" and select option "Prices
  computed from formulas (discounts, margins, roundings)"
- Go to Sales > Catalog / Pricelists
- Select "Public Pricelist" and set "Discount Policy: Show public price
  & discount to the customer"
- Go to the eCommerce, buy "iPad Retina Display" which as a 20 %
  discount

In the corresponding SO, the discount appears to be zero, and the
discount is included in the price unit. However, adding the product
directly to the SO in the backend displays the discount as expected.

There should not be a difference in behavior between the eCommerce and
the backend.

Fixes #31337
opw-1943989

closes odoo/odoo#31965

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-02 07:43:06 +00:00
Nicolas Martinelli fb48e49779 [FIX] account: deprecated accounts
Deprecated accounts are available in the reconciliation widget, while
they shouldn't be.

opw-1949667
opw-1945585

closes odoo/odoo#32304

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-01 13:37:04 +00:00
Nicolas Martinelli ef4aaeb4e7 [FIX] base: res.partner.bank sequence
`res.partner.bank` is ordered by sequence, but:
- there is no default value
- there is no widget handle to set it

Therefore, methods such as `_get_partner_bank_id` might retrieve an
unexpected value.

To avoid this:
- we fallback to sort by ID
- we add a default value
- we add the widget handle

opw-1948964

closes odoo/odoo#32300

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-01 12:48:04 +00:00
Nicolas Martinelli 67ea26460f [FIX] stock_account: inventory with company
- Set a company on the inventory location
- Create a stockable product, FIFO, real-time, with a cost
- Receive a unit

The product stock value remains zero.

The fact that the inventory location has a company set should not impact
the product cost. This is useful when a scrap location as a company set.

The domain of move selection is incomplete. It should be, for the 'in'
moves:
- coming from a location without company, or an inventory location
  within the same company
- going to a location within the same company

For the 'out' moves:
- coming from to a location within the same company
- going to a location without company, or an inventory location within
  the same company

opw-1943384

closes odoo/odoo#31485

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-01 11:00:29 +00:00
Odoo Translation Bot 2d30bd9698 [I18N] Update translation terms from Transifex 2019-04-01 02:44:26 +02:00
Nicolas Martinelli f7301a8eef [FIX] website_quote: redirect quotes only
- Create 2 identical SO: one with a quotation template set, the other
  without
- Validate them
- Go to the portal at `/my/orders`, access both orders

The order without template redirects to `/my/orders/<ID>`, while the
order with template redirects to `/quote/<ID>`.

Once the SO is validated, there is no reason to show a different page.
The redirection should only apply to non-validated SO.

opw-1925131

closes odoo/odoo#32262

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 15:51:59 +00:00
Odoo Translation Bot 48d88b6e6d [I18N] Update translation terms from Transifex 2019-03-31 03:16:57 +02:00
Olivier Colson b344c3c601 [FIX] l10n_jp: fix tax accounts
Forward port of commit https://github.com/odoo/odoo/commit/084246a54ed68e2898e9c713345192b2a33ddd81 (10.0) into https://github.com/odoo/odoo/commit/5e9ebe86bae53f019981361bbcc2f03a5d49e0cb (11.0) had wrongly replaced account code A21809 by its old version, A21807, in tax templates. It made the module uninstallable, as A21807 does not exist anymore.

closes odoo/odoo#32252

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 14:01:19 +00: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
Martin Trigaux 14f893752a [I18N] *: export 11.0 source terms
Some were missing or lost during forward port

Fixes odoo/odoo#32217

closes odoo/odoo#32232

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 09:13:25 +00:00
Christophe Simonis ec29b4d364 [MERGE] forward port branch 11.0 up to 4231103cc9 2019-03-28 18:17:20 +01:00
Christophe Simonis 4231103cc9 [MERGE] forward port branch saas-15 up to 23650d5217 2019-03-28 16:54:21 +01: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 a039d657e4 [MERGE] forward port branch saas-15 up to 6b54bd88a9 2019-03-28 16:05:06 +01:00