Commit Graph
127612 Commits
Author SHA1 Message Date
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
Richard Mathot ed90ad0a01 [FIX] mail: restore "pencil" icon behaviour in Followers widget
When editing the followers, the "pencil" icon that leads to the edition
of subtypes should be displayed only when "debug" mode is activated.
This commit restores this behaviour, as it was not the case anymore.

`has_group()` looks for static groups stored in database, whereas
`base.group_no_one` is dynamically added/removed depending on the flag
`debug` of the request.

We thus use `models.user_has_groups()` that adapts on the `debug` flag.

opw-2055848

closes odoo/odoo#36327

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-09-02 11:57:54 +00:00
Andrea Grazioso (agr-odoo) b8c7eddb34 [FIX] calendar: invitation for deleted event (recurring)
From calendar create a recursive event and add some guests. Delete one
event of the chain.

Invitations (Mail) will be created for the deleted event, and should not
be the case because the event has been deleted.

This happens because the recursive event is really just a record in the
database representing all the generated events. When the user want to
delete an event in the chain, a new event, copy of the "parent" event
has to be registered and subsequently disabled.
In the process of creating the event the mail is sent as
side effect. Note that the code to prevent this was partially there
because a context flag "dont_notify" is sent by the unlink in
Calendar.Meeting but was ignored from the mail subsystem.

opw-2039576

closes odoo/odoo#36270

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-02 09:45:51 +00:00
Lucas Perais (lpe) 4181063031 [FIX] hr_expense: domain for field employee
Before this commit, the domain applied to the field
employee_id on hr_expense was wrong, so a simple officer (no other rights)
could not see the relevant people

After this commit, the domain is correct and matches the one on the
officer group's record rule

OPW 2058512

closes odoo/odoo#36292

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-02 07:52:02 +00: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 ad03cac07a [FIX] mail: channel notification messages are never marked as unread
When a user either joins and leaves a channel, it posts a message of
type 'notification' with either action as content.

Before this commit, such messages above were incrementing the unread
counter of the channel. As a result, the messaging menu was showing
this channel as unread with this message.

Messages of type 'notification' should never increment the unread
counter of channel.

This commit fixes the issue by preventing new messages of type
'notification' to increment the unread counter of a conversation.
This should also prevent increasing the counter of the messaging
menu, in addition to highlighting this channel as unread from the
messaging menu.

Task-Id 2059515

closes odoo/odoo#36293

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-30 15:18:05 +00:00
Sébastien Theys 3a52b22b50 [FIX] web: correctly escape image name
Follow up of https://github.com/odoo/odoo/commit/2f932e3a46c6005870e4130b3c3f7151cd521f2d#r34760948

`url_quote` does not escape `/` which leads to incorrect routes when the name
contains `/`.

