Commit Graph
126237 Commits
Author SHA1 Message Date
Romain Derie e80caa4d3e [FIX] sale: fix race condition on signature tour
Before this commit, the signature tour (130af96dc1) would fail sometimes.
Indeed, the tour is trying to get `Thank You` on the page after the sign step
but since the modal to pay will open on top of the page, the `Thank You` would
not be found.

closes odoo/odoo#34990

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-18 14:42:29 +00:00
Thibault Delavallée ca16ac1142 [FIX] portal: correctly sent integer values in portal chatter
closes odoo/odoo#34993

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-18 14:52:58 +00:00
Romeo Fragomeli 37edde1773 [FIX] mail: close thread window button isn't clickable easily
Before this commit, the close button on the thread window was
too small to click on it. The padding of the button wasn't over
the all available area.

After this commit, the padding of the close button is higher and
so the user can target it more easily on a small screen.
We had to reduce the padding of the parent.

Step to reproduce:
- Open the "Discuss" app
- Go to the "Channels" tab
- Open a channel
- Try to tap on the close button on the top left window

Task ID : 2033828

closes odoo/odoo#34977

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-07-18 13:00:28 +00:00
Antoine Guenet 2136ea5646 [FIX] web_editor, website: consistently apply undo on CTRL-Z
This fixes a bug in Website, that can be reproduced like so:
- insert a snippet
- insert a char in it
- 2x CTRL-Z
The second CTRL-Z didn't do anything because Summernote moved the range
to the header, which is not editable. This fix moves the range to the
first editable element in the editor in these cases, thereby keeping the
focus in an editable area, and ensuring that hotkeys still function.

The history feature being non-tested as of this version, no test could
be added for this fix.

closes odoo/odoo#34834

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-07-18 06:50:13 +00:00
RomainLibert c526715110 [FIX] l10n_*: don't write on country_id in demo
Writing the country_id of the main company in demo data disables demo
data installation if installing multiple l10n, this is caused by a wrong
check of the vat field (base_vat).

Two approaches can be used here:

- Always write on country_id in all l10n demo data
NB: this also implies writing the country_id first in order for the
vat check to be done using the right country code
- Never write on country_id in any l10n demo data

The prefered approach for the moment is to never write on the country_id
of the main company.
This approach is easier to apply as it is a mimimal diff and the first
approach would require deeper changes to the code in order to allow
writing all the information in a single `record` tag in the demo data

closes odoo/odoo#34905

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-07-16 09:58:17 +00:00
RomainLibert cd2cdbb5ce [FIX] base_vat: fix constrains
The vat checking constrains uses both the country_id and the vat, but
was defined as depending only on the vat field
2019-07-16 09:58:17 +00:00
Alexandre Kühn a203e5318e [FIX] mail: re-render discuss on message_fetch with typing members
When (un)registering a typing members of a channel, the discuss
sidebar must be re-render. This is necessary in order to display
the typing indicator next to discuss items, i.e. '...'.

When receiving a message from a typing member, this person no
longer becomes a typing member.

Before this commit, for each new messages, the discuss sidebar
was re-rendered. This happens due to unregistering the author
from the typing members of the channel, even when the author
was not a typing member in the first place.

With this commit, when the list of typing members of a channel
does not change, the discuss sidebar won't re-render and slow
down the whole UI.

opw-2035443

closes odoo/odoo#33616

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-07-16 14:36:44 +00:00
Alexandre Kühn bdf45dca50 [FIX] mail: auto-update out-of-office info on im_status change
Before this commit, chat window's out-of-office info did not change
when direct partner's `im_status` is/was on 'leave'.

Users had to reload page to see updated out-of-office info.

Task-ID 2007663
2019-07-16 14:36:44 +00:00
Alexandre Kühn 4bde721f92 [FIX] mail: notify other tabs on document thread message post
Before this commit, most new messages added to the mail manager were
handled as if recently posted from a document thread. As a result, it
was frequently setting a new item in the local storage to notify
other tabs from these new messages.

