Commit Graph
144247 Commits
Author SHA1 Message Date
Emilien Durieu (edu) de2c7cff6f [FIX] web_editor: prevent double space insertion
The auto-link making feature would insert two spaces when the user would try to add one space.
It is no longer the case.
Some selection management with the link making has been fixed as well.

task-2584101
2021-08-10 07:56:35 +00:00
Swapnesh Shah 9c9b7d7c37 [IMP] mrp: remove linked attachement on removing mrp document
Steps to Reproduce Bug:

- Add Attachment on Bom Line
- Delete Attachment

Bug:
- Attachment is still present on `ir.attachment`

With this commit, we are removing linked attachment on deleting `mrp.document`

closes odoo/odoo#74595

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-04 18:17:56 +00:00
Loan (lse) 7eeb65e41f [FIX] website_sale: missing image on ecommerce product metadata
Before this commit:
No "image" metadata was available for products on the ecommerce /shop page.
As such search engines SEO will be less effective.
Using "Google Search Console" would give the message:
 `Missing field 'image'` as a "Top Warning"

Note:
This issue was introduced by:
https://github.com/odoo/odoo/pull/30656
and was partially solved by:
https://github.com/odoo/odoo/pull/37870/commits/c66892e65d2ae0ca31a686f65d4b517a9d7ffd0b

opw-2509546

closes odoo/odoo#74922

X-original-commit: af953e69de979794bebabdc4a88c7246f62b8843
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-10 11:06:01 +00:00
Swapnesh Shah 20df6453df [FIX] account: do not set deprecated account as default
Before this commit, It was setting first available account as default regardless
of it is deprecated or not.

With this commit, we are excluding deprecated account as default.

Fixes #74280

closes odoo/odoo#74901

X-original-commit: fa07151785d9a3b3cbaddba34bea072eceda0e81
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-08-10 08:05:03 +00:00
Francois (fge) 815ca6be5d [IMP] mail: Added "New Message" command/hotkey
closes odoo/odoo#74909

Task-id: 2597153
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-11 17:12:37 +00:00
Adam Heinz 542ed0e6cf [ADD] Health checks for load balancers.
https://tools.ietf.org/html/draft-inadarei-api-health-check-04

closes odoo/odoo#56522

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-08-11 14:01:02 +00:00
Adam Heinz ebcffc7c88 [CLA] Add CLA signature for amh-mw. 2021-08-11 14:00:17 +00:00
Gorash 3dbee80c10 [FIX] all: add missing encoding for the templates
following the change 7df343dd1b

closes odoo/odoo#74768

Related: odoo/enterprise#20098
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-08-11 09:54:36 +00:00
Gorash 48da9ae973 [FIX] base: t-esc does not escape Markdown content and is equal to t-out
This is the same behavior as javascript. Which had been changed during
the refactoring of qweb. t-esc asked for escaping whatever the content.
However, a lot of templates still use t-esc. It is easier to go back to
the previous functionality.
2021-08-11 09:51:41 +00:00
William Henrotin c98d6dd269 [FIX] stock: more barcodes on a page
The template to render location and picking barcodes was not optimized
to print lots of barcode. This could lead to extremely long documents
with a few barcodes to print.

closes odoo/odoo#74966

Opw: 2564764
X-original-commit: 7360db95c32d9cbff5cde49e0fa0e1886f88ad1e
Related: odoo/enterprise#20181
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-11 12:12:28 +00:00
Ankita Raval ea6786dfcb [FIX] stock: fix inconsistency beteen product variant and product template
Before commit:
   The issue is that the product is not in the 'available' filter but its
   kanban tile says 'on hand' quantity is available. A different issue is a raise because of this commit:
   https://github.com/odoo/odoo/commit/b08e3d114aa4efe687b4d4cca3de462a3dbe6eea. in this
   commit set the "active_test=False" for product template that's why it fetches all active and inactive
   warehouses and it becomes true for product variant as we don't get
   active_test=False. so condition becomes true and it will fetch only active warehouse and related
   location and result is displayed the different on_hand qty on variant and template.

After commit:
   we prevent the archive location quantity on the product template and its related quants to
   make a consistency between product template and product variant.

closes odoo/odoo#74965

X-original-commit: 52a9d4f08f383acbdcd4b06b8bcb6ee7844243b1
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-08-11 12:12:08 +00:00
Arnaud Joset 80e1259fd9 [FIX] google_calendar: prevent weird behavior when partner email and user email differs.
This commit allows using different mail on the user and the partner without experiencing weird behaviors.

