Commit Graph
111400 Commits
Author SHA1 Message Date
Christophe Simonis ff1f3c557e [MERGE] forward port branch 10.0 up to c7c68bab84 2019-09-02 17:54:34 +02:00
Odoo Translation Bot c7c68bab84 [I18N] Update translation terms from Transifex 2019-09-01 03:24:12 +02:00
Jairo Llopis 481ad586cc [FIX] website_blog: Saner crawler instructions
The fixes that this patch includes are:

- The tag URL for tags printed in short and expanded blog posts had no slug, thus producing a brand new URL. Now they have the slug.
- Any request landed without that slug is slugified with a 301 code, as with the rest of Odoo.
- The `<a>` elements in right column archives have now `rel="nofollow"`.
- The `<a>` elements in right column tag cloud, where more than 1 tag is used, have now `rel="nofollow"`.

closes odoo/odoo#30832

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-29 11:27:56 +00:00
Richard Mathot b294333e94 [FIX] doc: explanation for pg_path
opw-2060249

closes odoo/odoo#36223

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-29 10:44:17 +00:00
Christophe Simonis ca34ae4329 [MERGE] forward port branch 10.0 up to 7c99310b23 2019-08-29 12:14:47 +02:00
Christophe Simonis e4428e0c9b [MERGE] forward port branch 10.0 up to da474d0e87 2019-08-27 12:43:51 +02:00
Nicolas Lempereur da474d0e87 [FIX] web_editor: parallax effect in sanitized field
A sanitize fields by default remove all attributes outside of a
whitelist (if sanitize_attributes on field is not set to false).

This prevent to use parallax widget in Html sanitized field since
attribute "data-scroll-background-ratio" define parallax effect speed
but was not in whitelist.

note: also keep data-interval for gallery widget

opw-2053983
closes #35961

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-22 10:30:47 +00:00
Christophe Simonis edf44cdaee [MERGE] forward port branch 10.0 up to 8443a74cd6 2019-08-22 11:12:08 +02:00
mreficent 8443a74cd6 [FIX] account: computes correctly belongs_to_company
Typo of https://github.com/odoo/odoo/commit/b154e219f68cc378ba8cc9dedf1d48819cd8e87a

closes odoo/odoo#35937

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-21 21:35:57 +00:00
Christophe Simonis e854f68393 [MERGE] forward port branch 10.0 up to b058f70941 2019-08-21 11:25:05 +02:00
Nicolas Lempereur b058f70941 [FIX] web_editor: font>a colorize a change font color
If you change the color of a link with the editor without using the link
edition menu, this do not work (which might be expected), but if the
text outside the font had been colorized, the font will be applied
outside of the link only.

This is unexpected since if we have: "hello <a>cruel</a> world!", if we
select only "cruel" and change color, the change only happen to "hello"
and "world!".

With this changeset, an anchor in the ancestor prevent to use an
ancestor font tag to change color (which prevent the issue).

opw-2044551
closes #35862

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-20 13:48:26 +00:00
Richard Mathot e6a1ac6e64 [FIX] models: avoid Unicode error when translating that error message
Same cause, error, rationale and fix than 0ec0a4a32e

#OneCharacterPatch, reloaded

opw-2056251

closes odoo/odoo#35857

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-08-20 13:16:07 +00:00
Christophe Simonis fa26279014 [MERGE] forward port branch 10.0 up to 59c59cd8a0 2019-08-19 12:47:56 +02:00
Christophe Simonis b6deb72747 [MERGE] forward port branch 10.0 up to 2fc46a064d 2019-08-19 10:24:42 +02:00
Abridbus 2fc46a064d [FIX] mail: removing whitespace on message_id from incoming mail
Because of a whitespace character present at the beginning of the message_id of some mails,
they were fetched twice.

From the SQL side, we see that Outlook is formatting the header following the RFC822
by allowing the header to look like:

Header:<CRLF>
<whitespace><hash_of_msg_id>

From RFC822:
"Each header field can be viewed as a single, logical line of ASCII characters.
For convenience, the field-body portion of this conceptual entity can be split
into a multiple-line representation" (abr.)

It was also possible to find out by checking the logs.
One or two whitespace(s) can be seen before the hash of the msg_id.

The following commit is making sure we use and save the message_id without the whitespace
by stripping them off on the coming mail.

