Commit Graph
139023 Commits
Author SHA1 Message Date
Benjamin Vray f937e602a7 [FIX] website: fix menu direction of header dropdowns
Before this commit, the menu direction of header dropdowns was
related to the window width but it was wrong because of the right
panel. We also enable it in editor mode.

task-2312878

closes odoo/odoo#59846

X-original-commit: ced500e9bcbb5c84033463689d135ad4c7dc4f39
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-13 11:03:06 +00:00
std-odoo 0a0b40c3c0 [FIX] digest: send the digest tips 2 hours after the database creation
PURPOSE

We want to send the digest tips 2 hours after the database creation.
It can not be done directly on the digest itself because its field
is a date and not a datetime.

So we change the "Next Run Date" of the digest to now, and we run
the digest CRON 2 hours after its creation.

LINKS

Task 2351561
Internal odoo/internal/pull/1051

closes odoo/odoo#59844

X-original-commit: d2e3c03f89c6c62dc06e05f5fe06104205245e20
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-13 11:01:36 +00:00
Achraf (abz) 0927466ed9 [FIX] manufacture: Automation rules raise traceback
Issue

    - Install `Manufacture` and `Purchase`
    - Go to `Manufacture`
    - Enable Studio
    - Create new rules
    - Select `Purchase Order` model
    - Try to select autocomplete proposition with `Deliver to` field

    Traceback raised.

Cause

    The _search function does not return indexable value.

Solution

  Cast _search to a list.

  PS: search can be used (instead of _search) to get iterable value.

opw-2357391

closes odoo/odoo#59832

X-original-commit: 8af2dbb06723213163ee3ad617e5c9309099b4bc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-13 09:29:02 +00:00
Goffin Simon 5d5c460784 [FIX] account: Updating currency on Vendor bill
Steps to reproduce the bug:

- Enable Multi-Currencies and Multi-Companies
- Create a vendor bill
- Remove the default journal
- Set an other currencies

Bug:

A traceback was raised

opw:2350490

closes odoo/odoo#59546

X-original-commit: d9f8efcc330bc7454411aad3546de663424724f7
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-10-13 07:51:27 +00:00
Nicolas Lempereur b2be7e7193 [FIX] sale: default on product change in configurator
When a product is set on a line and we change product with the product
configurator wizard, we will use the attributes values of the previous
product.

But then since the attributes are the ones of wrong product, not
attribute is selected and if eg. we have radio button with one option
and custom value, it will never be selectable (because the radio button
is hidden and unselected).

In this commit, we do not use the current variant values when we change
product in the product configurator wizard.

note: this commit also increases the limit of (custom values) inside the
product configurator wizard, for an arbitrary 10000 limit. Without this
change, each opening of the wizard would only keep 40 customs values and
discard the other ones.

opw-2333091
closes #59016

closes odoo/odoo#59803

X-original-commit: e9c54f6b3d5c36b658308e1900ab68dcc9de0357
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-10-12 17:40:07 +00:00
Xavier Morel a183f2102b [FIX] core: make --test-file work with symlinked modules
While individual addons paths are normalised, module and resource
paths are not.

As a result, when symlinking modules into directories on the
addons path, the path of test modules is only half-normalized: it's
normalised up to the addon path (which likely did not need it in that
setup) but not above that.

This is an issue when using `--test-file`, because that path is fully
normalised, and so the path of the provided test file and that of the
corresponding test module will not match, leading to the tests
unexpectedly not getting run.

Normalize the test module's path before the comparison, using the same
routing used for --test-file.

closes odoo/odoo#59822

X-original-commit: 536809662e542994451be793cd09e87adbf31776
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-10-13 07:25:13 +00:00
Tiffany Chang (tic) 11c710d990 [FIX] delivery: add barcode app check into package wizard
Because the barcode app bypasses the detailed operations for receipts
(with default settings set), an error was being thrown when doing "put
in pack" when a carrier is set (saving during the delivery package
wizard) because the picking move lines are incorrectly selected. This
commit adds in a check for when the wizard is accessed via the barcode
app so that the error does not occur and the same behavior as when no
carrier is assigned is followed.

