Commit Graph
118397 Commits
Author SHA1 Message Date
Olivier Dony 0159d71ec1 [FIX] website_blog: encode URL for social sharing
Like in other places where we have social sharing buttons, when we pass
a URL or title as a parameter it needs to be properly encoded.

closes odoo/odoo#36197

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 14:26:36 +00:00
Christophe Simonis 61a85ccf8f [FIX] website_blog: avoid using map to please pylint 2019-09-02 18:46:34 +02:00
Christophe Simonis 1e1702d3c0 [MERGE] forward port branch saas-15 up to dc934d67dd 2019-09-02 18:24:59 +02:00
Christophe Simonis dc934d67dd [MERGE] forward port branch saas-14 up to ff1f3c557e 2019-09-02 18:09:41 +02:00
Christophe Simonis ff1f3c557e [MERGE] forward port branch 10.0 up to c7c68bab84 2019-09-02 17:54:34 +02:00
Odoo Translation Bot 432b50bd1b [I18N] Update translation terms from Transifex 2019-09-01 03:48:01 +02:00
Odoo Translation Bot c7c68bab84 [I18N] Update translation terms from Transifex 2019-09-01 03:24:12 +02:00
Alexandre Kühn 1d766c067d [FIX] mail: keep ratio of img in message with inline dimensions
Before this commit, when a message body contains a big image with
inline dimensions, the image was stretched.

For instance:

- `<img width="4096" height="2304">`
- on 1080p screen in the discuss app:
- max-width for image: 1542px
- image ratio: ~ 1,78
- expected height: 867.38px
- actual height: 2304px

This issue had been fixed[1], but was reintroduced[2].

Note that this fix only works when inline dimensions are set as attr
of the `<img>` tag. It won't work with dimensions attached as inline
styles (e.g. `<img style="height: 4096px; width: 2304px;>`), due to
high CSS specificity of inline styles.

[1] https://github.com/odoo/odoo/commit/e7bc4e9703954fa952f24b4f96e75dc4299bbb28
[2] https://github.com/odoo/odoo/pull/15542/commits/46699c5214229ea8aebcc04e08d0786fd2b67f35

Closes #36227

closes odoo/odoo#36243

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-29 14:50:49 +00:00
Christophe Simonis d61873ac4a [MERGE] forward port branch saas-15 up to 10d88083a0 2019-08-29 13:37:39 +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 10d88083a0 [MERGE] forward port branch saas-14 up to ca34ae4329 2019-08-29 12:16:44 +02:00
Christophe Simonis ca34ae4329 [MERGE] forward port branch 10.0 up to 7c99310b23 2019-08-29 12:14:47 +02:00
Florimond Husquinet (fhu) 55d1c66c8e [FIX] mail: parse message with invalid html as content
Before this commit, when a message contains invalid HTML, it crashed
with error such as: "TypeError: Cannot read property 'childNodes' of
null".

This commit fixes the issue by wrapping the content of messages with
invalid HTML in a `<pre>` tag.

OPW-2048140

closes odoo/odoo#36196

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-29 08:19:57 +00:00
Christophe Simonis ea821b991a [MERGE] forward port branch saas-14 up to e4428e0c9b 2019-08-27 12:44:24 +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
Lucas Perais (lpe) 4855b52c55 [FIX] web: graph: id not in groupby
Before this commit, when having the field "id" in the graph view
it was selected to group by on it.
This doesn't really make sense, and triggers an sql error anyway

After this commit, we filter out that field from the groupbys

OPW 2053444

closes odoo/odoo#35958

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-22 09:58:23 +00:00
Julien Mougenot 55feae2436 [FIX] web: searchbar: focus first item
Doesn't focus hovered option in the searchbar

Before this commit:
When typing in the searchbar while having the cursor right under it,
the selected option was automatically the one hovered by the cursor.

Now, the default option is the first one (typically name search) and the
cursor hovering only takes effect when moved for the first time.

Task 2058656

closes odoo/odoo#36099

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-08-27 14:27:41 +00:00
Luis 4109053388 [FIX] base: add js_class to calendar rnd
Fix missing js_class attribute on the calendar xml validation file
Make possible to create new custom views based on the calendar view

Was already done in master at 496920a8f5 but was not present in 11.0

