Commit Graph
136749 Commits
Author SHA1 Message Date
Antoine Prieels e8dfbbd1c4 [FIX] pos_six: timapi.wasm file not loaded correctly
The timapi.wasm file was not loaded correctly in debug != assets
because the library tried to fetch /web/content/XXX-XXX/timapi.wasm,
which returned the full JS bundle.

We set the full path of the file in the library:
'/pos_six/static/lib/six_tim/timapi.wasm'

closes odoo/odoo#53739

X-original-commit: b21859a1550df08ac96719c16eb380cc71d81cee
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-06-26 13:09:51 +00:00
Antoine Prieels 639022d28c [FIX] point_of_sale: Electronic payment lines style
Electronic payment lines were not displayed correctly. We resize the
text and button and hide the delete button when a payment is done.

X-original-commit: a9c87c141459e947ccef068226f301e390536bfe
2020-06-26 13:09:50 +00:00
Nicolas Martinelli 4827b9ac9d [FIX] stock: search on location with negative operator
- Go to Inventory > Reporting > Inventory Report
- Filter the location with a negative operator, e.g. 'Location doesn't
  contain "shelf"'

Locations containing 'shelf' are displayed anyway.

We are adding this condition: `'|', ('barcode', operator, name)`. Since
barcode is empty (or at least doesn't contain 'shelf'), the condition is
met and all records are retrieved.

In case of a negative operator, both `barcode` and `complete_name`
must not match.

opw-2281191

closes odoo/odoo#53717

X-original-commit: 8fedbcda6a89d99d42df3694390eac4cf7a987ed
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-26 09:10:35 +00:00
Tom Kairis bdf29635fb [IMP] hr_timesheet: Improve general UX (back2basics)
Change of several labels to increase consistency.
Adapt the size of certain images so that they are rendered without
modifying their quality.
Display the employee's profile image in the grid view to improve
the visual.
Add the kanban view to the All Timesheets menu.
Modify the Time Off configurations so that the projects displayed are
those of a company and that the tasks are adapted according to
the chosen project and vice versa.
Make the hr_timesheet and timesheet_grid module icon the same
for better consistency.

closes odoo/odoo#51808

Taskid: 2239802
Related: odoo/enterprise#10745
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-26 11:15:22 +00:00
Sébastien Theys 1c058b72d8 [FIX] mail: fix (inbox reply) composer event handlers (and discard)
task-2092950

closes odoo/odoo#53731

X-original-commit: c29f5776594c4d2278ce163a78d8eb917fb672c0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-26 11:21:35 +00:00
Sébastien Theys dc011d1246 [IMP] mail: MockServer: add get_mention_suggestions on res.partner
Pr: #53449
X-original-commit: 4f21a77703985d085037dc3d0e472970573810ec
2020-06-26 11:21:35 +00:00
Nicolas Lempereur cef65f589d [FIX] web,point_of_sale: print report preview with current company
In 13.0, the current company selected in the company switcher can be
different than self.env.user.company_id value.

Wizard "Configure Document Layout" (model base.document.layout) is using
the company in company switcher:

```
company_id = fields.Many2one(
    'res.company', default=lambda self: self.env.company, required=True)
```

But the "Preview Document" button is using user company_id, so if you
change the layout then preview, you may see the report layout of another
company which make it seemed broken.

note: also improve code of point of sale added in 59f5e57 (in case of
point of sale, company maybe should be point of sale company but you can
print several ones and the company used on point of sales is the one of
company switcher).

opw-2269849
closes #53712

closes odoo/odoo#53730

X-original-commit: bbb45e3412a5653d78aacc92903e95d1353ed60a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-26 11:04:05 +00:00
Xavier Dubuc e01ad94c4b [FIX] mail: fix composer buttons style
- emoji button was shifting right on click
- log/send button color was not correct

task-2274349

closes odoo/odoo#53724

X-original-commit: 41a7bb6e9b0c674ca3db5638d17e85f1b3b33f79
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-26 10:02:16 +00:00
Xavier Dubuc 343c1c05d3 [FIX] mail: replace <br/> by space in thread preview
task-2284905

closes odoo/odoo#53718

X-original-commit: 80504fabd43832c5495ded3afc4b364c71d3df70
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-26 09:10:55 +00:00
Nicolas Lempereur 03a0b2d22c [FIX] web: company report style on change layout
When company layout is changed, we do not update the company styles for
report: thus we still have the old style for other layout that will not
change anything (besides font).

opw-2269849
closes #53706

closes odoo/odoo#53720

X-original-commit: 8897701b1754b40d8a83c5681907c38fb205657f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-26 09:15:44 +00:00
Lucas Perais (lpe) 257371bab5 [FIX] mail: discuss: unpin channel fixes
FIX: use the correct API of mail.channel.py to unfollow a channel
i.e.: `execute_command_leave`

FIX: unpinning a channel has immediate effect on the interface
chatWindows are closed, and the inbox is displayed

FIX: unpinning a channel destroys corresponding chatWindows across tabs
It also unpins the channel in other tabs

FIX: python sends is_pinned as part of the channel_info
both at init messaging and in the main bus notification
That way, we can keep track of the synchronization of the pin status
between JS and python

task-2275000
task-2267941

closes odoo/odoo#53703

X-original-commit: d4fcc64acb2fc0c6fd9df505380f665abd8b39c4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-26 00:54:54 +00:00
Pratima Gupta 5a30919826 [FIX] stock_account: account_id should be required only if valuation is real
Unable to get stock inventoy report for a product if inventory valuation is
manual. Because account_id was required on model. Changed it, now account_id
will be required only if valuation is real time.

Fixes-2279412

closes odoo/odoo#53704

X-original-commit: 6b8a85b25586358383e14ca2980cc69d6d5475a9
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-26 00:55:45 +00:00
qsm-odoo 8e5caea148 [FIX] website: properly set $component-active-color
The global variable was declared inside a 'if', making it non-global and
thus without any effect.

3 solutions to keep it working with the !default flag:
- Declare it first outside the if with `null !default`
- Declare it inside the 'if' with `null !global !default`
- Use a one-line 'if' *function* to declare it

I chose the third solution as the first one is too verbose and not a
fan of the !global syntax (which could break if bootstrap was imported
inside another 'if' I guess).

closes odoo/odoo#53702

X-original-commit: 96921325b6e6b309996b98c849ba49124d76ab38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-25 23:03:49 +00:00
Julien Mougenot ba86678437 [FIX] barcodes: remove remaining elements from tests
Since the QUnit config is more strict as to what is allowed to stay in
the DOM after tests, a test has been updated to clean its elements
before the test ends.

closes odoo/odoo#53705

X-original-commit: 33b567a777a69a4da627ff1d62b46ad09127f86d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-06-26 01:28:13 +00:00
Julien Mougenot a5aa6f7e51 [FIX] web: qunit detects remaining body elements
After changing the organisation of the test bundles, some elements seem
to have disappeared from most of the tests, leaving free space for other
undesirable elements to remain on the DOM after tests unnoticed.

Now, any element not allowed in the body or qunit fixture will be
properly detected and removed.

X-original-commit: 65da01e5b96ff77d25e4421d654585bc08e09d75
2020-06-26 01:28:13 +00:00
Nicolas Martinelli b6a3b88856 [FIX] mrp: change product variant
- Create a product P with 2 variants A & B (e.g. 2 colors)
- Create the following BOM
  Component 1
  Component 2a, applies to variant A
  Component 2b, applies to variant B
- Create a MO
- Set the product to variant A
  => 2 components are added: 1 and 2a
- Change the product to variant B

The component 2b is added but 2a is not removed.

The issue is coming from the result of the onchange, when comparing the
2 snapshots. The result contains the following commands:
- [(5,)]: clear the lines
- [(1, ...): ]: update component 1
- [(4, ...)]: keep component 2a
- [(0, ...)]: add component 2b

In case we are changing the product, we clear the lines.

opw-2270990

closes odoo/odoo#53689

X-original-commit: 89d9e759ae0cc31ad1fc398d41fa7a638056309e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-25 14:45:46 +00:00
Victor Feyens b93b2824d8 [FIX] product: deletion of product category
Missing super call for product category deletion.

closes odoo/odoo#53699

X-original-commit: ebc75df2b3d3f80aebc2fc1d8500fa57c1755bbd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-06-25 16:18:19 +00:00
Mohammed Shekha 01a8260622 [FIX] web: drag and drop onchange fail should reload kanban
Currently, when kanban card drag and drop, it call onchange method
when onchange fails due to python error raised, e.g. UserError, kanban
view is not reloaded and kanban card stays in dropped column while
kanban card should come back to column from where it is dragged i.e.
kanban view should reload if onchange fails.

After this commit, if onchange trigerred from kanban drag and drop fails
then kanban view will get reloaded and card will come back to column
from where it is dragged.

note: in not stable version, forceFail option will not be added and
promise will fail in all cases but it is not done in stable for safety.

task-2267444

closes odoo/odoo#53695

X-original-commit: 27257d34c8b7374bfd8037de71f175f4ecb2913e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-25 15:46:46 +00:00
Xavier ALT 19033e804e [FIX] web: in search view, use modifiers to determine if filter is invisible
In search view, the "invisible" attribute can use complex expression,
and so we must rely on the "modifiers" attribute set by the ir.ui.view
post-processing to determine if a  filter should be invisible or not.

For example, considering the context {'hide_myfilter': False}, the
following view:

```xml
<search>
   ...
   <filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"/>
   ...
</search>
```

Will be returned as such by the server:

```xml
<search>
   ...
   <filter name="myfilter" string="My Filter" invisible="context.get('hide_myfilter')"
       modifiers="{&quot;invisible&quot;: false}"/>
   ...
</search>
```

After this commit, the filter "myfilter" will correctly be shown.

OPW-2243639

closes odoo/odoo#53690

X-original-commit: 00969326e24dadd9b3f6e026789a1e575dd1c8dc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Xavier ALT <xavieralt@users.noreply.github.com>
2020-06-25 15:01:29 +00:00
alt-odoo 6162a0fee3 [FIX] hr_holidays: incorrect count of accrual allocations
Accrual allocations with a due end date should also be taken into
account when computing allocation_display as they are still valid.

closes odoo/odoo#53696

X-original-commit: 04cbd27e35fc32c61c183905dcd1c5f06a3db447
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-06-25 15:23:16 +00:00
Swapnesh Shah a9bf7be269 [FIX] account: edit tax on draft invoice only
Before this commit, Edit pencil on the widget `tax-group-custom-field` was visible on canceled Invoice as well.

Now, Edit pencil will be visible on Draft invoices only.

closes odoo/odoo#53680

X-original-commit: c5a02d3587c33fcf1bd6a0c78f97772a95652801
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-06-25 14:08:21 +00:00
Xavier Morel ca25127bb2 [FIX] point_of_sale: remove setting of field which doesn't exist
`invoice_policy` is defined in `sale`, which POS does *not* depend
on. According to @pim-odoo, pos also doesn't care about invoice
policy, so it's unclear why this is being set.

It's not the hugest issue in 13.0, but starting with 13.4 setting a
not-field doesn't work anymore, so this blows up... unless sale is
installed. Which it often but not necessarily is, likely explaining
why this went unseen for so long.

closes odoo/odoo#53672

X-original-commit: 12dc354411f79cd41eebf965bc02b5bd373b36aa
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-25 13:13:21 +00:00
Sébastien Theys 6da8fac5f4 [FIX] mail_bot: fix OdooBot not starting
- fix initializer start override (typo in method name)
- properly wrap async code in models
- disable OdooBot for System user
- use existing python method to create chat

task-2284584

closes odoo/odoo#53669

X-original-commit: 47bbfeab9e238ab542d16bf4ed17d60ad6aea50d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-25 12:54:26 +00:00
Martin Trigaux 7ab957d7b0 [I18N] base: export source terms
Was missing demo data and some modules

closes odoo/odoo#53666

X-original-commit: 957bad16b6df1ee712e0db218fe03285fbf5c420
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-25 12:42:15 +00:00
Xavier Morel d72720cd08 [REM] core: DefereredException use
DeferredException was removed in
ab4000fb3c but this specific use was
apparently missed.

closes odoo/odoo#53657

X-original-commit: 0de46bc231622d5b7e4c3e3afeaece6767426af2
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-06-25 11:48:35 +00:00
Xavier Dubuc d1307afd7e [FIX] mail: add padding top & bottom to followers list
task-2280183

closes odoo/odoo#53656

X-original-commit: 6bc6575acf8730767f8430242d6ce26f602ac5c3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-06-25 11:48:12 +00:00
Simon Genin (ges) 3806636d9b [FIX] sale_timesheet: prevent deleting service on timesheet
This commit prevents a user from deleting or archiving the default
"Service on Timesheet" product.

Before this commit, the users were receiving a constraint violation
error.

closes odoo/odoo#53655

Taskid: 2221046
X-original-commit: 761d28bcca1e4f7789d45eb4baa22d08f31717a4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-25 11:43:31 +00:00
Joseph Caburnay 76700a4a1e [IMP] web_tour: observe characterData mutation
Prior to owl, dom changes is normally performed by removing an element in the
dom and replacing it with new one. This is not a problem for the tour service
even if the used mutation observer is only observing attributes and childList
changes.

However, using owl is now a different story because it can change even just a
text of a node when rendering. If after a step this is the only change that
happened in the dom and you are expecting in the next step that the text has
changed, then the tour fails in that next step, but you are given a screenshot
containing the value you are expecting in the failed step. This is a false
negative.

It means that observing only classList and attributes changes in the dom is
not enough, and it is now necessary to observe characterData changes in order
to avoid the false negatives in tour tests.

This change is expected to incur performance tradeoff so the delay in calling
the mutation callback is increased from 500 to 750ms.

closes odoo/odoo#53649

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-25 11:18:48 +00:00
Joseph Caburnay c39e92c9ea [FIX] web_tour: hasTrackedMutation on childList mutation
Current logic returns false if one of the childList nodes is untracked.
It is more correct to return false if all the mutations are untracked.
2020-06-25 10:51:56 +00:00
Nicolas Martinelli 96c8b20daf [FIX] sale_stock: reconcile refunds from SO
- Create a product P, valuation FIFO automated
- Receive some stock
- Create a SO with 1 unit, validate
- Validate the picking
- Create the invoice, validate
  => the Stock Interim Account (Delivered) entries from the invoice and
     the stock move are reconciled
- Return the picking, choose to update the quantity on SO
- Validate
- From the SO, create the invoice (which is a credit note), validate

The Stock Interim Account (Delivered) entries from the credit note and
the returned stock move are not reconciled. Note that both entries are
properly reconciled if the refund is generated directly from the
original invoice.

When retrieving the stock moves linked to the invoice, we always go
through the `refund_invoice_id` field, which is not filled in this
specific case.

The solution is to search from moves directly from the credit note
itself.

opw-2274731

closes odoo/odoo#53610

X-original-commit: 6aa7e843f427df17bc0845c44ab2345cfa93fb77
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-24 15:32:59 +00:00
Lucas Lefèvre 103feca347 [FIX] resource: Find intervals in the resource timezone
With a user with timezone "Europe/Brussels", add a
slot on the gantt view where the preceding day is a working day.
The default starting time will be the previous day.
Reason: the default starting time is midnight, adjusted to
the closest attendance interval in the employee's calendar.
However, midnight in "Europe/Brussels" is actually 10pm UTC
the previous day.
The method adjusting the datetime to the closest attendance only
checks within the corresponding day.

Two ways to fix this:
1) the business code calling `_adjust_to_calendar` should
   timezone the datetimes itself. To avoid similar bugs in the future,
   the method should be modified to only accept timezoned datetimes.

