Commit Graph
123511 Commits
Author SHA1 Message Date
Goffin Simon 660cd529ad [FIX] product: Issues with product configurator with single attribute values
When creating several attribute lines for the same attribute, the function _update_product_template_attribute_values
in model 'product.template.attribute.line' only kept the product.template.attribute.value records of the last
created line. So it generated issues with the product configurator because no value was founded for certain attribute line
in function _get_possible_combinations defined in model 'product.template'.

Now it's forbidden to create several attribute lines for the same attribute.

opw:1950786

closes odoo/odoo#32086

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-26 10:45:28 +00:00
Nicolas Martinelli f5e99060b6 [FIX] stock: discard scrap
- Process a WO (e.g. 'Manual Assembly' from the demo data)
- Create a scrap for component 'Drawer Black'
- A new wizard appears:
  'The product XXX is not available in sufficient quantity'
- Click on 'Discard'

A scrap is created in draft, but it cannot be canceled.

The scrap shouldn't have been created in a first place, but this cannot
be changed in stable. Therefore, we delete it.

opw-1946254

closes odoo/odoo#32122

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 09:32:43 +00:00
Lucas Perais (lpe) 80b900ee57 [FIX] account: reconciliation matching rule div by zero
Do a MISC operation representing a payment
revert it

Do a statement line for that amount

Click on "reconcile" on the bank journal

Before this commit there was a Division By Zero traceback
This was because the bank account line had a zero amount_residual
due to its reversion
while the statement line was negative.

After this commit, for liquidity lines, we take the total amount instead of the residual
Because a reverted payment line can always be associated with a statement

OPW 1947362
courtesy of @smetl (las@odoo.com) for the fix

closes odoo/odoo#32105

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-26 08:35:51 +00:00
Nicolas Martinelli b8950ab49a [FIX] purchase: currency of supplierinfo
Set the currency of the supplier info according to the currency set on
the partner.

opw-1951314

closes odoo/odoo#32098

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 08:02:29 +00:00
Christophe Simonis 11b1e12cde [MERGE] forward port branch saas-11.3 up to e9068c290b 2019-03-25 18:28:16 +01:00
Christophe Simonis e9068c290b [MERGE] forward port branch 11.0 up to 0196a6feb5 2019-03-25 16:47:05 +01:00
Martin Trigaux 57e6346442 [FIX] web: format date without locale
moment().locale('en').format('YYYY-MM-DD')
"2019-03-25"
moment().locale('ar').format('YYYY-MM-DD')
"٢٠١٩-٠٣-٢٥"
moment().locale('my').format('YYYY-MM-DD')
"၂၀၁၉-၀၃-၂၅"

Was rejected as a valid bug at moment/moment#4448
Apply the same logic than 109b319d64

Fixes odoo/odoo#32081

closes odoo/odoo#32102

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 14:42:28 +00:00
Isabel Esparza 6155210d12 [FIX] crm: states
Onchange to show only the states of an especific country in
opportunities.

Closes #31993
opw-1958170

closes odoo/odoo#32099

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 14:13:34 +00:00
Christophe Simonis 0196a6feb5 [MERGE] forward port branch saas-15 up to 6cd6d1d468 2019-03-25 15:12:00 +01:00
Can Tecim a39b1f4595 [ADD] l10n_tr: add provinces of Turkey
closes odoo/odoo#31592

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 12:38:05 +00: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
Xavier Dubuc 46d22fbd4f [FIX] product: template kanban view perf
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.

This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.

opw 1951369

closes odoo/odoo#32048

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 11:44:55 +00:00
Nicolas Lempereur 2a89f0c7f8 [REV] "[FIX] website: language prefixed URL on website"
This reverts commit 5324284f56
This reverts commit ad826f56ba.

If for example we had in a template:

 <script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script>

it has been reproduced to be gotten as:

 <script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script>

which is unexpected and could cause an error.
closes #32090

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-25 10:53:25 +00:00
Colinliz a4f9b48667 [CLA] add Colinliz to Inspur CCLA
closes odoo/odoo#32076

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 10:02:08 +00:00
Nicolas Martinelli d3bd48d67b [FIX] stock: has_tracking
The field `has_tracking` should be read-only, there is no reason to make
it writeable.

opw-1958266

closes odoo/odoo#32080

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 08:24:01 +00:00
Odoo Translation Bot fa12433867 [I18N] Update translation terms from Transifex 2019-03-24 03:11:51 +01:00
Nicolas Lempereur ad826f56ba [FIX] http_routing: ignore # when checking multilang URL
With 953a693df when a route is not found we assume it is a website.page
that can be multilang.

But with #31792 we should once again prefix URL by the language if
necessary.

The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.

With this fix, `#fragment` is not taken into account when searching
route.