The intent of this behaviour is to notify other tabs of newly posted
messages in a document thread, without using a longpolling
notification. That means this logic should only apply on messages
that have been recently posted on a document thread.

Sometimes, this issue was breaking the local storage on Firefox.
It showed the error message "Quota Exceeded Error" whenever `setItem`
was used, even when items were removed beforehand. The capacity of
the storage was only a few Kbs on this domain, far from reaching the
maximum capacity. We think that this error comes from the concurrent
`setItem` on multiple tabs, but this is very hard to reproduce.

This commit fixes the issue by limiting the `setItem` to the tab
that really posted the message. Tests have been adapted in order to
pass only with this fix.
2019-07-16 13:13:22 +00:00
Martin Trigaux cf8e74a1a7 [MERGE] Forward port of 12.0 to saas-12.2 up to 1bd434da34
closes odoo/odoo#34901

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 09:14:17 +00:00
Martin Trigaux 1bd434da34 [MERGE] Forward port of saas-11.3 to 12.0 up to d8072d54ac 2019-07-16 09:22:49 +02:00
Lucas Perais (lpe) c8d10d228e [FIX] web: boolean widgets in editable list should activate the row
Put toogle_button or a favorite widget to handle a boolean field in an editable list
click straight up on the widget's button or link

Before this commit, the widget changed its appearence, but the changes were not
propagated to the model. This is because the controller will not force_save if its mode is edit
(to let changes piling up and save everything when clicking save), which is the case
of the editable list

After this commit, following what has been done at 2f5e44d40b
clicking on a widget in an editable list just activates the row for editing
but doesn't change the widget's value

OPW 2033700

closes odoo/odoo#34878

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-15 13:53:48 +00:00
Martin Trigaux d8072d54ac [MERGE] Forward port of 11.0 to saas-11.3 up to d5dd136ba0
closes odoo/odoo#34872

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 13:32:07 +00:00
Martin Trigaux d5dd136ba0 [MERGE] Forward port of saas-15 to 11.0 up to 1d9f64c91e
closes odoo/odoo#34868

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 11:56:22 +00:00
Xavier-Do dd85e312cd [FIX] core: backport of 62533ec7 and f167ae7d
The ready code warning timeout of 2 seconds can be confusing since
it is triggered just after the 2 seconds. We can log this message
at the end in order to give the real timeout.

In JS tests, when the ready code takes too much time, a warning is
logged. As a consequence, the runbot updates the github status as a
failure, causing real pain to people who simply wants to merge their
features.

With this commit the warning is changed into an info and the runbot will
be happy.

closes odoo/odoo#34865

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-15 11:37:14 +00:00
Martin Trigaux 1d9f64c91e [MERGE] Forward port of saas-14 to saas-15 up to 5d4c30cb59 2019-07-15 13:15:12 +02:00
Martin Trigaux 5d4c30cb59 [MERGE] Forward port of 10.0 to saas-14 up to bb712ad701 2019-07-15 13:10:00 +02:00
Goffin Simon 0e44904267 [FIX] stock: Delivery slip with serial number
Steps to reproduce the bug:
- Select template type boxed in general settings
- Select show serial/lot number in Delivery slip (in inventory - settings)
- Print the delivery slip with a non tacked product

Bug:

The delivery slip report displayed wrong columns.

opw:2031985

closes odoo/odoo#34852

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-15 08:43:59 +00:00
Arnold Moyaux ccbd6712f6 [FIX] mrp: MO change the quantity to 0
Usecase to reproduce:
- Create a MO for 5 final units
- Reserve all the components
- Produce 3 units
- Post Inventory (debug mode)
- Edit/Unlock
- Edit a line to consume to an arbitrary amount of quantity
- Change the product qty and set it to 3.

At this point, the reserved quantity and the quantity to consume
still the same than intialy even if the final quantity was updated.

- Mark as done

Then a move is marked as done withtout quantity done and still have
reserved quantity.

