Commit Graph
117906 Commits
Author SHA1 Message Date
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
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
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
Jeremy Kersten 9854e0e908 [FIX] mass_mailing: support partner_id field
Manual cherrypick of 83b37a8
sale.order but also event.track need to use partner_id as email field

Closes #31954

closes odoo/odoo#31967

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-20 13:04:00 +00:00
Nicolas Martinelli 7e6577398a [FIX] fleet: expired contract
- Create a contract for a vehicle
- Renew the contract and set old one to closed
- Run the cron 'Fleet: Generate contracts costs based on costs
  frequency'

The closed contract is reset to expired.

The contract should remain closed.

opw-1949470

closes odoo/odoo#31974

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-20 10:32:29 +00:00
qsm-odoo 92f8a3c9ef [FIX] web_editor: review drag and drop in the editor
Forward-port of https://github.com/odoo/odoo/commit/be689c53c13330832510c8cef332ac862d4ed5e8
was missed from 11.0.

closes odoo/odoo#31971

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-20 10:15:49 +00:00
Nicolas Lempereur 98fe5054c2 [FIX] payment_stripe: open>exit>open opened 1 time
If using Stripe we did "Pay Now" -> close modal -> "Pay Now" we would
get 2 modals and possibly be blocked by infinite loading.

With this changeset, we only execute one time our strip.js file so we do
not declare multiple MutationObserver.

We also only open one checkout at a time from stripe when closing and
opening it or multiclicking click (the later one that could block the
interface with several stripe iframe opened and one with a infinite
loading wheel).

opw-1939323
closes #31928

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-19 14:09:32 +00:00
XavierDo a4049296d9 [IMP] core: avoid to process work when worker is 'killed' during sleep.
If a signal is received during the worker _runloop sleep,
the worker will be marked as alive=False but process_work
will still be called once.

This commit prevents that by checking the worker state before
calling process_work.

closes odoo/odoo#31885

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-19 09:43:10 +00:00
Fabien Meghazi f1c72ee8ee [FIX] base: fix ir.logging database locking when using --log-db
Before this patch, the ir.logging's write_uid field was a many2one which
could cause a module install/update to hang when the module is changing
the res.users model schema and when this module causes to orm to warn
through the logger. (eg: declaring two res.users fields with the same
string attribute)

In such situation the transaction cursor that is processing the
res_users table alteration will be granted an exclusive postgresql lock
hence causing the ir_logging insertion to block because of the write_uid
foreign key to res_users.

This issue has never been raised by runbot as it is using a remote
database with --log-db

Note: the write_uid conversion from m2o to int was left over in commit e6a5d82

closes odoo/odoo#32015

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-18 16:11:25 +00:00
Nicolas Martinelli 84df9948ed [FIX] mrp: write on done WO
Do not allow to write on a done WO except for time log.

Partial backport of aafa0490cb540f1646e1d81c6cdb0cfd4a8b2429

opw-1946121

closes odoo/odoo#31917

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-18 13:15:00 +00:00
Adrien Dieudonne 7e33b54771 [FIX] barcodes: let focus in number, password, tel, phone inputs
Before this commit, users wasn't able to input values in some
input elements like password, email and phone in mobile.

Steps to reproduce:
- Go to user
- Select Preferences
- Select Change password
- Try to input something
=> The focus was lost and the keyboard disappeared

In fact, a hidden input always have the focus when no other fields
need it. This input is used to intercept a value from a barcode
scanner.

So now, we added some input types to avoid to set the focus on the
barcode input.

The barcode input is now always defined (even if not used in desktop)
to be able to mock a Chrome mobile environment in a test.

opw-1936712
opw-1948266