Related Enterprise PR: odoo/enterprise#9808

closes odoo/odoo#59792

Task: 2039720
X-original-commit: 945b5f6791ae890498ef9a34828eaf91dc1457e2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-12 16:17:20 +00:00
Lavish Chhatwani 348a5c8467 [IMP] calendar,{google,microsoft}_calendar: merge duplicate 'Calendar' tabs
Before this commit
- If Google Calendar and Outlook Calendar are installed, there are two
  'Calendar' tabs displayed on the user form view which is confusing
  and they both share very similar fields.
- Also, in calendar the 'Sync with Google' and 'Sync with Microsoft'
  buttons were not having the same size.

After Commit :
- Now only one 'Calendar tab is there which contains two groups, one
  for 'Google Calendar' and one for 'Office 365 Calendar'.
- Top margin is added on 'Reset Account' button for both Google and
  Microsoft groups for better UI.
- In calendar, 'Sync with Google' and 'Sync with Microsoft' buttons are
  having the same size.

Note - The scss files are not much needed anymore and thus were removed.
       Also to avoid a bridge module just for the sake of empty container,
       we add it in calendar itself.

Task Id-2323205
PR #56551

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-13 07:31:58 +00:00
Lavish Chhatwani 59797095a0 [IMP] auth_oauth: switch 'Preferences' and 'Oauth' tabs on user form
Current ordering is Access Rights - Oauth - Preferences. However we think
that preferences has an higher priority than Oauth. We therefore switch
both tabs so that Preferences is displayed before Oauth.

Task Id-2323205
PR #56551
2020-10-13 07:30:40 +00:00
qsm-odoo 7cc65665ba [FIX] website: remove useless specific scss for quotes carousel
This reverts commit [1] which was fixed the right way and generically
with [2].

[1]: f011c9aacf3a3010c436d4e4f408cd9ae265de1b
[2]: https://github.com/odoo/odoo/commit/9c08e119b125b82e2c42dc944920dd8a96789e25

closes odoo/odoo#59807

X-original-commit: 281edf192efcf5b3c6c045942f75620af9346501
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12 17:46:34 +00:00
Samuel Degueldre d8117750ce [FIX] website_sale: fix ribbon modifications not being previewed
Previously, editing a ribbon in the options panel had no preview inside
of the page until the change was validated. This commit fixes that issue
by making the real ribbon invisible, and making the ribbon dummy
visible. The preview still only affects the current ribbon being edited
until it is validated. Unvalidated changes are discarded when clicking
elsewhere in the page.

task-2339986

closes odoo/odoo#59806

X-original-commit: 922f3b67523e24204f15f38517c3dd207884ba66
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12 17:46:09 +00:00
Benjamin Vray e42dcfba36 [FIX] website, *: keep logged user buttons outside the autohide menu
*: portal

The dividers were removed with the new header templates but we still
needed them to know which items do not need to be folded in the
auto-hide menu. Instead of adding these dividers again, we added a new
class for these elements.

part-of: #59640
task-2312878

closes odoo/odoo#59804

X-original-commit: 59584974aa891b1182164adac3d3563d882bcfd7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12 17:45:22 +00:00
Benjamin Vray c74deb951d [FIX] website: enable autohide menu in editor mode
Before this commit, autohide menu was disabled in editor mode. This was
thus not really wysiwyg for users anymore.

part-of: #59640
task-2312878

X-original-commit: 969aa3dc11061254c52cf06f0b96d36192d61d40
2020-10-12 17:45:22 +00:00
Baptiste Vergote a9a09da5ed [FIX] base_vat: wrong example vatnumber for CH
As described here:
https://www.estv.admin.ch/estv/fr/home/mehrwertsteuer/fachinformationen/steuerpflicht/unternehmens-identifikationsnummer--uid-.html

The "new" (since 2014) vat number has to be displayed as:
CHE 9 numeric digits plus TVA/MWST/IVA
e.g.: CHE-123.456.788 TVA

This commit removes the previous 6 digits vat number check and regex,
and provide accurate examples on the error message displayed if the
vatnumber given is wrong.

opw-2291581

closes odoo/odoo#59793