Also escape `\` to avoid potential issues on different OS.

closes odoo/odoo#36146

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-02 19:15:46 +00:00
Arnold Moyaux 5f7648bb9a [FIX] mrp: failing test multi mrp step
It's due to MRP refactoring that confirm raw moves before finished
moves. It implies that in _assign picking, SFP with final product
will search a picking but the stock.move do not have a created_production_id
and it will be merged inside the intermediate SFP (it works before
because it was the intermediate SFP that was merged in the finished SFP).

_key_assign_picking is also added if multiple moves are confirmed w/
and w/h created_production_id, we won't merge them in the same picking.

closes odoo/odoo#36335

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-02 13:00:00 +00:00
Christophe Simonis 641358892f [FIX] mail: adapt mobile test to new version
Oversight of previous forward-port.
2019-09-02 13:36:19 +02:00
Christophe Simonis 545e6d2034 [MERGE] forward port branch 12.0 up to 52f6e38cea 2019-08-30 17:20:28 +02:00
Julien Castiaux 513545cdbd [FIX] sale_coupon: use partner lang in description
Fine tuning of odoo/enterprise@f433384, not only the promotion must be translated

opw-2034094

X-port/Cherry-pick of odoo/enterprise@6dd77cc049
2019-08-30 17:18:06 +02:00
Olivier Colson 978af5c87e [FIX] account: lines onchange on account.move: remove the base tag when removing a tax from a move line
Before that, when removing a tax previously set on an account.move.line in tax_ids, the onchange event did not remove the corresponding tags from the base line, causing possible errors in tax report.

closes odoo/odoo#36283

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-30 12:51:16 +00:00
Christophe Simonis 52f6e38cea [FIX] account: change back reconciliation test
Reconciliation credit is expressed in company currency
since odoo/odoo@7b636f3342.

See odoo/odoo#36181 for more context about the issue.

closes odoo/odoo#36260

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30 08:34:03 +00:00
Hardik Prajapati 8d7d2aeef3 [IMP] l10n_ch: treat BVR number as structured communication
Now, Swiss users can auto populate BVR number generated for invoice in it's 'Payment Ref.' field
by simply configure it in 'Communication Standard' of invoice's journal.

task: 1999530

closes odoo/odoo#36253

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-30 05:10:14 +00: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 8bd6a93c74 [MERGE] forward port branch saas-11.3 up to ede253f1b2 2019-08-29 16:45:15 +02:00
Christophe Simonis ede253f1b2 [MERGE] forward port branch 11.0 up to d61873ac4a 2019-08-29 15:22:51 +02:00
Lucas Perais (lpe) cbe04c4df1 [FIX] account_voucher: force receivable/payable on payment
Create a voucher in pay_now mode
set another account that the one of the partner
Validate

Before this commit, the automatic payment and payment entries
were done in the account receivable/payable of the partner
which means that the voucher and the payment were never reconciled

After this commit, the payment and its entries occur in the same
payable/receivable than the voucher's

OPW 2056240

closes odoo/odoo#36232

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 12:32:17 +00:00
odoo 25e881d629 [FIX] base: prevent error when no attachements and report edited with
studio

opw2062025

In some cases, when there is no attachment (on an invoice for example)
and reports have been modified with studio, the self.attachement value
is false and an error appears

closes odoo/odoo#36291

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-08-30 14:57:09 +00:00
Goffin Simon b3c345cf28 [FIX] sale_purchase: Access rights error
Fine tuning of https://github.com/odoo/odoo/commit/6236ed1a5b138c5165929aa3f5c1d1f4f6aa061c#diff-2f6cca7f38255368e4a54b0a19406aa4

Steps to reproduce the bug:

- Install Sales and Purchase modules
- Create a user U with access rights to Sales
- Try to open an existing SO or try create one with U

Bug:

An access right error was raised because the non stored field purchase_line_count must be computed

PS: the compute_sudo had no effect on field purchase_line_count because it's a non stored field.

opw:2056746

closes odoo/odoo#36247

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-29 15:44:54 +00:00
Odoo Translation Bot 72fff6ae7e [I18N] Update translation terms from Transifex 2019-09-01 01:39:46 +02:00
Fanny He df85ddc28f [FIX] website_sale_digital: download file.extension when name has no extension
When selling a digital file on the web shop, if the file 'name'
has no extension (e.g. the pdf "Free Booklet"), the buyer
will download "Free Booklet" even when the mimetype is application/pdf).
This causes issues on Mac, as pdf files without extension are renamed
with .dms extensions.

We follow what is done in ir_http's binary_content for the extension management,
using the new one if provided in the name, then the original filename extension
if it exists, and we fallback on guessing it from the mimetype.

OPW 2057302

closes odoo/odoo#36294

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-30 14:29:09 +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
Christophe Simonis c40236eb16 [FIX] account: adapt test to new version
Oversight of previous forward-port.

closes odoo/odoo#36181

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-29 10:04:28 +00: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
Joren Van Onder 3a2eee5c8f [FIX] website_blog: speed up loading blog posts when there are many
Doing filtered on all_post is problematic in case there are many
blog.post records (>5000 were observed). It will trigger prefetching
which will run the content fields through html_translate which can
take many seconds to complete.

Instead replace the filtered call with a more precise search domain.

opw-2060704, opw-2060706

closes odoo/odoo#36207

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-28 17:29:05 +00:00
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
Juhil Somaiya d1ee54450a [FIX] web: dashboard_graph disappearing issue on kanban record reload
When we try to change the color of kanban, the kanban record is re-renders,
kanban record is replaced with kanban-box and subWidgets are re-rendered,
reset of all subWidgets are called which will re-render widget but it is not
rendered in DOM as DOM element is destroyed and hence  dashboard_graph widget
can not computed proper height of the canvas element and disappear

Call on_attach_callback after widget reset is called on kanban record, as widget
element is removed from DOM and new element is added in DOM so
on_attach_callback should be called again.

task-2036256

closes odoo/odoo#35254

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-28 12:04:59 +00:00
Lucas Perais (lpe) e9837fcc09 [FIX] purchase_stock: typo tax in anglosaxon
Have a product valued in real time
make a PO to a vendor with that product, with a tax
validate

Before this commit, it crashed because of a typo

After this commit, the invoice is validated

OPW 2061472

closes odoo/odoo#36216

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 09:05:27 +00:00
Nicolas Martinelli 6d8e5efa84 [FIX] purchase: default user_id on bill
On top of leading to AccessError in multi-company (if the PO was created
by OdooBot), it might also assign a user without Accounting rights to a
vendor bill.

This reverts commit 392f6f2b2b.

opw-2056061

closes odoo/odoo#36173

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-28 10:01:06 +00:00
Nans Lefebvre 3df5c5dd56 [FIX] product: filter out archived pricelists from candidate pricelists
Have a pricelist Pl set as property_product_pricelist on some partner Pa.
Archive Pl, so that the public user Pu use another pricelist Pl'.
Go to the shop, create some order.
The prices are obtained from Pl'.
Log in as Pa; prices are updated using Pl.
However since Pl is archived, it is not visible on the pricelist views,
so the end user cannot explain why the prices changed.

When the pricelist is archived, nothing is done regarding the ir.property
storing the partner/pricelist mapping, so the pricelist is retrieved as default
nonetheless.

We filter out the active pricelists when getting the property.

opw 1946476

co-authored with JKE-be

closes odoo/odoo#36389

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-03 14:24:58 +00:00
Nans Lefebvre 19b17365d7 [FIX] stock_landed_costs: do not (incorrectly) use float_compare to mean float_is_zero
Take a landed cost with an amount_total of 2464788.5
in a currency with no decimals, so precision_digits is 0.
Now let the sum of the lines 2464788.499999999.
Additionally, we have that 2464788.5 is rounded up to
2464789 and 2464788.499999999 is rounded down to 2464788.
So float_compare returns a nonzero value.
However, it turns out that the docstring of float_compare contains:

Warning: ``float_is_zero(value1-value2)`` is not equivalent to
``float_compare(value1,value2) == 0``

So the intended use was to use float_is_zero.

opw-2048388

closes odoo/odoo#36208

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-04 06:46:12 +00:00
Christophe Simonis 838b3f2d82 [MERGE] forward port branch 11.0 up to 1385b60004 2019-08-27 16:06:01 +02:00
Christophe Simonis 1385b60004 [MERGE] forward port branch saas-15 up to ea821b991a 2019-08-27 14:53:45 +02: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
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
Nans Lefebvre 3d6e917899 [FIX] stock: error at application re-install
Fine-tuning of 1da058f8ed, for the same use-case.
The _valid_barcode method is here to bypass the barcode_company_uniq constraint.
The constraint is put on barcode/company couples;
however if checked without a given 'company_id' in the values,
which ends up as False, then the check is actually not the correct one:
the company_id is going to be filled later by the default_get.

Instead we use the value given by the default_get, consistently with the create.

The same error could affect _create_missing_locations,
since it gives an explicit value to company_id that was not passed in values.
We give it to make sure that the company is consistent there to.

opw 2058888

closes odoo/odoo#36102

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-27 06:42:43 +00:00
Lucas Perais (lpe) 21ae503cf4 [FIX] product: name search on dynamic product template
Have a product template, assign a dynamic attribute to
(the corresponding variant will be created when used in a SO)

Try to name_search for it
e.g.: in the product configurator modal, type some letters to catch it in theory

Before this commit, the product template was not found by the name search
this is because the template doesn't have any variant yet

After this commit, it is found by the name search

OPW 2060603

closes odoo/odoo#36215

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 10:19:47 +00:00
Lucas Perais (lpe) 3950702c86 [FIX] account: reconciliation widget: parent name targets partner without parent
Create a partner with a child *WITH THE SAME NAME*
Create an invoice for the child

Create bank statement and line, with the field partner_name equals
to the child's name (and to its parent)

Open the reconciliation wigdet for that statement

Before this commit, the widget searched lines for the child partner
because partner_name matches the child in priority
Hence the invoice just created was not present
This is because when validating an invoice or a payment
the journal entry's partner will be the commercial_partner_id of the child
By definition the commercial partner_id doesn't have a parent_id set

After this commit, the invoice is visible in the widget

OPW 2039768

closes odoo/odoo#36184

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-28 12:14:27 +00:00
qsm-odoo 412117c2a7 [FIX] website: restore background sizing of fixed parallax backgrounds
Fixed backgrounds are disabled when using a mobile/tablet device,
which is not a big deal but, on some of them (iOS...), defining the
background as fixed breaks the background-size/position props.
So we enable this only for >= XL devices.

We may want to find a better alternative for future versions.

opw-2055073

closes odoo/odoo#36187

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-28 12:39:38 +00:00
Alexandre Díaz 5bb4314740 [FIX] website_sale_stock: change '_get_combination_info' signature
This commit changes the '_get_combination_info' signature according to main
method signature to avoid inheritance problems.

closes odoo/odoo#36125

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-27 16:45:24 +00:00
Thibault Delavallée b36b000f5c [FIX] website_sale: fix access right issue when paying
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Commit fe518f1fea introduced a search on sale order model in checkout
process. However this may fail as access rights are not always granted

* portal users can see orders linked to their company;
* salesman and a lot of specific groups (accounting, ...) can see their own
orders, all orders, or depending on some condition;
* BUT standard users (employee only for example) cannot see any sale order.

Indeed they do not even have right to read, meaning a search fail. Let us
sudo the search as this is contained in a sub method used to fetch some
data.

LINKS

Task ID 1937768

closes odoo/odoo#36166

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-28 08:51:15 +00:00
Florimond Husquinet (fhu) 324919bcf0 [FIX] website_blog:redirection 301 instead of 302 to new blog
-Create a second blog
-Move one post to this second blog
-Access the post with the url from the first blog

Before this commit:
You will get redirected to the new url with a code 302 (temporary).

After this commit:
You will get redirected to the new url with the code to 301 (permanent).

OPW-2059194

closes odoo/odoo#36161

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