closes odoo/odoo#31841

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-03-18 13:16:57 +00:00
Christophe Simonis 2940ee6b35 [MERGE] forward port branch saas-15 up to c6353942ff 2019-03-18 14:17:54 +01:00
Christophe Simonis c6353942ff [MERGE] forward port branch saas-14 up to 5162ca7be7 2019-03-18 10:53:01 +01:00
Christophe Simonis 5162ca7be7 [MERGE] forward port branch 10.0 up to 36ba37a7a1 2019-03-18 10:20:06 +01:00
Xavier MorelandDaniel Reis 1f008a439a [FIX] stock: inefficient traceability domain
PR #31086 converted the not-downstream traceability domain to use a
filter instead as =/!= False on an o2m can lead to memory issues due
to the way they're currently implemented / transformed. This also
converts the downstream versiom just in case and to limit deviations
between the branches.

Co-Authored-By: Daniel Reis <dgreis@sapo.pt>

closes odoo/odoo#31901

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-03-18 08:53:21 +00:00
Denis Vermylen 744bdd275e [FIX] server.py: stop the FSWatcher when stopping the server
Avoid potential tracebacks from the FSWatcher's thread being killed.

Drawback: Server shut down can have an extra small delay

(only applies when the --dev=reload option is given)

closes odoo/odoo#31855

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-15 14:18:11 +00:00
Denis Vermylen 7b6cfc412e [IMP] server.py: --dev=reload with inotify
Add the alternative of inotify instead of watchdog to watch the addons
paths the server was started with.

Reason: watchdog spawns 2 threads per path to watch. When there are a
lot of addons paths, this can become too costly. With inotify we watch
all the repositories in a single thread.

https://github.com/dsoprea/PyInotify

installation:

    pip install inotify
2019-03-15 14:18:09 +00:00
Nicolas Martinelli 36ba37a7a1 [FIX] base: default rate
We set the default rate to be 1.0 instead of 0.0, since a rate of 0.0
doesn't make sense.

Partial backport of 298491597c

opw-1949866

closes odoo/odoo#31866

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 09:58:51 +00:00
Denis Vermylen 83b2d2e1b5 [FIX] server.py: don't start multiple FSWatcher in multiworker mode
Before this commit every worker would start his own FSWatcher.
2019-03-14 14:37:57 +00:00
Lucas Perais (lpe) 04f7c650d0 [FIX] l10n_fr_fec: float representation when summing
Before this commit, it may happen that the the grouped account move lines
sum will be business-wise "zero" but that its representation in SQL will not be
rather, it will be equal to "10^[-high number]"

After this commit, we round the sum to the number of digits of the company's currency
to see if it is equal to zero, or not.

We also need to filter out the specific case of unaffected earnings

OPW 1942177

closes odoo/odoo#31755

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-14 13:14:07 +00:00
Jorge Pinna Puissant 1ceb689805 [FIX] account: missing partner bank account in vendor credit note
Have a partner (vendor) with a bank account.
Create a Vendor Bills. Change the form view of the vendors bills to
display the field partner_bank_id ('Bank account').
The field shows correctly the bank account of the vendor.

Before this commit, when creating a Credit Note, the field
partner_bank_id is empty.

Now, the field parnet_bank_id is the one of the Company.

opw-1903143

closes odoo/odoo#31554

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-18 08:47:57 +00:00
Nicolas Martinelli a03bd36ec8 [FIX] point_of_sale: picking on move line
- Activate Lots and S/N
- Track a product A by unique S/N
- Receive one unit of A
- Sell the unit of A through the POS
- Go to Invnetory > Products > Lots/Serial Numbers, and open the
  Upstream Traceability report

The line corresponding to the outgoing move line is not linked to the
corresponding picking.

The field `picking_id` is empty on the `stock.move.line`, so the link is
not directly retrieved.

Related to #31879 which fixes the issue for existing `stock.move.line`.
opw-1939413

closes odoo/odoo#31880

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 13:21:25 +00:00
Nicolas Martinelli e7c92352be [FIX] stock: picking of move line
- Activate Lots and S/N
- Track a product A by unique S/N
- Receive one unit of A
- Sell the unit of A through the POS
- Go to Inventory > Products > Lots/Serial Numbers, and open the
  Upstream Traceability report

The line corresponding to the outgoing move line is not linked to the
corresponding picking.

The field `picking_id` is empty on the `stock.move.line`, so the link is
not directly retrieved.