X-original-commit: 624e086f0c8ac854fd292d3c6dd14a71ed67b9fe
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-12 16:18:49 +00:00
Andrea Grazioso (agr-odoo) 75e59aeff8 [FIX] sale: calculate untaxed_amount_to_invoice based on invoiced quantity
Enable discounts on sales order lines
Create a service type product with invoicing based on timesheet and
task in sales order's project
Create so for 6 hours and deliver 8 hours.
Create 2 invoices: One for 6 hours with the regular price and 2 hours
h 100% discount.
Invoice status of the order will be Fully Invoiced

Go to Sales>Reporting>Sales Analysis report will show the untaxed amount
associated with 2nd invoice as still to invoice which is incorrect

This occur because when saving the invoice the untaxed amount is
calculated on the amount invoice after discount

opw-2338564

closes odoo/odoo#59638

X-original-commit: be5ec58d0a1a71fc84ca790555cac02a6be5b67a
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-09 12:40:46 +00:00
Joseph Caburnay bb565bcd0e [FIX] point_of_sale: add product on single search result
In this commit, we restore the following behavior from v13: when search
resulted to a single product and 'Enter' key is pressed, the product is
added to the order and the search field is cleared. This works for both
manual keyboard input and barcode input.

closes odoo/odoo#59770

X-original-commit: 225e3898f25ddac061be99c43501c99d4bd3226b
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-10-12 15:02:12 +00:00
wan a942e7561f [FIX] account: bill default invoice date context dependent
The date depends on the user's locale, and needs to be consistent with
the `date` field.

closes odoo/odoo#59580

X-original-commit: ed06aab626cb51b86b4178705b45bbcbfbf2c0f2
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-09 09:03:19 +00:00
IEL d07f540e30 [FIX] hr_expense: correct check for bank settings
TLDR: fix a mess in journal fields check

Steps:

* Create expense "paid by Company"
* Click Post

Before:

* AttributeError: 'account.journal' object has no attribute
'default_credit_account_id'

After:

* Either posted or shows user error about journal misconfiguration

Notes:

* Field ``default_credit_account_id`` is replaced in https://github.com/odoo/odoo/commit/41f119d5325dfbbf916d1d34e63946646ed4d44c
* The error is introduced during incorrect forward-port #58852

---

task-2355177

closes odoo/odoo#59780

X-original-commit: 5c0fca662279702115b5e61c8227f82086693e38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-12 15:20:23 +00:00
Laurent Stukkens (LTU) 0ef25d19bc [FIX] website,website_sale: HTML escape dynamic snippet
Issue
    To do on Community:
    - Install website_sale (eCommerce)
    - Go into Website app
    - Navigate through Product/Products
    - Edit 'Customizable Desk (CONFIG)' and add '&' and/or '<' and/or '>'
      characters into the name
    - Save
    - Go to the Website app Dashboard and click on 'Go to Website'
    - Click on 'Edit' button
    - Drag and drop the 'Dynamic Product' snippet into the website
    - Click on the block 'Your Dynamic Snippet wil be ...'
    - In the right panel, in the 'Dynamic Product' snippet options,
      chose a 'Template' and a 'Product Category'

    A traceback is shown

Cause
    the '&' character crashes lxml.etree.fromstring

Solution
    ensure no '&' is sent to lxmx.etree.fromstring by using
    odoo.tools.html_escape (in order to ensure no other problematic
    characters are sent to the front) on the field values except when
    not applicable (widget rendering with record_to_html should not be
    escaped).
    It is important to note here that this is applicable
    to action servers that are used by the dynamic filter.

opw-2357027

closes odoo/odoo#59805

X-original-commit: f91422115c09be484f2868347566b6392ed0effd
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-12 17:45:45 +00:00
David Beguin 26f4fc093c [FIX] survey: let Chart.js handle the session graph max height automatically
Before this commit, the graph y scale in the survey manager screen was based on
the attendees count. But is some attendees do not answer the question, the bars
never reach the maximum height of the graph, and bars can stay really small.

Example: 10 attendees - 4 answers - A: 1 / B: 1 / C: 2

10 |
   |
   |
   |       |
0  |_|__|__|_
     A  B  C