2) Change `_adjust_to_calendar` to convert datetimes it was given
   to the resource's timezone and consider the dates in those converted
   datetimes.

Option 2 is chosen because it seems to take care of the problem at a lower
level which allows the business code to not think about those timezone details.
While this is technically an API change (in a stable release), the method was
introduced recently by b058ca1 as a fix for an already broken method.

closes odoo/odoo#53582

X-original-commit: c6cecac60360a1d8b0c62ee155a818a3a28505e1
Related: odoo/enterprise#11399
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-24 12:35:11 +00:00
Antoine Prieels 852594473d [IMP] hw_drivers: IoT Box Connection
IoT Boxes that load the drivers from this version will always
use images that have the ConnectionManager.
The `try...excpect` is therefore not needed anymore.

closes odoo/odoo#50396

Taskid: 2246535
Related: odoo/upgrade#1407
Related: odoo/enterprise#10285
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-25 09:01:07 +00:00
Xavier Dubuc e5de39d036 [FIX] mail: fix disappearing moderated messages
task-2277748
task-2277811

closes odoo/odoo#53652

X-original-commit: 5ef6aedb8271fa05f79fb6f93f679caa9cd418ff
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-25 11:13:09 +00:00
Lucas Perais (lpe) 281329361d [FIX] mail: prevent auto-scrolling of form view
Use case 1:
Arriving in a record
=> The form view is scrolled to the first chatter message