Even if the POS should set the `picking_id` field, the traceability
report should fallback on the picking of the move.

opw-1939413

closes odoo/odoo#31879

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 13:03:36 +00:00
Odoo Translation Bot 6b4a35facd [I18N] Update translation terms from Transifex 2019-03-17 03:13:11 +01:00
Cedric Snauwaert 1834b80bfa [FIX] account: error in concurrent update while reconciling
In reconciliation widget, when clicking reconcile with some existing line. if by any chance the transaction gets rolled back because of a concurrent update, the next replay attempt will use the modified parameters, and we will get a KeyError. Retrying the operation will succeed as soon as no other transaction conflicts again.
Altering mutable RPC parameters is a bit risky in a public RPC method, particularly when those altered parameters will modify the effect of the method. Making a deepcopy of the parameters before using them is an easy workaround. The framework does not do it by default because of the hard-to-foresee memory overhead it would have.

fixes #25403

closes odoo/odoo#31882

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-15 13:01:03 +00:00
Antoine Prieels f3ea68c909 [FIX] point_of_sale: Remove padding from customer display
closes odoo/odoo#31869

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-03-15 09:35:38 +00:00
Denis Vermylen a1fa9faa31 [FIX] server.py: FileNotFoundError doesn't exist in P2
Python2 uses IOError instead.

/!\ DO NOT FORWARD PORT AFTER 11.* /!\
2019-03-14 10:06:04 +00:00
Christophe Simonis 21ef0f4f6d [MERGE] forward port branch saas-14 up to d5a8b238fa 2019-03-13 16:06:34 +01:00
Christophe Simonis d5a8b238fa [MERGE] forward port branch 10.0 up to 49ca43d75c 2019-03-13 13:23:43 +01:00
Denis Vermylen 791a38a655 [FIX] web: qweb2: allow null values in a foreach iteration
Before this commit iteration in a t-foreach containing null or
undefined values crashed because they have no attributes.

closes odoo/odoo#31828

Signed-off-by: Fabien Meghazi <amigrave@users.noreply.github.com>
2019-03-12 16:15:39 +00:00
Nicolas Lempereur 79d5d57d0a [FIX] l10n_be_intrastat: typo EXTRF now 29/19
Intrastat was modified on january 2019 to backport some features for new
regulation of belgian intrastat in c5a8e3975.

There was a coding typo so EXTRF was <Report/> code attribute instead.

sources:
 https://www.nbb.be/doc/dq/e_pdf_ex/docxml-en.pdf
 https://www.nbb.be/doc/dq/f_pdf_ex/docxml-fr2019.pdf

opw-1948336
closes #31875

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-15 12:28:07 +00:00
Antoine Prieels fa10ba3416 [FIX] hw_screen: Use full width of display
The customer display used only a small part of the available width.

closes odoo/odoo#31865

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-03-15 09:24:28 +00:00
Toufik Ben Jaa 7ac7c97762 [FIX] portal: Portal User creation login check
- When creating a user from the "Grant Portal Access" wizard, the code
  checks for duplicate users.
  It does so by checking if there is a user with the same login as the
  one we want to create.

  The check is case sensitive which could lead to issues.
  For example a mistyped email (with a uppercase somewhere) could fail
  the duplicate user check.
  Since emails are not case sensitive, we want the check to be case
  insensitive too.

  OPW-1932918

closes odoo/odoo#31818

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-13 12:46:21 +00:00
xmo-odoo 747e05db55 [IMP] base: remove prefetch when getting commercial fields
This is related to issue #31549, fixing it in 10 since it's already a
minor issue here (importing 500 partners which all have the same parent,
on my system the import time goes from 2:30 to 2:00).

This is mostly a problem for such fields as `property_product_pricelist`
(added do the commercial fields list by `product`): since we're first
getting it then writing a field it depends on (updating the address,
which contains the country), the field gets invalidated for all records
on each record being imported, so if we're importing a bunch of partners
which all have the same parent (e.g. company employees)
`property_product_pricelist` is going to be re-computed for every
partner imported so far as well as the one parent we're interested in,
for every new partner we're creating.