After this commit, the max height of the graph is not set on the graph. So the
chart lib will handle itself the height and will adapt automatically the bars
height in function of the data given to the graph. Bars will always take full
height space, relatively to the count of the most voted answer.

Example: 10 attendees - 4 answers - A: 1 / B: 1 / C: 2

2  |       |
   |       |
   | |  |  |
0  |_|__|__|_
     A  B  C

Task ID: 2351455

closes odoo/odoo#59777

X-original-commit: ac64af033f0bbaa698aee424a5cab85fd9b967d2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-12 15:18:48 +00:00
Jérémy Hennecart b6f6a0dacd [FIX] web: fix notification design
Fix the design of he notification which is sometimes broken
(if there are lists or buttons display in it for example)

task-2346462

closes odoo/odoo#59776

X-original-commit: 238654ae53582d791154388c827f725c8d136612
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-12 15:18:22 +00:00
Raphael Collet f243b71dcb [FIX] core: optimize first snaphot in onchange
This patch speeds up the performance of method `onchange`.  Our use-case
is an invoice with 300 lines, where we modify the unit price or quantity
on several lines.  Each modification triggers a call to `onchange` on
the invoice itself.  The latter call went from 1.3 to 0.8 seconds, which
represents a speedup of 30% to 40%.

In the implementation of `onchange`, the first snapshot is preceded by a
"prefetching" phase, where the lines of x2many fields are read, so that
the fields of unmodified lines are in cache.  This is useful because the
fields of those lines are not sent by the client, which only sends ids.
This prefetching represents more than 40% of the duration of `onchange`,
in our use-case.

The prefetching is inefficient for several reasons.  First, it uses
`mapped`, which formats data that is actually never used.  Second, it
accesses new records that have the actual lines as origin.  And on those
records, computed stored fields are not taken from the origin record,
but are (uselessly) computed instead.

We have optimized the prefetching in the following way.  It now reads
stored fields on the actual lines (using `_read` to avoid formatting),
then copies the cache of those fields on the corresponding new lines (to
avoid useless computations).  This makes the prefetching about 10 times
faster!

closes odoo/odoo#59781

X-original-commit: ec50c426d7c2a17c7b72e64adab65eda6328e163
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-10-12 15:20:47 +00:00
Samuel Degueldre 2fbb4cc9f2 [FIX] web_editor: fix background-images not being auto-optimized on drop
Previously, background-images were not properly optimized when inserted,
whereas they should be just like regular images. This commit fixes that.
It also changes the default quality (used for automatic optimization) to
75 as the difference is not usually very noticeable but can bring a big
decrease in image size.

task-2357332

closes odoo/odoo#59779

X-original-commit: 5d8c0aa0f7678f51e0a0931b0410a0273c7c7d1f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12 15:19:39 +00:00
Antoine Prieels b86ef518f0 [FIX] payment_odoo_by_adyen: Disable test mode
No test mode is available for Odoo Payments

closes odoo/odoo#59778

X-original-commit: 118e52b748a9e0faec45be0ddf1a9e4a94a3f37c
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-10-12 15:19:12 +00:00
Antoine Prieels f52c9fa1c0 [FIX] adyen_platforms: Sync KYC status on update
The response we get after updating data contains the new KYC status,
we then update it on the adyen account so that we don't have to wait
for the cron.

X-original-commit: 59fdb24527e6073cb3c4de5662d25d4d0cea08eb
2020-10-12 15:19:12 +00:00
xO-Tx b8ed38d816 [FIX] web_editor: fix background-sizing preview
with background-sizing option, user drags background image to adjust its
position using an overlay with the same content from snippet (cloned element).

Some CSS child selector rules will not be applied since the clone element has
a different container from the snippet content.

The CSS "background-attachment" property should be the same in
both parallax snippet & its copy, this will keep the preview more "wysiwyg"
instead of getting different result when bg position saved.

This can be improved by copying all style from snippet content and
override it with overlay related style (copying all css into overlay will
not work since it will change the style of its content too)

task-2327025

closes odoo/odoo#59775