It happens because the _update_raw_move function do nothing if the
new quantity to consume is equals to 0.

The arguments returns in _update_raw_move still exists for override
but are not used by the chang_prod_qty method. It's not possible to
cancel the move and then find its parents in order to log the activity.

opw-2023653

closes odoo/odoo#34471

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-15 11:52:47 +00:00
mreficent d9b7cc7ab7 [FIX] purchase: not setting domain is not empty domain
Previous versions of this action had a domain. It was removed at 2d3e6d7383
Set explicitly an empty domain to force the removal when upgrading the module
Similar to 2d03ed43a5

closes odoo/odoo#34581

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 10:02:28 +00:00
Daniel Blanco 0eadcb9c53 [CLA] signature for Blanco Martin & Asociados Signing CLA
closes odoo/odoo#34844

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:30:05 +00:00
Grégory Schreiner 6a2be418f9 [CLA] signature for gregory-moka
closes odoo/odoo#34803

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:48:10 +00:00
bumanit eab60bd2e0 [CLA] Update bumanit CCLA
closes odoo/odoo#34713

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:46:00 +00:00
Nicolas Vannieuwerburgh 43bec98da8 [FIX] hr_timesheet_attendance: Allow update module
In PostgreSQL, we can't CREATE OR REPLACE VIEW if there is the type of the column change.
To fix it, just drop the view before creating it

closes odoo/odoo#34851

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 07:04:26 +00:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Martin Trigaux 30f760d534 [FIX] doc: adapt header to the new eLearning
closes odoo/odoo#34837

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 14:44:38 +00:00
Nans Lefebvre 1c51963cab [FIX] website_sale: _compute_abandoned_cart with multiple records
This is an api.multi method, which should therefore not call self.field.
Fortunately there's a loop just below.

opw 2035374

closes odoo/odoo#34832

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-12 11:43:21 +00:00
lejeune quentin a8004118b2 [IMP] point_of_sale: Updating the date of the IoT Box
before this commit the date of the IoT Box did not update.
With this commit we restart the service timesyncd on the IoT box

Task: 2034930

closes odoo/odoo#34789

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-07-11 13:54:53 +00:00
Goffin Simon f94b09dbf2 [FIX] point_of_sale: payment method journal in wrong currency
Steps to reproduce the bug:
- Install point_of_sale and account_accountant
- Create a company C in USD
- Create a cash journal CJ with no currency set
- Activate Multicurrency
- Create a pricelist P in EUR
- Create a sales journal SJ with currency = EUR
- Create pos.config in company C
- Assign SJ in the Sales Journal field
- Set P as default pricelist
- Set the cash journal CJ as payment method and save

Bug:

As CJ is implicitly in USD, it was wrong to set CJ as payment method in a pos.config
in EUR.

With courtesy of <jcb@odoo.com>

opw:2031883

closes odoo/odoo#34790

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-11 11:13:44 +00:00
Goffin Simon 8271be23cf [FIX] product: _inverse_product_pricelist uses wrong company
When reading the non stored computed field property_product_pricelist,
the force_company set in the context is taken into account. But when
writing on property_product_pricelist, the force_company was not taken
into account. So it was inconsistent as you could read a record with a
force_company in the context and wrote on an other record as the inverse
function didn't take the force_company into account.

closes #31561

opw:2032024

closes odoo/odoo#34757

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-10 13:46:51 +00:00
Aaron Bohy 8f9e1e40a3 [FIX] web: batch read of m2m in o2m after onchange
Let's assume a one2many field (editable list) in a form view with
a many2many (e.g. many2many_tags), and an onchange on the one2many
such that, when a row is added to the relation, the server returns
update commands for (a subset of) the records being already in the
relation. For thoses updated records, the many2many field needs to
be read (the onchange only returns the ids in the relation).

Before this rev., the many2many field was read independently for
each record in the one2many. This could cause a performance issue
on large relations. For instance, this was the case on
account.invoice records with a lot of lines.

This commit must be forwardported up to 12.2, not further.