The problem is much more prevalent with 12.0's batched creates as we're
first creating all the new partners then doing the updates, and thus for
each new partner we're computing `property_product_pricelist` for all
new partners and the one parent we're interested in, roughly doubling
the import time of a series of partners which all have the same parent.

closes odoo/odoo#31804

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-13 08:45:11 +00:00
Rémi Rahir 49ca43d75c [FIX] website_sale: filter fiscal positions on company v2
Sequel of cc54194e13.
The mentioned fix only worked when the user was public.

The problem arises when calling the function `_get_fpos_by_region()`
in `sudo` without specifying the company and this happens, for instance,
in every `onchange_partner_*` function of a sale order.

We propose to add the `force_company` key in the context of the sale
order to ensure the right company when selecting the fiscal position.

closes odoo/odoo#31751

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-03-11 14:57:21 +00:00
Yoshi Tashiro 084246a54e [FIX] l10n_jp: wrong user type, add accounts
- Fixes incorrect user type assignments on some accounts
- Fixes incorrect account assignments on taxes
- Adds a few accounts that Japanese companies would typically need
- Changes some account codes to make the structure more consistent
- Updates descriptions of some taxes to make them appear more natural
  on PDF reports

closes odoo/odoo#30780

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-11 07:15:54 +00:00
Christophe Simonis 21c84f1532 [MERGE] forward port branch saas-14 up to b47749effd 2019-03-08 13:09:26 +01:00
Christophe Simonis b47749effd [MERGE] forward port branch 10.0 up to 88de931141 2019-03-08 13:08:58 +01:00
Romain Derie 88de931141 [FIX] payment_authorize: use SHA-512 instead of MD5 as not supported
Authorize.Net is phasing out the MD5 based hash use for transaction response
verification in favor of the SHA-512 based hash utilizing a Signature Key.

Instead of hashing with md5 the transaction key, it is now required to hash
the signature key (binary format) with SHA-512.

Support for MD5 will be dropped the 7th March 2019 for sandbox environment and
the 28th March 2019 for production environment, initially planned for the 14th.

Note that as of February 11, 2019 authorize removed the ability to configure or
update MD5 Hash setting in the Merchant Interface.
Merchants who had this setting configured have been emailed/contacted.

opw-1943030

Usefull links:
https://developer.authorize.net/support/hash_upgrade/
https://support.authorize.net/s/article/What-is-a-Signature-Key
https://support.authorize.net/s/article/MD5-Hash-End-of-Life-Signature-Key-Replacement
https://support.authorize.net/s/article/Do-I-need-to-upgrade-my-transaction-fingerprint-from-HMAC-MD5-to-HMAC-SHA512-and-how

closes odoo/odoo#31642

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-03-08 10:14:57 +00:00
Florent de Labarre 5aa00c3362 [IMP] web: allow to override the number of buttonbox buttons
See odoo/odoo#31546

closes odoo/odoo#31698

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-08 09:38:23 +00:00
svs-odoo 776cab07d0 [FIX] mrp: tracked products follow putaway strat.
Before this commit, when a product goes from manufacturing order to
location having putaway strategy, if this product is tracked, the
putaway strategy don't apply.

opw-1948514

closes odoo/odoo#31808

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-14 15:22:36 +00:00
cristinamartinrod ca1b201cec [FIX] website_mass_mailing: translate button
The text was in a value tag, making it untranslatable

Closes odoo/odoo#30774

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-07 15:36:58 +00:00
Pedro M. Baeza 98b2784d1e [CLA] backport of e78af353fc to 10.0
Include cristinamartinrod in CLA of Tecnativa

Needed for odoo/odoo#30774
2019-03-07 15:36:47 +00:00
Rémi Rahir cc54194e13 [FIX] website_sale: filter fiscal positions on company
When creating a cart on the website, the website company was not
considered which could end up with the selection of a fiscal position
linked to a wrong company since the method is called in sudo.

closes odoo/odoo#31673

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-03-07 15:38:10 +00:00