Before this commit, sometimes when user would set a different email on his user_id and his main partner, the sync event would not be visible as long as the event was not accepted in Google.

closes odoo/odoo#74903

X-original-commit: bca4532890432d994c0941042f4eff75485c87ce
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-10 08:44:28 +00:00
Christophe Monniez 9451489bfb [IMP] web: logs assets generation time
From time to time, the bundle generation duration may be unexpectedly
increased by assets modifications.

In order to avoid that, this commit adds two tests that generates all
the bundles. One of the test is only meant to log the duration in order
to monitor it. The other test is ensuring that a bundle generation does
not take more than 2 seconds.

Pay attention that the purpose is not to test the generation of the
bundle, any error during generation is logged as an information.
Also, warnings are silently ignored.

closes odoo/odoo#74746

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-08-05 10:05:49 +00:00
Xavier Morel f1f0a60643 [FIX] base: XML-RPC serialization error on HTML fields (bis)
odoo/odoo#74678 fixed the universal traceback which would happen any
time an HTML field would be read, however it's incomplete because:

* it was tested on a field which wasn't HTML in 14.4
* and no markup was put in the field anyway

So the markup being embedded in the XML-RPC document unescaped was
missed, leading to:

* corrupted (partial) responses when the HTML content is XML-valid,
  depending on the exact API of the client it might only return the
  first or last text segment, or all the text without markup, or
  something else
* outright deserialisation error on XML-invalid content (e.g. void
  elements like <br>)

The cause being that `Markup` overrides all `str` methods to first
escape their parameters before actually applying on the object. This
means `xmlrpc.client.escape` would basically do nothing, then would
concatenate the `Markup` into the document (stringifying it) and send
the entire thing on its way.

Fixes #74884

closes odoo/odoo#74957

X-original-commit: 8a0f7d820cb2296f410be215ffeadd1cefae174c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-08-11 09:07:55 +00:00
Aaron Bohy 5996e2003d [FIX] web: correctly position popover
Before this commit, the popover was a bit far from its target. We
use a margin to compensate the arrow size (8px), but we used it the
wrong way, meaning that instead of applying, e.g. a margin of -8px,
we applied a margin of 8px. As a consequence, popovers were always
positionned at 16px from their target.

closes odoo/odoo#74955

Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-08-11 08:31:41 +00:00
Francois (fge) f6f1b1f571 [IMP] mail: access to chat window from the command palette
From this commit, it will be possible to access the chat window
of a partner/thread from the command palette.

In the palette command, if you type :
    - @ then it will display partners
    - # then it will display threads

TaskID-2593197

closes odoo/odoo#74436

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-11 08:38:10 +00:00
Francois (fge) aa12e9853e [IMP] web: improved api of commands generated by a provider 2021-08-11 08:38:10 +00:00
Bruno Boi b28884161c [FIX] web: legacy dropdown position
Before this commit: the legacy dropdown menus are not placed properly

Issue introduced with commit odoo/odoo@0bb93b2

closes odoo/odoo#74947

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-08-11 07:01:36 +00:00
jbw 67a5f581c0 [FIX] account: journal_id value change in account payment register wizzard
In payment register wizard, when registering payments on invoices, the journal_id
selected in the view would sometimes be replaced by another on save because journal_id
was recalculated in _get_line_batch_key().
All journal_id default value logic moved in _compute_journal_id()
This is a major redesign of commit: https://github.com/odoo/odoo/commit/a3c3cd68329935896e4ebb1e853824de2009e16b related to task : 2524441

closes odoo/odoo#74942

X-original-commit: 69429365c2c490f8f15cd02ee4d1cbee9caa7524
Signed-off-by: William André (wan) <wan@odoo.com>
2021-08-11 06:45:25 +00:00
Mitul Shah ab2afb0e9d [FIX] survey: fix the warning message while sharing the survey
Currently, while trying to share the survey with 'one page per section'
layout, if the survey has only questions and no sections, a warning is
raised that says 'You cannot send an invitation for a survey that has
no questions'. It is misleading because in this case, what you do not
have is atleast one section with question(s).

This commit fixes the warning message for 'one page per section' type
of survey and gives clear idea to the user about what is missing.

TaskID-2611996

closes odoo/odoo#74694

X-original-commit: 381d18888d81f6797004c718fee5dbd9706b3122
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-04 10:49:01 +00:00
Nasreddin Boulif (bon) bdfda1f02f [FIX] stock: use docids as product_id in report
Steps to reproduce:

  - Install Inventory and Studio modules
  - Go to Inventory -> Products -> Products
  - Open Studio
  - Click on Reports tab
  - Select `Product Routes Report`