Issue 2027356

closes odoo/odoo#34771

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-11 09:38:03 +00:00
Xavier-Do 95b4f2ab4b [IMP] core: improve test_tags
Add the support to be able to specify exlicitely module, class and method name in test_tags

Before this commit, there is no distinction between module tag and test tag. Meaning
that --test-tag module_name will replace the default +standard tag and execute all test
of the module.

This commit tries to keep the initial behaviour, while addind new features, like explicit
modules tag with /module_name, as well as class (:class) and method (.method)

Some usage examples:
--test_tags /module will execute all standard test of module
--test_tags :class will execute all standard test with class name 'class'
--test_tags .method will execute all standard test with method name 'method'
--test_tags external/module will execute all external test of module
--test_tags */module will execute all tests of module,
--test_tags */module,-standard will execute all non standard tests of module,
--test_tags -/website:TestUiTranslate.test_admin_tour_rte_translator will disable only rte translator test

closes odoo/odoo#34756

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-07-11 09:03:14 +00:00
Raphael Collet b8f4ad585e [FIX] test: assertRaises() without environment 2019-07-11 08:48:18 +00:00
Goffin Simon bb712ad701 [FIX] account: Incorrect due date for credit notes
Steps to reproduce the bug:

- Create an invoice I
- Set the invoice date in the past and  add payment terms
- Validate I
- Create refund from I

Bug:

The invoice date is set as today but the due date was set in the past.

opw:2033438

closes odoo/odoo#34748

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-10 12:14:57 +00:00
Romain Derie 01c34a512c [FIX] website, website_sale: correctly set company_id on address
During checkout, the user can create a new billing (only for public user as it
will create a 'normal' `res.partner`), a new shipping, edit its billing (that
will edit himself) or edit its shipping address.

All those cases will go through the exact same methods, public user and logged
in user included.

This previously led to multiple issues and multiple fixes to correctly set
`company_id` and `website_id` on the address (res.partner).

See 44372471ef that fixed the `website_id` part.

See 3a0f05f33 that fixed the multi-company behavior, but needed 2ba71140 to not
modify the company of an already created partner, but was still incomplete as
after that fix a logged in user would still have the admin (sudo) company
instead of the website one as supposed.

This commit will fix that bug and add some tests for all mentionned issues.

Fixes #28853

Backport from odoo/odoo#34596

closes odoo/odoo#34689

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-10 10:42:43 +00:00
Romain Derie d24c196397 [FIX] website_sale: don't handle pl promo code if already applied
When a pl promo code is applied, the code is shown in the promo code input.

Before this commit, if the user clicked on "Apply" (so with the same code) it
would remove the pl as it would go in the `if` condition that is supposed to
handle empty code modo to reset pl.

Coming from #34633

closes odoo/odoo#34734

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-10 10:25:20 +00:00
Jorge Pinna Puissant 3360f9313d [FIX] website_payment: consider authorized transactions as done
Forward port of a8dfc7fb73

Before this commit, when a transaction has as status 'authorized', the
transactions' confirm page gives an error : 'Oops! There was a problem
with your payment.'

Now, the page gives the same message as when the transaction has the
status 'done' : 'Your payment was successful! It may take some time to
be validated on our end.'

opw-1984325
2019-07-10 10:03:21 +02:00
Martin Trigaux db5261b19e [MERGE] Forwardport of 11.0 to saas-11.3 up to 198b5ecce2
closes odoo/odoo#34719

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 07:14:38 +00:00
Martin Trigaux 198b5ecce2 [MERGE] Forwardport of saas-15 to 11.0 up to 239af6ee99 2019-07-10 08:58:50 +02:00
Martin Trigaux 239af6ee99 [MERGE] Forward port of saas-14 to saas-15 up to e5ec5f5f612 2019-07-10 08:46:12 +02:00
Martin Trigaux ce5ec5f5f6 [MERGE] Forward port from 10.0 to saas-14 up to 0ec0a4a32e 2019-07-10 08:35:05 +02:00
tdi-odoo 2c896f8ed0 [FIX] stock: stock.backorder.confirmation with multiple backorders singleton error
Prevent singleton error when validating stock.picking with option cancel_backorder
in case there are multiple backorders involved by displaying all the backorder's names separated by commas.