Use case 2:
switch record with the pager
=> The other record is also scrolled to the first message

After this commit, arriving on a record or switching record displays
the top of the form view

task-2238141
PR #53136

closes odoo/odoo#53644

X-original-commit: 42605baa5b8ddb94318f5a9d91a489c200469377
Related: odoo/enterprise#11429
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-25 10:36:28 +00:00
Lucas Perais (lpe) 2ecd2460b5 [FIX] web: formRenderer: apply class on form el for device size
Before this commit, the size of the form view was handled by a media query
It made testing impossible in certain case when the size determined the behavior
of the form view (the chatter)

After this commit, a class is put on the form view to better be able to test

task-2238141
PR #53136

X-original-commit: d42610297b46f4a1624df1907a9cce91de29fafa
2020-06-25 10:36:28 +00:00
Xavier Dubuc 4c763e6bca [FIX] mail: clarify composer placeholder
Also moved isLog from composer component prop to composer model field.

task-2280159 & task-2250887

closes odoo/odoo#53645

X-original-commit: ba41b1de5edc2b3153a5b20a4f11778a3f724ade
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-25 10:37:11 +00:00
Guewen Baconnier a353077452 [FIX] expression: simplify sub-searches order
Performance fix: when parsing domains using special operators
(`child_of`, ...), or with dotted field on the left value
(`['partner_id.name', ...]`), the ORM starts by a first call on
`search()` and builds a new domain so the final query has "IN (<ids
found by sub-search>)".