Closes odoo/odoo#26750
Closes odoo/odoo#31679
Closes odoo/odoo#36156

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-28 07:22:39 +00:00
Mohammed Shekha 01f66151c0 [IMP] web: remove m2o from supportedTypes in selection widget
currently widget selection is not working in m2o in editable list view and
to fix this issue it need a lots of changes to make it work properly,
i.e. make '_fetchSpecialRelation' use correct domain for each record,
batch requests as much as possible, also make all '_fetchSpecial...'
work in the list case.

So to avoid major changes remove supportedTypes from selection widget
so user can not tempted to apply selection widget on many2one field.

task-1871698

closes odoo/odoo#33485

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-28 05:52:03 +00:00
Christophe Simonis 1385b60004 [MERGE] forward port branch saas-15 up to ea821b991a 2019-08-27 14:53:45 +02:00
Jorge Pinna Puissant 61ad8a9ea7 [FIX] website_event_sale: event discount
Fine-tuning 180866fe1e

- Go to Sales > Configuration > Settings
- Enable "Multiple Sales Prices per Product" and select option "Prices
computed from formulas (discounts, margins, roundings)"
- Go to Sales > Catalog / Pricelists
- Select "Public Pricelist" and set "Discount Policy: Show public price
& discount to the customer"
- Add a discount to an event (20 % to "Open Days in Los Angeles" for
example)
- Go to the eCommerce, buy a ticket to "Open Days in Los Angeles" which
as a 20 % discount

Since 180866fe1e the discount is applied
two times.

opw-2058709

closes odoo/odoo#36106

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-27 08:33:30 +00:00
Lucas Perais (lpe) a20b84d05a [FIX] account: reconcile invoice, refund in foreign; payment and writeoff in domestic
This reverts 0164c9dfcb

Have exchange rates:
Domestic - Domestic: 1.0
Domestic - Foreign : 1.113900

Make an invoice: 480 Foreign
Make a credit note: 140 Foreign
Make a payment: 287.20 Domestic

Reconcile all this with a writeoff: 18.04 Domestic

Before this commit, the first invoice was not fully paid
this was due to wrong summing of the partial lines that applies to it
account.partial.reconcile are made between only 2 move lines at a time
Whatever the amounts they hold, it has been computed at creation
and it makes no sense to aggregate their rounding error when computing
their impact on a move line (because, the information is already lost)

After this commit, the use case works, all invoices and payments are fully consumed and reconciled
Note that this is a simple use case, no dates or exchange rates involved

OPW 2057845

closes odoo/odoo#36087

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-26 13:41:21 +00:00
Romain Derie 0ff1933ba1 [FIX] website: restore sitemap lastmod and priority
Commit 54d30d5194 introduced `lastmod` and `priority` on sitemap locs.

This was broken with 4ecbacaf59 which introduced `website.page` model as it
removed the `PageConverter`.

Before website.page:
1. PageConverter returned records with `__lastmod`
2. `enumerate_pages` loop on converters would remove the prefixed `__`

After website.page:
1. code to remove `__` was still there but the pages would be found and looped
on after that code, making it useless.

With this commit:
1. The code to remove the `__` is moved after searching the pages.

Following #36090
Related to #35464

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-26 14:43:39 +00:00
Jorge Pinna Puissant 832dc67678 [FIX] point_of_sale: automatic selection of customer pricelist when using barcode
Backport from 12.0 to 11.0

When using barcode to change the customer to a customer with a different
pricelist than the pos default, the customer pricelist was not
automatically selected.

This is a fine-tuning on 5603b778f6

opw-2047070

closes odoo/odoo#36050

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-26 07:16:05 +00:00
Nicolas Martinelli fb0d84b24a [FIX] portal: VAT modification
The route `/my/account` doesn't implement any restriction for the VAT
modification. This allows users to modify the VAT number although they
shouldn't.

We make the restriction consistent with the backend:

https://github.com/odoo/odoo/blob/e0c7a368580dfeac9af8dc3cb3a10fc33bf4b521/odoo/addons/base/res/res_partner_view.xml#L247

opw-2056727

closes odoo/odoo#36031

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-23 14:16:46 +00:00
Odoo Translation Bot 1dd73aa822 [I18N] Update translation terms from Transifex 2019-08-25 03:08:28 +02:00
Nicolas Martinelli e0c7a36858 [FIX] account_check_printing: set the amount in words
- Create a vendor payment by check
- Remove the amount in words
- Confirm