opw: 20337021

closes odoo/odoo#34709

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-09 14:43:39 +00:00
Odoo Translation Bot e26d478f49 [I18N] Update translation terms from Transifex 2019-07-14 03:08:16 +02:00
Lucas Perais (lpe) 8aaab680a9 [FIX] account_voucher: handle tax included in round globally
Have a Tax 24%, included
Have account.voucher with a line reading:
`Price: 64.93; Tax: 24% Incl`

Validate the voucher

Before this commit, the account.move.lines created were wrong and unbalanced
as the amounts that should have been affected by the tax included haven't been

After this commit, the move and its lines are correct and balanced

OPW 2031751

closes odoo/odoo#34784

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-11 09:10:46 +00:00
Julien Castiaux 5038f777a0 [FIX] web: prevent db_manager modal close on empty pwd
Go to the database manager, configure a password either via the
interface either via the `admin_passwd` `.odoorc` config file. Click on
the backup menu, let the `password` field empty and submit the form. The
modal is closed without any warning and no query is sent.

The problem is that even if the field is marked as `required`, there is
a event listener that catch the `onsubmit` event and close the modal
even if it is not valid.

opw-2031461

closes odoo/odoo#34669

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-07-09 13:44:41 +00:00
Lucas Perais (lpe) 06d149a3b1 [FIX] l10n_be_intrastat, _2019: support rounding to 2 decimals
Before this commit, values were rounded to the unit, which was part of the former specs
of the Intrastat report

After this commit, we make the intrastat 2019 comply with the new spec, which is to round
value, price and weight to two decimals

See the spec here: https://www.nbb.be/doc/dq/f_pdf_ex/nieuwsbriefintrastat_n28_2018_fr.pdf

OPW 2031682

closes odoo/odoo#34700

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-09 13:08:31 +00:00
Richard Mathot 0ec0a4a32e [FIX] models: avoid Unicode error when translating that error message
The patch fa492d87f4 has been backported
from Odoo 12.0, that runs on Python 3.

The string '\n\n({} {}, {} {})' to be formatted is a byte-string in
Python 2, while the return value of _() is always a unicode-string.

As format() is (too?) nice, it attempts to convert the unicode-strings
into ascii in order to inject them in the format pattern.
With some languages that are written in ascii, this works -- by chance.
When you use non-ascii languages like Japanese, it fails.

We then fix that issue by using unicode-strings in the formatting
pattern.

#OneCharacterPatch B-)

opw-2032016

-----------------------------

For full technical understanding:

Python 2.7.16 (default, Mar 11 2019, 18:59:25)
[GCC 8.2.1 20181127] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> '{}'.format('test')
'test'
>>> '{}'.format(u'test')
'test'
>>> '{}'.format(u'エ')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30a8' in position 0: ordinal not in range(128)
>>> u'{}'.format(u'エ')
u'\u30a8'

closes odoo/odoo#34698

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-07-09 12:26:46 +00:00
Julien Castiaux ad4a618a82 [FIX] mass_mailing: disable sitemap on unsubscribe route
Insall website and mass_mailing, go to the `/sitemap.xml` url, the
`/unsubscribe_from_list` url is listed, it should not.

opw-2033251

closes odoo/odoo#34677

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-09 07:52:25 +00:00
Francisco Fernández @PlanetaTIC 1f627dcf57 [FIX] stock: Fix product template compute quantities depends
Slightly different version than 48e93a10a1 (which was for 10.0)

closes odoo/odoo#30026

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 08:15:24 +00:00
Martin Trigaux 633c87de22 [MERGE] Forwardport of saas-15 to 11.0 up to 239af6ee99
closes odoo/odoo#34717

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 06:58:50 +00:00