The sub-search issued on the comodel uses the default "order by".
The order of the ids is irrelevant here, we only need to know the ids.

A good example is when the sub-search happens on `product.product`,
which is ordered by `default_code, name, id`. The field `name` is
inherited and translated, so the ordering requires a JOIN on
`product_template` and a LEFT JOIN on `ir_translation`. Ordering by `id`
avoids these 2 JOINs.

Some discussion took place about modifying `_generate_order_by()` to
remove the `ORDER BY` clause when the `order` argument is False or ''.
Apart the fact that it would be a breaking change, @odony has shown that
sorting by `id` is so cheap that removing the `ORDER BY` might not
bring significant performance boost [0].

[0] https://github.com/odoo/odoo/pull/52368#issuecomment-646643773

opw-2270690

closes odoo/odoo#53629

X-original-commit: fc91f7b4e8f9f8a95862df1ce95a9639cf7d1363
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-25 08:40:21 +00:00
Florent de Labarre 33e38be688 [FIX] account: cancelled invoices show in unpaid filter
In account dashboard click on unpaid invoice : cancelled invoice are visibles

closes odoo/odoo#53627

X-original-commit: 36dcff74fe070ee54ba3f7c9715f77ad84204582
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-06-25 08:29:06 +00:00
Goffin Simon 693685e022 [FIX] point_of_sale: Wrong logo in the receipt
Steps to reproduce the bug:

- Let's consider two companies C1 and C2
- C1 has the logo L1 and C2 has the logo L2
- Let's consider a user U with C1 and C2 in his allowed companies and C1 as default company
- Log U just in C2
- Go to the point of sale and process an order

Bug:

The logo of C1 was displayed.

opw:2279227

closes odoo/odoo#53625

X-original-commit: 4c95e97ed44c48c7221748987cb3969b2ce9ad13
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-25 08:05:43 +00:00
Priyanka KakadiyaandMohammed Shekha 3da19d2e74 [IMP] web: display comparison period first in pivot
When comparing time ranges in pivot, it makes more sense to display the
previous period before the one being compared. This commit allows that.

Task ID: 2269770

closes odoo/odoo#52746

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-06-25 08:23:32 +00:00
Anh Thao Pham (pta) e2d1d445a9 [IMP] sale_timesheet: small improvements for the reporting
Purpose
=======

Small improvements for the reporting in Project Overview and allow to group by date in Project Costs and Revenues

Specifications
==============

In Project Overview:
- unfold the details of SO by default
- do not display caret if it is not foldable

In Project Costs and Revenues, the date is retrieved for each account_analytic_line and therefore the values are not summed anymore in the SQL request.
Also fix the default filter "Costs and Revenues" that wasn't applied at the opening of the report.

