Commit Graph
127612 Commits
Author SHA1 Message Date
Christophe Simonis 40e8b67179 [FIX] mail: add missing requirement in test
Oversight of previous forward-port.
2019-07-26 14:34:48 +02:00
Christophe Simonis e0f9c092cc [MERGE] forward port branch saas-12.2 up to 1d6d790513 2019-07-26 11:32:43 +02:00
Géry Debongnie 7d78795f8b [FIX] web: properly handle (grouped list) pager
when last field is numeric

closes odoo/odoo#35176

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-25 12:23:51 +00:00
Julien Mougenot 5c34091361 [FIX] web: improve editable list column widths
Changed the way some field types are displayed.

Before this commit, column width in a list were calculated according to
a given factor (integer), determining their weight.

Now, some specific fields have an hardcoded width instead. This task
also slightly tweaks some width factors, in order to try to have a
better layout in most list views

Task 1985916

closes odoo/odoo#35147

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-24 14:05:02 +00:00
svs-odoo 4d0f36ac01 [FIX] web: context when read on multi edit
Before this commit, in list editable, when user save multiple records in
the same time, the context is passed for the write but not for the read.
Now, the context is passed also for the read.

closes odoo/odoo#35113

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-24 07:05:32 +00:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Géry Debongnie 4e6ee3ac97 [FIX] web: allow groupby buttons in list view at any level
The initial implementation of the special group by buttons in list
groups only supported the first level of groupby.  So, if one grouped a
list view by field A, it worked (if A had a groupby defined).  However,
if we want to group by B/A, this no longer works.

opw 2040725

closes odoo/odoo#35090

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-23 08:09:50 +00:00
RomainLibert fe4caecb59 [FIX] web_editor: momentarily comment the assert
Having an assert that randomly breaks is quite annoying, as this assert
is not critical and breaks once every 100 - 120 builds. It can "safely"
be commented out before being fixed

closes odoo/odoo#35043

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-07-19 10:46:48 +00:00
Odoo Translation Bot 9225e2e9f3 [I18N] Update translation terms from Transifex 2019-07-21 06:07:25 +02:00
Olivier Colson 8cded5022e [FIX] l10n_at: fix tax repartition to keep it consistent with 12.2
There was an error in this tax's repartition. A tag was wrongly added to its base.

closes odoo/odoo#34245

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-07-12 09:36:10 +00:00
Olivier Colson 056a266274 [FIX] l10n_at: make tag names unique in tax report 2019-07-12 09:36:10 +00:00
Gorash 2c27d6c925 [FIX] web_editor: avoid dialog error on email edition
Under certain unknown conditions, the range cannot be applied and
triggered an error. In order to allow the user to keep editing, we need
to prevent the dialog from showing, hence the use of `console.error`.
If this error appears, the carret is moved to the beginning of the focused
node.
If this error appears, then bullet can generate an error (I managed to
have the bug once or simulate it by manually breaking the dom and range)

We suspect a wrong snippet custom javascript code.

see: https://github.com/odoo/odoo/pull/34188

closes odoo/odoo#34871

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-15 09:26:29 +00:00
Gorash 522a0001e7 [FIX] web_editor: can use copy-past as html with only text
Some browser can send text content without tag when past html. To avoid
this error we wrap the content before parse it with jQuery.
2019-07-15 09:26:25 +00:00
Aaron Bohy e0c7c8e288 [FIX] web: execute action from new record and go back
Let's assume a form view with a readonly many2one field with a
default value. When creating a new record, the user can click on
the many2one value, which should open the related record in a form
view (stacked in the breadcrumbs).

Before this rev., this didn't work: we actually came back to the
previous view/action in the breadcrumbs, when trying to open the
related record.

closes odoo/odoo#33172

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18 09:48:07 +00:00
Jigar Patel f9565d6334 [FIX] web: display groupby buttons only on the first group level
task-1998791

closes odoo/odoo#34007

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-18 05:56:51 +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
Jairo Llopis 7c99310b23 [FIX] auth_oauth: Override qcontext in the right place
Before this patch, if some module was based on top of `auth_signup`, and `auth_oauth` was also installed in the same database, the only way to get the proper qcontext would be to call `super()` inside `web_auth_signup_qcontext`, which would produce a login, which is most likely not desired because such addon would try to add some logic on top of it that maybe prevents login based on some circumstances.

After this patch, any submodules can work properly without workarounds.

closes odoo/odoo#34690

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-07-09 11:31:25 +00:00
Nicolas Lempereur 3862f63669 [FIX] theme_bootswatch, doc: https import for less3
The @import directive in less leave the @import as is if it detects .css
extension. Otherwise it will use the less import.

Since less 3.0.0 less/less.js@77fde7eb7 checking css extension regex
changed from:

/[#\.\&\?\/]css([\?;].*)?$/

to:

/[#\.\&\?]css([\?;].*)?$/

thus all our import of google fonts with URI like:

//fonts.googleapis.com/css?family=FontName

now are getting imported as less, thus they are included directly in the
output file with HTTP scheme URL which may be blocked on HTTPS instance.

With this fix, we specify that the import is a normal CSS one with (css)
import option:

http://lesscss.org/features/#import-atrules-feature-css

opw-2057037
closes #36167

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-28 09:20:32 +00:00
Florimond Husquinet (fhu) 344beaf282 [CLA] Signature for hari4274
Ticket: 2058955

closes odoo/odoo#36162

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-28 08:31:37 +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
vrenaville 7be62eb852 [FIX] account: do not assing on empty recordset
If a browse record is empty, assigning a value will fail
Introduced at c04065abd8

Closes odoo/odoo#34521

closes odoo/odoo#34654

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-08 11:42:31 +00:00
Julien Castiaux 5c705c51cd [FIX] website_profile: bypass IR Rules on karma ranking
Install website_slides, create a bunch of users all published on the
website. Using raw sql queries, give some karma to those users. Go to
the `/profile/users` web page. When connected the ranking is correctly
shown, when not connected all users are ranked 0.

The problem is that the public user (id: 4) can only access is own user
which prevent him to access the karma of the other user required to rank
them.

As the injected IR Rules are not adding any value and that a domain is
applied already, it is safe to skip the ir rules.

opw-2029105

closes odoo/odoo#34656

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-08 11:30:19 +00:00
RomainLibert 8c839ac1e0 [FIX] lunch: use currency of company as default value
The default value for a many2one on res.currency should be a currency
not a company

closes odoo/odoo#35005

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-18 13:15:56 +00:00
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