X-original-commit: aaa3e63985789ea07464a5957eb18481e70a383f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-12 15:14:37 +00:00
Swapnesh Shah 6ba24a4137 [FIX] sale_stock: inventory widget visibility
Before this commit there would be crash on Removing `Unit` field from Sale order lines list view due to missing `product_uom`, Which is necessary for `QtyAtDateWidget` widget.

Now we hide the Widget if `product_uom` is not selected.

Fixes #59492

closes odoo/odoo#59724

X-original-commit: ea798c07d31fd186af4bf851966f791a96cb13fd
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-12 09:29:09 +00:00
Siddarth Gajjar 0fa5fe59a2 [FIX] website_slides: fix concurrency traceback
- Prior to this commit, slide content of type document or presentation is
  having src as '/slides/embed' and that controller tries to set slide as
  viewed. Along with this, for few slide types (including document and
  presentation) and for logged in user, it will try to set slide as completed
  once slide rendering is done with help of method `_setCompleted`, without
  waiting for the iframe to be loaded. This means, the controller called from
  the src of iFrame and the above method both tries to update same 'slide_slide'
  table at the same time, resulting into concurrency error.

- This commit fixes the issue by marking the slide as completed (with help
  of method `_setCompleted`) only after the iFrame is loaded, avoiding the
  concurrent updation of 'slide.slide' table.

TaskID 2265863
Closes https://github.com/odoo/odoo/pull/52918

closes odoo/odoo#59391

X-original-commit: c5f406c8cbf43c56939cee054f9b911fe3933b3b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-12 11:25:22 +00:00
Thanh Dodeur a4975d8a4a [IMP] website: improves the menu edition
This commit allows user to edit other menus by clicking on them
the same way the global menu is edited.

task-2272226

closes odoo/odoo#55881

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-08 09:14:24 +00:00
Thanh Dodeur d339342bed [IMP] website: adds video suggestions
This commit adds video suggestions to the media dialog

task-2308019

closes odoo/odoo#55293

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-09 12:11:14 +00:00
808343dab9 [REF] *: owl graph renderer
The main purpose of this PR is to convert the GraphRenderer widget into an OWL component.

Along the main changes brought to the module "web", some other changes have been brought:
- the modules "board" and "stock" have been adapted accordingly;
- the function "utils.sortBy" has been given an extra optional parameter "order" (with value 'asc' or 'desc');
- a helper "owlCompatibilityExtraNextTick" has been added. It has the same effect as the "nextTick" helper but should
  be used in a specific situation (see the corresponding documentation for more information).

Task ID: 2090967

closes odoo/odoo#54009

Related: odoo/enterprise#12710
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Florimond Husquinet <fhu@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-10-12 15:52:01 +02:00
Benjamin Frantzen (bfr) 25023e59e2 [FIX]account_edi: set PdfFileReader to strict=False
Determines whether user should be warned of all problems and also causes some correctable problems to be fatal. Since we just want the widest compatibility when reading PDF, strict=False seems acceptable.

TASK ID: 2358822

closes odoo/odoo#59736

X-original-commit: 9fb637577e0c13778e253b4f1329f59459ab0824
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2020-10-12 11:04:33 +00:00
Sébastien Theys 5af18fbd9e [FIX] mail: ensure discuss composer at the bottom if no message list
task-2358093

closes odoo/odoo#59735

X-original-commit: 07159984999b14d1566706a62d54594753ad9f93
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-12 11:04:07 +00:00
Jorge Pinna Puissant 811444829f [FIX] project: access token on task
- Create a new Project with 'Portal user and all employees' as
  visibility;
- Add a portal user as customer;
- Create a new task in the Project, without assigning the task to
  anybody;
- Connect to the portal as the portal user;
- Send a message on the task.

Before this commit, an Error 403 forbidden was raised, this error occurs
because the task don't have an access token created, this token will be
created when an internal user send a message on the task.

Now, the access token is created if the project has a 'Portal user and
all employees' visibility, and the portal user can post a message on
the task.

opw-2345070

closes odoo/odoo#59733

X-original-commit: 64e93794efb4193b3dfa7aa43360a1ef274e623d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-12 11:00:37 +00:00
yhu-odoo 6424025b65 [FIX] purchase: don't send preview email when PO not saved
When PO not saved, no mail can be send. Sending a reminder preview will
get traceback. In this commit, we check if the PO is saved before
sending the mail.