closes odoo/odoo#48172

Related: odoo/enterprise#9415
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-25 08:34:23 +00:00
Antoine Prieels c5e1af7a35 [FIX] hw_drivers: IoT Box connection
In Chrome 84, mixed content will be completely blocked for security
reasons ([see blog](https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html))
Other browsers will probably follow in the next months.

As IoT Boxes don't have a valid certificate before connecting to a DB,
we used mixed passive content to communicate with the boxes.
This won't be possible anymore, and we have no possible way to
communicate directly from the browser to the box.

- When an IoT Box boots without registered DB, a unique code will be
 created with a validity of 5 minutes.
- This code will be shown on the customer display and printed on the
 status ticket.
- The box will call a route on odoo.com and a record will be created
 in odoo.com with the unique code.
- The user will have to enter the code manually in his DB to connect
 to the IoT Box, the DB will then contact odoo.com to search for a
 record containing the unique code. If it's found, the
 `openerp.enterprise.database` will be added to the record.
- The box will then query odoo.com at regular intervals (10 seconds)
 to check if a DB is linked to the code.

closes odoo/odoo#53623

Taskid: 2246535
X-original-commit: c55f12e32598a713105f3c049ac053e46ba15bb2
Related: odoo/enterprise#11421
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-25 06:08:33 +00:00
Csaba Tóth bc81853ba5 [IMP] note: Note module demo adjustment
Add checkboxes to some of the Note module's demo datas
Instead of an old text-only list, take advantage that the notes
contains HTML.

closes odoo/odoo#49368

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-25 05:23:31 +00:00
Nicolas Lempereur e961a2fe09 [FIX] web: action before field willStart end
On a re-render, when:

- a field is not yet started (still in willStart because of RPC)
- then an action is executed

we can get a traceback because we try to save the field before it is
started and `this.el` is not set.

eg. in MRP on a work order:

- click on + to get new serial number

=> page is re-rendered with RPC call to update duration to
   mrp.workcenter.productivity().search_read to update time
   counter

- click on "Record production" before RPC is finished

=> traceback because we try to save `duration` that is not already
started (`this.$el.toggleClass` when `this.$el` is `undefined`)

Without change, added test fails with:

  "Cannot read property 'toggleClass' of undefined"
  in BasicRenderer.canBeSaved

  "Expected 6 assertions, but 5 were run"

Before saas-11.3 5faec34a3c this.el was always set in `init` so this
issue did not happen.

opw-2272117
closes #53532

closes odoo/odoo#53612