Issue:

  Traceback is raised.

Cause:

  No 'product_id' provided in data while getting report values.

Solution:

  If no `product_id` key or value in data, set `docids` (or an empty
  list if no docids) as product_id and set 'warehouse_ids'
  to an empty list.

opw-2619142

closes odoo/odoo#74937

X-original-commit: de6b1636818423b2d2b82f900c3b30515af73279
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-08-10 13:19:39 +00:00
Nasreddin Boulif (bon) 1f37e4e0d6 [FIX] web: Allow array value for many2many search filter
Issue:

  In an action, if we add to the context a key `search_default_x_ids`
  (who is a many2many field) with an array of ids as value, it will
  display/use only the first value in the search bar.

Cause:

  If filter-type is 'field' and it's an array, it will take the first
  value.

Solution:

  Take first value of array only if field-type is a `many2one`.

Inspired by Odoo v13.0

opw-2596345

closes odoo/odoo#74936

X-original-commit: 1083bd204a10c9ec1708ba09e85d50fcba8ba8af
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-08-10 13:18:25 +00:00
Odoo's Mergebot 8aaffd16cb [MERGE] *: remove read access on ir.model.*
Remove read access on `ir.model`, `ir.model.fields`, `ir.model.fields.selection` and `ir.model.data` for employees.
To access such records, the code must use the helpers (`_get`, `ref`,...) instead of CRUD operations directly.

Simplify the helpers to ir.model.data that were public and redundant.
self.env.ref is encouraged instead but with the slight drawback that `ref` makes a call to `exists()` (`_xmlid_lookup` can be used if this wants to be avoided).

Part of task-id 8203

closes odoo/odoo#69120

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-10 21:12:46 +02:00
Martin Trigaux 9aedb999f5 [IMP] *: remove xmlid_to_object helper
Use env.ref instead of the xmlid_to_object
To make it more readable and be able to clean old helpers
2021-08-10 14:24:11 +02:00
Martin Trigaux fd67339a3e [IMP] base: remove get_object helper
Not used anywhere, similar to env.ref
2021-08-10 13:49:05 +02:00
Martin Trigaux 15692f3948 [IMP] *: merge ir.model.data helpers
remove _get_id and _get_object_reference that were one liner to
_xmlid_lookup
2021-08-10 13:49:05 +02:00
Martin Trigaux fc6a2be38d [FIX] mass_mailing: give read access to marketing user
Many2one to ir.model
2021-08-10 13:49:04 +02:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
Martin Trigaux abc04a9f18 [IMP] base_setup: avoid call to ir.model.data
Can retrieve the action from _action_show
2021-08-10 13:49:04 +02:00
Martin Trigaux 293d3765fa [IMP] lunch: avoid a call to ir.model.data
Not needed to do it via a specific call, can be included in the
controller data
2021-08-10 13:49:04 +02:00
Martin Trigaux 8e4cec6b07 [IMP] account: remove deprecated method
Never called, action no longer exists
2021-08-10 13:49:04 +02:00
Martin Trigaux 39da150ac2 [FIX] *: add sudo when accessing ir.model.data 2021-08-10 13:49:04 +02:00
Martin Trigaux e8b533088b [FIX] *: add sudo when retriving fields 2021-08-10 13:49:04 +02:00
Martin Trigaux aa8eba2fb9 [FIX] *: add sudo when accessing models 2021-08-10 13:49:04 +02:00
Martin Trigaux 03ff8d4d58 [FIX] *: retrieve model with sudo in selection fields 2021-08-10 13:49:04 +02:00
Martin Trigaux 5dc4cff60a [IMP] base: remove read access to ir.model*
Model, fields and selections are no longer readable
Removes metadata access
2021-08-10 13:49:04 +02:00
Nicolas Lempereur ffd062a3bf [FIX] website_event_track: no cookie lifetime service worker error
If you use firefox and have set cookie to be deleted when you close
firefox, server worker are nuked which cause an error to be shown in
website_event_track:

https://bugzilla.mozilla.org/show_bug.cgi?id=1429714

With this fix, the error is handler and shown in the console instead of
as a traceback to the user.

opw-2556734

closes odoo/odoo#74890