Also clean some useless code in the send_reminder_preview() and fix the
issue when no json object is return to the widget because of on mail
send.

Task 2339431
PR #57961

closes odoo/odoo#59399

X-original-commit: 83f2cac4b8ba101d6a7736a8ff408a3fdb5422fe
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-12 09:48:24 +00:00
Rémy Voet (ryv) 89a597761f [FIX] purchase: fix state of extra product
As explained in issues-59664, the commit
f18bdc4fcf2b6b0bdb7699c3b2aa38d332301a84 add
readonly attribute in the `purchase.order.line` state field
to avoid to save bad `state` in the server (then the state of the
PO line != PO line).
But it breaks the feature to add product
when the PO is already confirm (the state will be 'purchase' and the
`product_id` is readonly when state == 'purchase').

To fix both issues, add a `default_state` in the context.
It will "bypass" the attrs of `product_id` and the state of PO
('draft') line won't be save because it is readonly.

resolve #59664

closes odoo/odoo#59729

X-original-commit: 74780e95a2a3db9d9875aea7e644bf064ecf6b46
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-10-12 10:16:04 +00:00
Pierre Paridans a84e37bb8a [FIX] mail: plain-text messages word-wrap in Discuss UI
When a user sends a plaintext email to a mail-enabled channel, the
rendering of this message in Discuss have present a horizontal scroll
when the text contains long sentences.

This commit fixes it by enabling wrapping of the line's word to fit its
container size and prevent horizontal scrolling.

Note: the required CSS rules were already present since odoo/odoo@0e7e18ff71
but a wrapper element (with the class `.o_thread_message_content`) was
introduced in odoo/odoo@4685e4bc7f and
merged between the testing of the fix above and its actual merging in the
Odoo codebase, making it ineffective. We only have to properly re-enable
it.

opw-2341485

Related task ID: 34931

closes odoo/odoo#59719

X-original-commit: 5e66ca8d2c970eed999782bdd59e9082f3967833
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-10-12 08:42:49 +00:00
Joseph Caburnay ae83889da4 [FIX] point_of_sale: pos User can't close a session
Starting this commit: 8f57863707
regular pos User now don't have a read access to ir.property model.
Because of this, if a user opens a session, he won't be able to close
it. We sudo the search to stock.move (because the query parameters
requires reading from ir.property) to make sure that closing a session
will succeed.

closes odoo/odoo#59712

X-original-commit: 5e2763fdc94b63eee637f9679f8ea3a07beb74ce
Related: odoo/enterprise#13981
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-10-12 07:55:15 +00:00
Joseph Caburnay be9c8fa303 [FIX] pos_restaurant: table and guests in the receipt
X-original-commit: b87e210d87e71e40d88b0d9f4ca824651651bd8b
2020-10-12 07:55:15 +00:00
Luis González 6430ca499f [FIX] tools/safe_eval: Add missing builtin sorted
Before this commit, the function `sorted` wasn't available on
`safe_eval`, even though it's a Python built-in, which mades it
unavailable for Python-code evaluation, e.g. server actions.

After this commit, the above function is now accessible.

closes odoo/odoo#59715

X-original-commit: a725c8927963848c3f8ada3b71897a54b740cce6
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-10-12 08:12:19 +00:00
Julien Mougenot db41d41739 [REF] board,stock: adaptation to graph Owl
To reflect the changes on the graph renderer, some class names have been
adapted and the graph views in stock reports are now properly
instantiated.
2020-10-12 07:43:43 +00:00
db39211b46 [REF] web: owl graph renderer
We convert the GraphRenderer widget to an OWL component.

Task ID: 2090967

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Florimond Husquinet <fhu@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-10-12 07:43:43 +00:00
Julien Mougenot 3041d81135 [IMP] web: Allow asc/desc order in utils.sortBy
A string parameter 'order' has been added to the "sortBy" function of
the utils module to decide in which order the array should be sorted.
The default is 'asc'.
2020-10-12 07:43:43 +00:00
Mathieu Duckerts-Antoine 12ae5ef8e3 [IMP] web: owlCompatibilityExtraNextTick
Introduced a function that awaits for an additionnal rendering frame
initiated by the Owl compatibility layer processing.