X-original-commit: befcad51fd236fdaf284f76cea5624d21c070b0e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-24 15:48:27 +00:00
Sébastien Theys 446888cc0d [FIX] mail: prevent messaging menu mark as read from opening thread
task-2278759

closes odoo/odoo#53619

X-original-commit: 6af057b087bb66af70ed93d7f82521b56e3b1aa5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-24 17:36:44 +00:00
Paul Morelle f463983cf9 [FIX] website: fix semantics of MockRequest
We should push the request object on the request stack only in the
__enter__ method, in order to be symmetrical with the __exit__ method.

closes odoo/odoo#53613

X-original-commit: 30e94d305f9cffa816ddc213e0b9329c0263c145
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-06-24 16:06:11 +00:00
Aaron Bohy 5e888f8a6c [FIX] web_tour: consume step even if tip not visible
When several tips (coming from different tours) can be displayed on
the same screen, we only display one of them [1], the one from the
tour having the lowest priority [2]. For instance, with CRM and
Sales, there are two tours starting from the HomeMenu, but we only
display the tip on the CRM app.

Before this commit, if the user entered the Sales app, the first
step of sales tour wasn't consumed, so no tip were displayed inside
the Sales app, even though the user "discovered it by himself".

This commit ensures that tips that aren't displayed because there
is another one with a lower sequence still get consumed when the
user clicks on their anchor.

[1] f0a7d69dcf
[2] 61ed0409c3c419f9624874fb0743d707eee673b1

closes odoo/odoo#53606

X-original-commit: 3bf1d8418f41bcaa0ba4b153620def11aaea0a2b
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-06-24 15:20:11 +00:00
Nasreddin (bon) 3c169a415b [FIX] tools: Return input_str when removing accents if empty
Issue

	The misc feature remove_accents(input_str) return a
	string 'False' if the param is a boolean.

Solution

	Return input_str if equal '' or False.

opw-2278959

closes odoo/odoo#53572

X-original-commit: 3fc7ce3b5599355933734e5e3f59d14a7a9b199c
Related: odoo/enterprise#11391
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-24 11:06:01 +00:00
Denis Ledoux c219727974 [FIX] base: prevent loop in module categories Administration during upgrades
Revision 07631a5185
inverts the parent/children relationship of the module categories
`module_category_administration`
and
`module_category_administration_administration`,
by swaping the `parent_id`.

During an upgrade, e.g. from 12.0 to 13.0,
as the `parent_id` node has been removed from the category
`module_category_administration` in the data xml file,
the field `parent_id` of the category was left untouched,
therefore leaving the former parent,
creating a recursion between the two categories.

```sql
select id,name,parent_id from ir_module_category where name ilike 'administration';
 id |      name      | parent_id
----+----------------+-----------
 79 | Administration |        78
 78 | Administration |        79
```

closes odoo/odoo#53568

X-original-commit: e4bc0a6c6b1181b7c723df415c75f6983ff91927
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-06-24 10:25:41 +00:00
Hardik Prajapati 63cbe8678a [IMP] project,sale,hr(_timesheet): Generic improments for project
Done the below several improvement on project:

- move the stage description and tooltips to the debug mode
- remove the 'need assistance' tag
- Change the app description in manifest file 'Organize and
plan your projects.'
- Change the burger menu sequence into: Edit/Delete/Share/Set Cover Image
- change the description of the pad feature into, 'edit tasks
  description collaboratively in real time. see each author's
  text in a distinct color.'
- add the following tooltip for the allow_billable field,
  'invoice your time and material from tasks.'
- add an fa-stopwatch icon in front of the Start & the Stop buttons
  in task's form view
- rename the 'validate time spent' modal into 'confirm time spent '
  + increase the size of the description field
  + this field should not be required
- project overview: rename 'Hours recorded' into' Recorded Hours'
- project form view: disable the creation for the portal users field
- Rename the 'ready for next stage' kanban state into 'Ready'

TaskID: 2232051
Related Enterprise PR: https://github.com/odoo/enterprise/pull/9961

closes odoo/odoo#49694

Closes: #49694
Related: odoo/enterprise#9961
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-24 11:10:33 +00:00