related to #31792
related to opw-1922051
closes #32059

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-22 16:51:09 +00:00
Nicolas Lempereur 5324284f56 [FIX] website: language prefixed URL on website
In 10.0 and before, if we were eg. on website page /fr_FR/contact, if
`fr_FR` language (french) is installed and not the default website
language we would have all URL towards translated content (route with
multilang=True) prefixed with /fr_FR/ (the language code).

With 9cd982bcc some improvments were done to CDN but this also breaks
language prefixing, so this cause an unecessary redirect:

- we are on /fr_FR/contact and click on "Shop"
- we go to /shop
- odoo redirects US /fr_FR/shop

With this PR, URLs are prefixed with language once again.

note: the added test is hackish but the function tested depends on a lot
of odoo.http things that are hard to use for test (request.render,
request.context, request.httpreqest).

opw-1922051
closes #31792

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 16:14:09 +00:00
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
Goffin Simon 02b28bbc39 [FIX] stock_picking_barch: Picking Barcodes missing on batch pickings report
The picking barcode must be displayed in the batch picking report like in 11.0

opw:1958092

closes odoo/odoo#32004

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-21 09:39:42 +00:00
Odoo Translation Bot 7e9a13a64d [I18N] Update translation terms from Transifex 2019-03-24 01:24:01 +01:00
qsm-odoo aed56c9bda [FIX] website_forum: BS4, restore edit profile page
+ Add some spacing between the navbar and the forum layout

closes odoo/odoo#32060

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-22 16:55:29 +00:00
Martin Trigaux 48143116e9 [FIX] base: ignore empty translatable attribute
Complete cd4080839f
  <span class="fa fa-globe" title="Title stuff"/>
is not correctly extracted but
  <span class="fa fa-globe" title=""/>
was also extracted while there is no content

Check the size of the content too

Similar content is present on odoo.com website and should not be translatable
on Transifex

closes odoo/odoo#32018

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-21 15:38:56 +00:00
Toufik Ben Jaa 4a13d5d1f5 [FIX] auth_signup: typo in invitation mail
closes odoo/odoo#32049

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-22 13:03:12 +00:00
Nicolas Vannieuwerburgh 78e8634cf5 [DOC] update upgrade service documentation
- Update active target versions
 - document `skip_test` endpoint
 - use `requests` in python snippets<Paste>

closes odoo/odoo#31071

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 13:06:16 +00:00
Romain Estievenart 52c562bdc0 [FIX] hr_holidays: adapt mobile css of leave request form
This commit adapts the leave request form on mobile.
Dates fields didn't take all device width.

As it's not a critical issue, it's up to the customer
to update this mobule to apply this fix.

Task ID: 1944884

closes odoo/odoo#32020

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-22 10:06:52 +00:00
Julien Castiaux e9026bd522 [FIX] web_editor: editor hang on an infinite loop
In the `getMatchedCSSRule`, the transcoder try to find the real value of
a `text-align: inherit` css rule by ascending the html tree until it
finds a `text-align` with a meaningful value. By default is exits if it
reachs the `<html>` top node but doesn't exit if a call to `.parent()`
exits the dom (the behavior of jquery is to return a dummy element when
calling `.parent()` on an element that has no parent). This lead to an
infinite loop for badly formatted html content.

opw-1951095

closes odoo/odoo#32014

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-21 13:45:12 +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
qsm-odoo 36289e77ba [FIX] web_editor: restore theme responsive spacing
The factor parameter of the mixin in charge of generating the spacing
classes was not correctly used.

closes odoo/odoo#31996

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-20 15:48:34 +00:00
Denis Vermylen a95811eee2 [FIX] mail: tests: exclude domain from message_id
If the database name contains one of the tested strings, it can render
the assertion of the test invalid or inconclusive. Ensure we strip it
away during the tests.

opw: 1957055

closes odoo/odoo#31987

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-20 14:18:36 +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
Christophe Monniez 2c9505fda7 [FIX] tests: avoid check document.readyState of about:blank
In an HttpCase test, when the browser_js method is used, an optional
javascript code can be used to check that the page is ready to execute
the test.

When no 'ready' code is given it defaults to check the
'document.readyState' status.

In some rare cases (discovered by @Xavier-Do) this status is checked on
the 'about:blank' page. As the page seems ready, the test code is
evaluated and fails.

With this commit, when no specific ready code is provided, the test will
wait for a chrome devtools event that ensure the page is fully loaded
before starting the test.

cherry-pick of 03a8819652

closes odoo/odoo#31936

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-19 08:37:07 +00:00
Christophe Simonis 4e39328a76 [FIX] mrp: use correct XMLID in test
Oversight of previous forward-port.
2019-03-18 17:55:50 +01:00
Christophe Simonis a73a47d692 [FIX] account_asset: correct forward-port 2019-03-18 17:27:21 +01: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
Christophe Simonis 9b6e37a983 [MERGE] forward port branch 11.0 up to 7e33b54771 2019-03-18 16:51:57 +01: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