OPW-2006806

Applying CHS solution to avoid crash on empty header.

closes odoo/odoo#35682

Signed-off-by: bve-odoo <Abridbus@users.noreply.github.com>
2019-08-14 07:47:04 +00:00
Raphael Collet 59c59cd8a0 [FIX] field: compute transitive dependencies over non-stored fields
In other words, when a field F depends on a non-stored field G, it also depends
on G's dependencies.  This guarantees that whenever a dependency of G is
modified, F will be invalidated and marked to recompute (if necessary).

The transitive closure of dependencies is not computed over stored fields.
Anyway stored fields already trigger the recomputation of their dependent
fields during their recomputation.  The performance impact on the loading of a
registry is negligible (less than 1%), and the increase of recomputation
triggers is small (less than 10%).

(cherry picked from commit 3fbd86bcbe)

opw-2033493

closes odoo/odoo#35636

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-08-12 09:18:31 +00:00
Christophe Simonis 14547f847c [MERGE] forward port branch 10.0 up to af3f6e596d 2019-08-05 14:50:37 +02:00
Christophe Simonis 841fa79c8a [MERGE] forward port branch 10.0 up to a94b00e498 2019-08-02 10:18:36 +02:00
Odoo Translation Bot a94b00e498 [I18N] Update translation terms from Transifex 2019-08-01 02:41:11 +02:00
Lucas Perais (lpe) 0b13c3038f [FIX] l10n_be_intrastat: propagate country_id
Before this commit, the field intrastat_country_id was not propagated when refunding an invoice

After this commit, the refund invoice takes the same values for that field
as the invoice it is refunding

OPW 2028333

closes odoo/odoo#35309

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-30 15:35:14 +00:00
Anh Vu 3748ac5d17 [CLA] Signature for anhvu-sg
closes odoo/odoo#35235

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-30 12:52:07 +00:00
amoyaux af3f6e596d [FIX] stock : webplanner link to product does not work.
In the planner the url are generated by prepare_backend_url that takes
an action's xml id as argument. The id passed should have the format
'module_name_where_the_action_is.action_name'. In this case the id passed
was product.product_template_action_product but the action is defined in
stock thus the prepare_backend_url was not able to find the associate action
and return a wrong(default) url.

This commit change the action id passed with the correct module.

closes odoo/odoo#18812

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-29 12:49:26 +00:00
Nans Lefebvre 47587de19b [FIX] payment_authorize: save payment token from form validated transaction
https://docs.python.org/3/library/stdtypes.html#truth
By default, an object is considered true unless
its class defines either a __bool__() method that returns False
or a __len__() method that returns zero

Since etree elements are iterator, they define a len function.
However it turns out that customerProfileId has always no children.
So bool(find(x)) is always False; the intended meaning was find(x) is None.

opw 1999427

closes odoo/odoo#34922

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>

closes odoo/odoo#35246

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-29 08:10:42 +00:00
Stefan Andersen 6613611039 [CLA] signature for stfnndrsn
closes odoo/odoo#35156

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-25 12:00:09 +00:00
Christophe Simonis 39de3797f8 [MERGE] forward port branch 10.0 up to cb3bf5509f 2019-07-25 11:41:33 +02:00
Romain Derie cb3bf5509f [FIX] web_editor, website: avoid returning children of inactive view
Before this commit, for the following view tree:
P (active)
|
I (inactive)
|
II (active)
When calling `customize_template_get()` on 'P', it would wrongly return 'II'.
It shouldn't, since its parent 'I' is inactive.

Step to reproduce:
- Go to /shop
- Enable ecommerce categories
- Enable Collapsible Cateogories
- Disable ecommerce categories
- Collapsible categories is still shown even if its parent got archived

Test writen in 12.0 with #35154

closes odoo/odoo#35155

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 15:19:26 +00:00
Romain Derie 36fdb2ff49 [FIX] website_sale: restore possibility to remove promo code pricelist
Since 5c9cea4ee7, it was not possible to remove an applied promo code
pricelist by adding an empty promo code on checkout (eg removing the one shown
in the promo code input).

Indeed, when sending an empty promo code, the `search()` done in the controller
would not find any pricelist as promo would be en empty string. For the rest,
check code on mentionned commit.