It is impossible to set the amount to print the check.

We add an action button to recompute the amount in words. It is only
visible when the amount is not set.

opw-2046339

closes odoo/odoo#35968

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-22 12:14:18 +00:00
Christophe Simonis cb5f8241af [MERGE] forward port branch saas-14 up to edf44cdaee 2019-08-22 11:12:39 +02: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 d8524aadf8 [MERGE] forward port branch saas-14 up to e854f68393 2019-08-21 11:26:41 +02:00
Christophe Simonis e854f68393 [MERGE] forward port branch 10.0 up to b058f70941 2019-08-21 11:25:05 +02:00
Lucas Perais (lpe) 06a516af40 [FIX] gamification, hr_recruitment, maintenance: kankan tooltip no longer supports field tag
In v10.0, it was possible, and kinda work, to have
```
<t t-name="kanban-tooltip">
<ul class="oe_kanban_tooltip">
<li><b>Project:</b> <field name="project_id"/></li>
</ul>
</t>
```

In v11.0 onwards, this "feature" has been dropped, since in kanban records
it doesn't make much sense to a field defined/displayed that way
The right way is to call

`record.(field).(raw_)?value`

This commit adapts the only two modules still having kanban-tooltip classes in their views

OPW 2055132
related to #29802

closes odoo/odoo#35869

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-20 14:57:22 +00:00
Wolfgang Taferner 61eccf212b [FIX] payment_stripe: backwards compatibility IE 11
closes odoo/odoo#35944

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-22 08:03:10 +00:00
Jairo Llopis f2b7427fb4 [FIX] website_event_track: suggest recipient with an email
If an event track had a speaker assigned who had an email, and the
email field in the track itself was empty, Odoo was suggesting the
user to send an email to an empty recipient, making an error

Now it only suggests the email if there's one.

Fixes odoo/odoo#35941

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-22 08:05:47 +00:00
Nans Lefebvre ab8c564f44 [FIX] account: fix default_get of account move lines
Obvious typo of 67d82b875c.

opw 2046137

closes odoo/odoo#35939

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-22 07:07:27 +00: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 c43de33643 [MERGE] forward port branch saas-14 up to fa26279014 2019-08-19 12:51:26 +02: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
Shreya Modi 1b234b1be7 [IMP] l10n_uk: updated website link
-website link now redirects to accounting page of odoo.com portal

task-2040072
Closes #35513

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-07 05:59:52 +00:00
Christophe Simonis 77dca40215 [MERGE] forward port branch saas-15 up to d8524aadf8 2019-08-21 15:19:38 +02:00
Nans Lefebvre 67d82b875c [FIX] account: round balance in the default_get of account move lines
Edit journal entries (account.move).
Create a new line. Credit and debit values are filled in with the default get.
Conveniently, if lines_ids is given in context this computes the right value to
balance existing move lines. However, this is done by float operations.
Let e be the resulting epsilon in balance.
As a result a new line may contain e, 0 for credit, debit (or respectively).
If the user fills in the 0 value with v, then the new line contains e, v.
This violates the constraint that exactly one of the two values should be nonzero.

We get the currency from the journal to round adequately the balance.

opw 2046137

closes odoo/odoo#35815

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-19 14:31:45 +00:00
Pieter Paulussen 9e57917376 [FIX] account: fix account_move_line's default_get()
Backport of 50ee1c964b.
Previous version was buggy, as it was already patched by 54c2c0874 and 862c2455.

When creating a journal entry manually, the computed value for the next line
was not taking into consideration all existing lines.
Was PR #25298. Courtesy of Pieter Paulussen (Dynapps)
2019-08-19 12:33:51 +00:00
Andrea Grazioso (agr-odoo) 3bc4d91e9b [FIX] website_sale_comparison: translate product attribute categories
Install the module "Product Comparison". Go to
Website>Configuration>Attribute Categories, then create or edit a category.

No translate button is present when editing the field, there should be one
on the right edge to enter the translation menu.

Adding the missing option in the model.

opw-2052331

closes odoo/odoo#35838

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-20 10:02:15 +00:00