X-original-commit: 8e81db2515dbed196433f2127591384f2e23bfaa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-08-09 18:38:40 +00:00
Bruno Boi 0bb93b272c [FIX] web: various dropdown style issues
Various styling fixes.
Issues were brought by odoo/odoo@3b73095302

closes odoo/odoo#74752

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-08-10 12:58:02 +00:00
Sébastien Mottet (oms) d46097eb73 [FIX] website: remove useless lang attr in configurator template
The attribute lang was set in the template website.website_configurator.
This is not needed. This commit therefore remove this code.

task-2602521

closes odoo/odoo#74931

X-original-commit: d65efdb9896664cba132a08fe85dad6baa348f3b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-10 12:24:29 +00:00
stefanorigano (SRI) 79d069d21a [FIX] web_editor: add missing style entries
When the user selects text, the editor compares its closest block type
with a pre-made list of text types (eg. p, h1...).
In case of a match, the 'active' class is applied on the relative
toolbar component.

This commit will extend the comparison list adding text styles that were
initially missing (= the code, h4, h5 and h6 tags were never marked as
active).

Related to task-2496339

closes odoo/odoo#74925

X-original-commit: 1f1157c7e5c2df1bf318ad3a32e7030c969f5261
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-10 11:19:48 +00:00
imanie383 8679a0e431 [IMP] web: make menu adaptation customizable
the data dom:autoMoreMenu:adapt was added, so that the external
 code can update the menu directly when needed

closes odoo/odoo#74920

X-original-commit: 7283bc5b07ae489d3ece926e2860c26c3d891d59
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-10 10:58:58 +00:00
Toufik Ben Jaa 4fed9f8997 [FIX] purchase: invoicing status not diplayed on portal
- A typo has been introduced by the PR https://github.com/odoo/odoo/pull/61035
    This forbids to display the "Waiting For bill" tag on the portal
    page for the purchase orders.

closes odoo/odoo#74888

X-original-commit: 0b9d9ff95d2ee9a72b10ddff006399a054bfa56c
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2021-08-09 17:19:23 +00:00
Swapnesh Shah 998e588cfd [FIX] purchase: use correct label/title on kanban
closes odoo/odoo#74892

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-08-09 19:33:42 +00:00
Jeremy KerstenandYounn Olivier 88cb6db6de [IMP] website_sale*: add to whislist and notify stock
This module allows users to be notified by email when a product out of
stock comes back in stock. For that they can add it to their wishlist
and select the appropriate option.

We show out-of-stock warning in all case whatever the show availibility option.
You cannot custom you 'in stock' message ot free message.

Spec of Pde and Fp

Part of https://github.com/odoo/odoo/pull/68221
task-2458165

closes odoo/odoo#68221

Related: odoo/upgrade#2405
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Kersten Jeremy <jke@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
2021-08-09 14:13:58 +00:00
Younn Olivier 91ba4a399d [ADD] website_sale_comparison_wishlist: add comparison from wishlist
Add a bridge module to allow users to compare products from the wishlist
page.

task-2458165
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:44 +00:00
Younn Olivier 098842d1e9 [FIX] website_sale: fix addToCart methods return values
Some return values were missing on cartHandlerMixin._addToCartInPage and
WebsiteSale._submitForm, therefore it was not possible to wait for their
promises to be resolved.

task-2458165
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:43 +00:00
Younn Olivier 198a075cf4 [IMP] web_editor: add height option on html field
It is possible to specify a height for the html field, instead of the
default 380px.

task-2458165
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:43 +00:00
Younn Olivier 4da9533cdf [IMP] website_sale_stock: use free_qty instead of virtual_quantity
Replaces the forecasted quantity by the available quantity to be
coherent with Sales app.

task-2458165
Related to https://github.com/odoo/odoo/issues/68185
Part of https://github.com/odoo/odoo/pull/68221
2021-08-09 13:10:43 +00:00
Romain Derie cfe4a47702 [REM] website: remove unused compute
The field was removed with 15aae7ea34

closes odoo/odoo#74875

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-09 15:10:26 +00:00
f57a13f3f6 [IMP] website: add the possibility to share coupon and promotion links
Coupons and promotion programs can now be shared by creating a link that can
directly be used by the customer.

Using the link, the system will try to apply the coupon/promotion to the
customer's order.
If this can't be done, the error will be shown to the user, for instance
"A minimum amount of 1000$ is required to get the free ipad".
That coupon/promotion will then be stored in session and the system will try
automatically reapply it when something is added to the cart.

task-2489749

closes odoo/odoo#69053

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-08-09 14:16:54 +00:00