See `sale_get_order()` method docstring about `code` param: "If empty, it's a
special case to reset the pricelist with the first available else the default.".

Fixes #34633
2019-07-24 11:31:57 +02:00
Martin Trigaux 160b7c87bb [MERGE] Forward port of 10.0 to saas-14 up to f7b6d3b0b8 2019-07-22 08:32:52 +02:00
Damien Bouvy f7b6d3b0b8 [FIX] payment_authorize: md5 to sha512 compat
This commit extends the changes introduced by 88de93114 to adapt
Odoo payment flows to the switch in transaction signature done
by Authorize.net.

The initial fix was not sufficient for flows that mixed redirection
payment flows and server-to-server flows (e.g. paying a quote with a
card that gets saved then using the token to pay for a subscription).

The problem comes from the fact that the server-to-server API uses
the API Transaction Key and API Login ID as credentials to authenticate
requests; there is no need for a signature since this data is never
publicly exposed on the website and a MITM is mitigated by the fact
that it would need to be done between the Odoo server and the
Authorize.net servers (both of which use https in a normal deployment)
which is admitedly more complex than doing a MITM on a Starbucks wifi.

On the other hand, the 'redirection' flow will include all transaction
parameters as inputs in an html form, therefore the signature is
required to ensure that the values have not been modified by a website
user or a mitm.

Since both flows can coexist on the same configuration, we cannot use
the same field depending on the payment flow configuration - we need
both fields to be stored for the provider.

This commit therefore has to introduce new fields on payment.acquirer
record that can store the signature key for authorize in addition to the
usual authorize fields. Instead of adding a new module, this commit uses
non-stored computed fields that will generate System Parameters entries
for any acquirer of the 'authorize' kind when set through the interface.

closes odoo/odoo#34670

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-16 05:25:09 +00:00
Lucas Perais (lpe) 565cb99ec0 [FIX] l10n_be_intrastat: weight must be > 0.01
Fine tuning of 06d149a3b1
It appears that according to
https://www.nbb.be/doc/dq/f_pdf_ex/nieuwsbriefintrastat_n28_2018_fr.pdf
minimum weight  is 0.01, and that anything below should be rounded to 0.01

OPW 2031682

closes odoo/odoo#34951

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-17 14:03:40 +00: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 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 ce5ec5f5f6 [MERGE] Forward port from 10.0 to saas-14 up to 0ec0a4a32e 2019-07-10 08:35:05 +02: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
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
Jorge Pinna Puissant a8dfc7fb73 [FIX] website_payment: consider authorized transactions as done
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

closes odoo/odoo#34652

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-08 11:15:44 +00:00
Xavier Morel 7b33689b7b [IMP] base: better and less conflicting version of e210faa676
Backport somewhat improved version of this fix (we don't need to check
for the existing extension since we're not doing anything if there is
an extension at all) merged into later branches, to avoid forward-port
conflicts.

closes odoo/odoo#34509

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-05 05:53:29 +00:00
Christophe Simonis c816efe7de [MERGE] forward port branch 10.0 up to 24b677a359 2019-07-03 19:23:14 +02:00
Christophe Simonis 24b677a359 [FIX] test_rpc: more robust tests
- mute logger to avoid logging bad queries
 - enforce fields strings

These changes will forbid tests to fail in following versions.
2019-07-03 19:20:31 +02:00
Christophe Simonis 565165a6c8 [MERGE] forward port branch 10.0 up to acbdd526e6 2019-07-03 18:32:16 +02:00
jev-odoo acbdd526e6 [FIX]l10n_fr_fec: better remove new line
Fix/improve commit d870749d79
that was removing line feed (\n).

In this one, we also remove carriage return (\r)
to address all cases.

closes odoo/odoo#34536

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-03 07:40:43 +00:00
Xavier Morel e1d6f18f6d [FIX] base: don't overwrite existing extensions
The point was to fix files attachments without an extension,
potentially appending to existing extensions was not a smart idea.

See #34299, 5eb15c01b5
2019-07-02 09:59:58 +02:00
Xavier Morel e210faa676 [FIX] base: don't overwrite existing extensions
The point was to fix files attachments without an extension,
potentially appending to existing extensions was not a smart idea.

See #34299, 5eb15c01b5
2019-07-02 09:49:18 +02:00