By default a simple "nextTick" will handle the rendering of any widget/
component stuctures having at most 1 switch between the type of
entities (Component > Widget or Widget > Component). However more time
must be spent rendering in case we have additionnal switches. In such
cases this function must be used (1 call for each additionnal switch)
since it will be removed along with the compatiblity layer once the
framework has been entirely converted, and using this helper will make
it easier to wipe it from the code base.
2020-10-12 07:43:43 +00:00
Xavier Dubuc ec3f5cdaf8 [FIX] mail: ask for confirmation before attachment deletion
also hide all messages with empty body and no attachments

task-2282322

closes odoo/odoo#59675

X-original-commit: 60ae42dcda777cd66e4e421dbc02f9ef12a430ef
Related: odoo/enterprise#13974
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-09 17:28:17 +00:00
Paul Morelle 30036759e8 [FIX] hr_holidays: add explicit domain on action
In odoo/odoo@d2238de576 the domain of the
action hr_holidays.hr_leave_action_action_approve_department has been
removed, as the addon was reworked and no domain is needed any more.

However, during a migration from a previous version, the older domain is
not overwritten with an empty value.

With this commit, the domain is set to an empty one, which allows the
migration to correctly update the record.

closes odoo/odoo#59673

X-original-commit: 76c2f412c09ef1169b5cf936f0770cd4200f29e2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-09 16:55:16 +00:00
David Beguin 4c9e39cfbd [FIX] website: get visitor tz directly from cookie
Since tz is now (from 6eb4762fee) added to the client cookie,
visitor timezone can directly be set when creating the visitor, using the
request.

Jstz can be removed as even for module in ENT that used this lib,
we can get the timezone using Intl lib instead.

This will also reduce the number of request made only to get visitor's
timezone.

This commit reverts part of 17e8402523
Linked ENT PR: 12963

Task ID: 2333825

closes odoo/odoo#59501

X-original-commit: 3d9a2de3575777c87327691319d89f9de6b8eada
Related: odoo/enterprise#13918
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-08 11:45:39 +00:00
Andrea Grazioso (agr-odoo) b439ee1022 [FIX] stock_landed_costs: fix account for non-anglosaxon accounting companies
Steps to reproduce:
1. Activate landed costs
2. Create a product that in the purchase tab has active 'Is a landed
cost'
3. Add this product to a purchase order
4. Confirm the PO, create the bill and create landed costs entry

Since they don't use anglosaxon accounting they expect the
invoice line account to be used for the landed cost. It will come in
empty as it is looking at the stock input account.

opw-2332763

closes odoo/odoo#59626

X-original-commit: f500bec7c1a2de799c0d4deb9b7ee43a69b3b46a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-09 11:56:03 +00:00
Andrea Grazioso (agr-odoo) 1126e6614b [FIX] stock_landed_costs: propagate landed costs line from po to bill
Steps to reproduce:
1. Activate landed costs
2. Create a product that in the purchase tab has active 'Is a landed
cost'
3. Add this product to a purchase order
4. Confirm the PO and create the bill

is Landed costs checkbox is not enabled when this product is
being invoiced. Any time you add this product to an invoice manually it
will have it on. They want that same behavior when the invoice line
comes from Purchase Order

opw-2332763

X-original-commit: d8f5ed417deb82151abf7a25ad16ce0720e90780
2020-10-09 11:56:03 +00:00
Achraf (abz) d4d354e3cf [FIX] sale_coupon: promotion program with several identical products
Issue

    - Create promotion program with product_x
    - Create new quotation
    - Add product_x on the first line
    - Add another product_x on the second line
    - Press "Promotions" button

Cause

    The attribut reward_product_qty except singleton but order_line contain more than one element

Solution

    Take the order line with the higher quantity

opw-2350574

closes odoo/odoo#59637

X-original-commit: 30d66b17ea1829e30de176774c7511aab19851a0
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Achraf <macadelic80@users.noreply.github.com>
2020-10-09 12:40:21 +00:00