Commit Graph
145239 Commits
Author SHA1 Message Date
Aaron Bohy fbf9960dde [REF] web: several small refactorings of pivot and graph
- PivotModel: methods are protected, not private
 - PivotModel: rename meta into metaData (same as in GraphModel)
 - GraphView: use the "useEffect" hook
 - PivotView and GraphView typo: ArchParser is a class

X-original-commit: 71059a4887cf208552e4932ed2f3b6f53d75c369
Part-of: odoo/odoo#76576
2021-09-15 15:22:24 +00:00
Aaron Bohy c4b76c66a4 [FIX] web: pivot: highlight correct column in comparison mode
When hovering header cells in the pivot view, the whole column is
highlighted. In comparison mode, a wrong column was highlighted
when hovering a measure.

X-original-commit: 751c2a78d375d67fc7e2cc20342d29188a3d11b5
Part-of: odoo/odoo#76576
2021-09-15 15:22:24 +00:00
Aaron Bohy cf6f9141f3 [FIX] web: pivot: do not alter table while reloading
Before this commit, it was possible to alter the table while it
was being reloaded (e.g. because a filter had just been applied,
or a measure had just been toggled). Those operations that altered
the table (e.g. sort rows, add groupby, expand group, close group)
typically cancelled the reload, which led to a situation where the
table was frozen, and only another reload from the search could
unfreeze it.

With this commit, we simply ignore all operations on the table
itself when it is being reloaded.

X-original-commit: dcdec74dca65e91998d90e3da0c14d8ee3df1567
Part-of: odoo/odoo#76576
2021-09-15 15:22:24 +00:00
Aaron Bohy 648caa59be [FIX] web: pivot: can flip axis while reloading the data
Before this commit, if the user clicked on flip axis while the
data was being reloaded (e.g. just after applying a filter), the
reload was cancelled, and the axis wasn't flipped.

With this commit, we wait for the data to be loaded, and then
flip the axis.

X-original-commit: 5dc0631e339d04cc9f696490e73cf85d45b918fa
Part-of: odoo/odoo#76576
2021-09-15 15:22:23 +00:00
Aaron Bohy a9bde08f98 [FIX] web: fix concurrency issue in pivot
Let's assume the following scenario in a pivot view
 - toggle a filter on a slow network s.t. it takes a while to load
 - while it's loading, toggle a measure

Before this commit, the view was kind of locked after those two
steps, i.e. toggling measures, expanding groups, flipping axis did
not work anymore (it could be unlocked by interacting again with the
search view though). The reason is that the new filter triggered a
re-rendering of the withSearch component (the parent of the pivot
view), thus calling willUpdateProps on the pivot view, which reloads
the data. Toggling a measure cancels the current load operation
(via keepLast), and the promise returned by willUpdateProps is thus
pending forever. From that point, only another re-rendering from the
parent (withSearch) could unlock the situation by cancelling the
previous rendering.

X-original-commit: b9278e07b9ff01e608ccba6f4602eb9069213a46
Part-of: odoo/odoo#76576
2021-09-15 15:22:23 +00:00
Aaron Bohy 932de2fc0f [FIX] web: pivot: can toggle several measures at once
Before this commit, if the user quickly clicked on several measures
(before the reload is over), only the last click was taken into
account. With this commit, all changes are aggregated such that we
only display the final result, with the desired measures.

X-original-commit: a4bae57e1f3b095a4e2d35b3da424c34df59b8dd
Part-of: odoo/odoo#76576
2021-09-15 15:22:23 +00:00
Adrien Widart 4385307f4e [FIX] mrp: create MO from a mobile
It is currently impossible to create a MO from a mobile if there are
some work orders

To reproduce the issue:
1. In Settings, enable "Work Orders"
2. Create two products P_finished, P_compo
3. Create a BoM:
    - Product: P_finished
    - Components:
        - 1 x P_compo
    - Operations:
        - Create a new one
4. Switch to mobile mode
5. Create a MO with P_finished

Error: When saving the MO, a Validation Error is raised "The operation
cannot be completed: - Create/update: a mandatory field is not set.
[...] Model: Work Order (mrp.workorder), Field: Unit of Measure
(product_uom_id)"

For a work order to be created, the request needs to provide one
additional field: `product_uom_id`. When setting the
product P_finished, `product_uom_id` is returned but not included
in the save request (because the field is declared as `readonly`)

OPW-2557181

closes odoo/odoo#76572

X-original-commit: 57c5e06f4f6de60ebc8b933ed327613588256273
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-09-15 15:22:05 +00:00
Nils Hamerlinck 22faf86089 [REM] packaging: remove obsolete dependency feedparser
- Up to odoo 10.0, feedparser dependency was optionally used in the cli of vendored html2text.py
  (see https://github.com/odoo/odoo/blob/10.0/addons/mail/models/html2text.py#L437)
- Since 11.0 (67c17cb3), vendored html2text.py has been removed in favor of maintained package
- Turns out the feedparser part in html2text was dead code for a long time anyway
  (see https://github.com/Alir3z4/html2text/issues/220)
- So we can safely drop this dependency

closes odoo/odoo#76571

X-original-commit: 153ecbba47079982a2ec399f33bb246ba95550ba
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-09-15 14:05:04 +00:00
Yannick Tivisse a082b6bf0a [REM] (note_)pad(_project): Drop etherpad integration
Purpose
=======

With the merge of https://github.com/odoo/odoo/pull/75768 , the new odoo editor
is now collaborative, rendering pads useless. We are thus removing this
feature in Project and Notes.

TaskId:2643861

closes odoo/odoo#76467

Related: odoo/upgrade#2826
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-15 12:42:07 +00:00
ijas ahammed 3fad70bdc5 [IMP] website_profile: set correct 'email_from' in validation email
Currently, the 'email_from' field of the 'validation_email' mail template
is utilizing logged in user's email address. However, in our case, logged
in user is the same as one to which we are sending verification email.
This creates the impression that you are sending the mail to yourself,
which is not correct.

With this commit, we now utilize the receiver's company email address
'email_formatted'. This compute field will first prioritize company's
partner email address, and if not available, it will fallback to the
catchall address of the company. If both are not available, we simply
use logged in user's email as before.

TaskID-2634155

closes odoo/odoo#76380

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-15 12:42:03 +00:00
Odoo's Mergebot a53e80e021 [FW][MERGE] project: Improve global UX
This PR fixes and improves features introduced in version 15 for services modules.

task-2638359

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#76540

Forward-port-of: odoo/odoo#76166
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-15 12:16:49 +02:00
Kamen Zhekov db3acb5ef9 [FIX] website: correctly set and sync custom account setting
A while back, the behavior of this setting was changed from a
related field to a computed as a fix to various issues with: cb9f48d
The setting's value synchronization with what is displayed on the
setting's page is broken, since its behavior changed with commit:
2ccc735 . It resets to its default value for the default website when
editing a secondary one and is not only confusing but breaks the
setting in some scenarios.

When changing the auth_signup_uninvited setting, the changes
are correctly reflected and not reset to default upon changing
the website we are currently editing.

task-2612686

closes odoo/odoo#76538

X-original-commit: 6e7a0664850ccbc30a7a8a3ced22f05347bc6f9e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-15 10:16:47 +00:00
oco-odoo 18842ee53f [IMP] account: carryover: better tooltip
closes odoo/odoo#76530

X-original-commit: d3728f89250a5e71723a48c55b4213650aa261f8
Related: odoo/enterprise#20874
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-15 10:16:39 +00:00
Younn Olivier 096a6e72a9 [FIX] website: only display website languages for conditional visibility
The languages displayed for the ConditionalVisibility option are now the
ones available for the website.
The select widget is hidden if there is only one.

task-2629245

closes odoo/odoo#76537

X-original-commit: 380edf50bd1d8d1f7b1a33fd4fa1ad70dbc12804
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-15 09:02:16 +00:00
Florent de Labarre 522cb20e77 [FIX] point_of_sale: pos is launched with all companies
- Activate multicompany
- In the company switcher select all company
- Launch a pos session
--> Issue all rpc request are make in all companies (len(self.env.companies) != 1). It create some error with taxes, fiscale position, ...

closes odoo/odoo#76522

X-original-commit: a553f86afc5e9ff3ddd58eb6b68ba7ff9cf936a5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-15 09:02:10 +00:00
Joseph Caburnay f4c46694f5 [FIX] point_of_sale: do not allow validation of empty order with no payments
closes odoo/odoo#76517

X-original-commit: 1207d3737f8b36159acc8c92fd841b3b56d1f730
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-15 09:02:06 +00:00
mreficent 85500f5a07 [IMP] account: add hook to pre-process taxes_map
Currently, the _recompute_tax_lines method is too long and there is no way to customize the taxes_map before move line creation. This commit adds a hook to be able to customize the tax dict values.

closes odoo/odoo#76431

X-original-commit: 748ac0764ae2f68dfd2a73ba273e2c194fad282b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-09-15 09:01:58 +00:00
Zelong Lin aa7bc757a2 [IMP] mail: allow user to edit message
task-2362167

closes odoo/odoo#76544

X-original-commit: 5d9d20748845652d2ecf527f4011522bf584807b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-15 07:48:22 +00:00
William Henrotin 07ee514897 [FIX] product: use correct price field
Commit fa034b2a64 removed lst_price on
product.template That means we need to check if product is a variant or
not to choose the suitable price field.

closes odoo/odoo#76503

X-original-commit: c50e7b106b08577228a410e1e34403bd8a6eb80d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-15 07:48:12 +00:00
William Henrotin eb4d8e452c [FIX] prpduct,stock: fixes on product labels
This commit fix some issue introduced with d9f45ba694.

X-original-commit: e4b9dab45665b0ba83d84c52ecc4638472ad454f
Part-of: odoo/odoo#76503
2021-09-15 07:48:12 +00:00
Mitul Shah c1ea516aa7 [IMP] various: improves button titles for better command palette
Currently, in some of the important business objects' form views,
few header buttons are missing the title, and so the command palette
displays the button string which is not very clear/useful.

This commit improves the behavior by adding titles to the buttons. Below
are the model wise actions/methods linked with updated buttons:

 - preview_invoice (account.move)
 - action_sale_quotations_new (crm.lead)
 - action_set_lost (crm.lead)
 - action_set_won_rainbowman (crm.lead)
 - crm_lead_lost_action (crm.lead)
 - iap_enrich (crm.lead)

Task-2622266

closes odoo/odoo#75935

Related: odoo/enterprise#20680
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-15 07:48:06 +00:00
Jorge Pinna Puissant d9303a8448 [FIX] web: fix multiple display errors
This commit will fix some display errors :
 - The margin space between two btn-group on the control panel was too big;
-  The "Group By" menu was lacking an option to add the "fa-caret-down" to looks like other
    Dropdowns;
- The "Group By" menu on the graph view, when used as a subview, has been place in its own
    btn-group to behave exactly as the "Measures" menu;
- The background of the headers on the pivot table wasn't always gray;
- Some borders of the pivot table were missing.

closes odoo/odoo#76529

X-original-commit: 0ffe18927c2f086529de168b5665766a1b9261f7
Related: odoo/enterprise#20872
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-09-15 06:35:00 +00:00
oco-odoo 0f2d151d9b [FIX] account: Don't generate pdf at all when trying to print a misc operation from the 'print invoices' actions
Before, clicking on 'print invoices' or 'print invoices without payment' on a posted misc operation raised an error message saying that only invoices could be printed. However, the pdf file still got generated and could be found as attachement on the move. With this commit, we don't generate the file anymore in this case.

closes odoo/odoo#76534

X-original-commit: 4c06b3c1180048b1c0db5067adf0c0bef5c02785
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-15 05:27:53 +00:00
Didier (did) 1c3147eeee [IMP] mail: improve attachment components
Current implementation switch display between file attachment and image
attachment. This commit split those behavior in 2 components.

Part of task-2365881

closes odoo/odoo#76541

X-original-commit: 0a0f37f6645f1196e3a6d104e8592a1a362058db
Related: odoo/enterprise#20880
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-15 00:56:49 +00:00
Nasreddin Boulif (bon) 6d20d54479 [FIX] stock: Display only one table header in traceability report
Steps to reproduce:

  - Install Manufacturing module
  - Go to Manufacturing -> Operations -> Manufacturing Orders
  - Create a new one and add at least 10 product components
  - Move it to Done stage
  - Click on stat button Traceability
  - Unfold the components
  - Print report

Issue:

  Table header on 2nd page overlap table content.

Cause:

  Wkhtmltopdf does not handle well table on multiple pages.
  More info here: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2367

Solution:

  Do not duplicate table header on next pages.

opw-2634492

closes odoo/odoo#76535

X-original-commit: 8cc791e2de0f708ff7d69574cc8a8a40ef61c02b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-14 23:38:52 +00:00
Laurent Stukkens (LTU) 49fce6207e [FIX] project_mail_plugin: change user_id into user_ids
The `user_id` field was replaced in odoo/odoo#74087 by `user_ids`.
The field change was forgotten in in the returned action of the
`/mail_plugin/task/create` route.

task-2638359
closes #76166

X-original-commit: 7e7b6bec4d996a280475af5c691ec9db020fb048
2021-09-14 21:25:00 +02:00
Laurent Stukkens (LTU) 4ed77405e4 [FIX] project: change user_id into user_ids in various view and reports
The `user_id` field was replaced in odoo/odoo#74087 by `user_ids`.
The field change was forgotten in various reports and the a wizard.

This commit fixes those.

task-2638359
closes #76166

X-original-commit: f584485f0c69eda002491ca9b63bc3d228e95001
2021-09-14 21:25:00 +02:00
Cedric Prieels (cpr) 942c64df67 [MOV] project,sale_timesheet: move sale project tour steps
Elements referring to the sales order from the project module have been
removed from the project update js tour and moved to sale_timesheet
tour.

task-2638359
closes #76166

X-original-commit: 0b9d5b4a9c5552e22bb6a8f89b0e492330a034fd
2021-09-14 21:24:59 +02:00
Xavier BOL (xbo) 5b51f369aa [IMP] project: change the analytic account name when project one changes
Before this commit, when the user changes the project name, we don't
change the one in analytic account linked even if the analytic account
is only linked to one project.

This commit also changes the name of the analytic account when the
project name changes and the analytic account is linked to only one
project.

task-2638359
closes #76166

X-original-commit: de9fbbd4228a35c4fecef8be42477416cfcbdd8d
2021-09-14 21:24:59 +02:00
Thibault Libioulle 9ed5f1e64d [IMP] project: sort updates by date
With this commit, project updates are sorted depending on their date
rather than the create date.

task-2638359
closes #76166

X-original-commit: b65edac046bb7fea649474d2282e0afa2d6f5703
2021-09-14 21:24:59 +02:00
Thibault Libioulle bf6f91eab9 [IMP] project: add dependent tasks stat button
This commit adds a stat button representing the number of dependent
tasks, the current task is blocking.

This is the inverse relation of "Blocked by".

task-2638359
closes #76166

X-original-commit: d841e4a7e25fd56c49c0cd3b51994a7fda4cbc8b
2021-09-14 21:24:58 +02:00
Xavier BOL (xbo) 2fa26c4fd8 [FIX] sale_timesheet: not filter project template based pricing type
Before this commit, in the product, the user can select one of
billable projects with `allow_timesheets=True` and `pricing_type='task_rate'`
but the pricing type is not useful now, since we don't have anymore the
`bill_type` and `pricing_type` fields visible. Now the pricing_type is
computed based on the SOL and employee mappings on the project.

This commit removes the pricing type in the domain for
`project_template_id` field in product model. So, now the user can
select a project billable with `allow_timesheets=True`.

task-2638359
closes #76166

X-original-commit: ac32f966672c2e3f29f639e441781a5bc6c396e0
2021-09-14 21:24:58 +02:00
Xavier BOL (xbo) 1ba83ad0ee [IMP] sale_timesheet: hide 'Invoicing' tab in project when no partner
Before this commit, when the partner is not defined in the project, we
show the 'Invoicing' tab only when the project is billable
(allow_billable=True) and the user could select an SOL and we
automatically set the project customer to the one in the SOL.

This commit directly hides the 'Invoicing' tab in the project form view
when no customer is defined or the project is not billable.
Now, if the project is billable, then the user will have to define the
customer to have this tab.

task-2638359
closes #76166

X-original-commit: ca40b7d804aef2dfa8eb1aad183979a7219b4270
2021-09-14 21:24:58 +02:00
Xavier BOL (xbo) 0302a262c8 [IMP] project: rename the See more button into Edit project in kanban
Before this commit, we rename the 'Edit' button into 'See more' but we
prefer to directly edit the project when we click on this button
So, it is to have 'Edit' as name and directly enter in the form view of
the project in edit mode.

This commit renames the button into 'Edit'.

task-2638359
closes #76166

X-original-commit: e960b2966bdd16f369df9fbd8e4cf372c37bd37a
2021-09-14 21:24:57 +02:00
Sébastien Theys 6d948bdb47 [IMP] mail: clean up code of RTC join/leave
Part of task-2366708

closes odoo/odoo#76528

X-original-commit: 9a05dfe06d9d5706d0e45ad14d6ef8902d6b276e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-14 17:53:43 +00:00
Samuel Degueldre ac4965e104 [FIX] mail: fix traceback in commands with body, commands don't linger
Commands that were expecting a body were not receiving one, and sending
a command would not clear the text input. This commit fixes that.

task-2645395

closes odoo/odoo#76516

X-original-commit: 3274452e41c2c3c097cea3cf24da68fc67b97eb5
Related: odoo/enterprise#20865
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-14 17:53:39 +00:00
Samuel Degueldre 55692897c5 [IMP] mail: improve message layout, reduce empty space
task-2646144

closes odoo/odoo#76518

X-original-commit: 1969b0890317aaa7452bd1e54570a22fae4991c2
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-14 16:41:01 +00:00
Benoit Socias 9e20e7d9c0 [FIX] website: avoid displaying the link popover when opening user menu
Before this commit toggling the user menu did display the link popover.

After this commit no link popover is displayed when clicking on the user
menu (or any other dropdown menu) anymore.

task-2612755

closes odoo/odoo#76511

X-original-commit: ffaa406884bd5a897a0f76e993c915691ab850ba
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-14 16:40:56 +00:00
desdelinux 884ad2444c [IMP] l10n_pe: class 60 accounts should be of type expense
[IMP] l10n_pe: class 60 accounts should be of type expense

[IMP] l10n_pe: class 60 accounts should be of type expense

closes odoo/odoo#75489

X-original-commit: 0ecf9062397c16dbb987ee53774f5d41f850e503
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-09-14 16:40:53 +00:00
Joseph Caburnay ed9d19678b [FIX] point_of_sale: the warning is not presentable at initial creation of payment method
When creating a payment method, the warning about the journal is
immediately shown and it's not really useful since in the point of
view of a user, the options provided when selecting a journal are
already of type 'bank' or 'cash'. So there is really no need of
explicitly showing the warning.

However, if the journal is programatically changed to a journal that
is neither 'bank' nor 'cash', there should still be a way to warn the
user about it. So, we don't completely remove the warning, but put it
in the tooltip.

closes odoo/odoo#76494

X-original-commit: ea99ec3752fa8d4409c7239752db9b8286c5172c
Related: odoo/enterprise#20849
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-14 15:10:36 +00:00
Bruno Boi 3cd7ffdc6b [FIX] web: falsy group names in list view
When a group has a falsy value (e.g. if grouped by an integer field having a "0" group), make sure to display its proper name instead of "Undefined".
Off course, boolean fields are still showing "false" name if it is the case.

This issue was introduced with 3dd1c0f

closes odoo/odoo#76493

X-original-commit: 4e213f0b93f59cf377271b18eae9765ff9cfbe4f
Related: odoo/enterprise#20847
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2021-09-14 15:10:15 +00:00
Bruno BoiandMohammed Shekha 6957a614d2 [IMP] web: test coverage for many2many grouping
Add testing coverage for m2m grouping feature introduced by cbc9f3c

Linked PR: odoo/odoo#74985

task-2633123

X-original-commit: a6296f8952b27c597d017332e865d5ca1bd0adac
Part-of: odoo/odoo#76493
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-09-14 15:10:14 +00:00
William Henrotin 02770cae97 [FIX] mrp: don't merge move with same components
Component move with same product are not merge at confirmation as it
could be multiple different production steps.

opw-2583848

closes odoo/odoo#76401

X-original-commit: 390fce62462962e9a0131a082317e2e60e34041a
Related: odoo/enterprise#20801
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-14 15:10:08 +00:00
Mathieu Duckerts-Antoine 477462d024 [FIX] web: favorite domain is a string
Since the refactoring of the search model https://github.com/odoo/odoo/commit/aeb8e49972f871b0c9b07c507987ee77cf5e8abd,
the new favorite items were created with a domain with the wrong type:
Array instead of string. Thus it was impossible to share the search
state with a legacy view when a new favorite was created. We now set
correctly the domain key of a favorite.

closes odoo/odoo#76368

X-original-commit: 2db799d53ad8e765ac864e27e5734046e0491ea9
Related: odoo/enterprise#20778
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2021-09-14 15:09:58 +00:00
Patrick Hoste 6088a1eb01 [FIX] website: fix get_dynamic_filter controller method
PURPOSE

Before this commit when the method returned an empty string, the calling
method _fetchData couldn't processed map() on the result.
After this commit the result will be an empty array thus the map method
won't fail.

LINKS

Task-2489680
PR : odoo/odoo#

closes odoo/odoo#76497

X-original-commit: ef813860b7582e9f1a92debb40d6dcda5519e607
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-14 13:32:33 +00:00
Kevin Baptiste 4cc7211b8d [FIX] hr_holidays: accrual levels should be copied
The accrual levels were not copied when an Accrual Plan was duplicated.

closes odoo/odoo#76495

Taskid: 2639094
X-original-commit: bc62cc4033b6f065b09bf34b253eef3c4a3f289e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-14 13:32:28 +00:00
Nathan Marotte (nama) 77d6dff466 [FIX] website_slides : iframe code block appearing when pdfviewer loaded
Issue: When viewing a pdf in a website_slide, in certain conditions (
odoo detect the slide is externally embedded), a <iframe> code block
is displayed on the pdf rendering it really hard to read. As a work
around, one could click on the "<\> Embed" button to make it disapear

Steps to reproduce :
 1) Run a local odoo server with the website_slides module
 2) Set up a ngrox tunneling service to your localhost and good port
 3) Find or create a **document** slide and get its id (<slide_id>)
 4) Access the slide via the website url on the slide
 5) Go down the page in the Share tab and copy the iframe
  -Replace http by https in the src attribute of the iframe if necessary
 6) go back to the dashboard, open the inspector and add the iframe in
 the body of the webpage
 -> The slide is correctly detected as non embed
 7) Access your Odoo database with the ngrox https forward (example :
 https://0dfc-2a02-a03f-6b9b-b300-bd6c-8048-90f1-3f25.eu.ngrok.io)
 8) Repeat step 3 to 6 included
 -> The slide is detected as embed, so a <iframe> text area appears
 and make the pdf hard to read

Alternative steps to reproduce :
 1) Run a local odoo server with the website_slides module
 2) Go to the usual http://localhost:8069/ to access your database and
 navigate to a PDF slide in eLearning
 3) Change the localhost in the URL to 127.0.0.1 (Example
 http://localhost:8069/slides/slide/gardening-the-know-how-1 becomes
 http://127.0.0.1:8069/slides/slide/gardening-the-know-how-1) and press
 Enter to go to the new URL
 4) Change back the 127.0.0.1 to localhost and press Enter to go to the
 new URL
 5) You might have to repeat the back and forth between the two domains
 -> The slide is detected as embed, so a <iframe> text area appears
 and make the pdf hard to read

Why is that a bug:
 It makes the PDF unreadable unless we know that we must click on that
 button, it really shouldn't be like that

opw-2499110

closes odoo/odoo#76487

X-original-commit: cda27bc5535e0bb2a5191d89abf556d8c72025bd
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
2021-09-14 13:32:21 +00:00
Martin Trigaux e8fd353cfa [IMP] auth_totp: add test
Original commit was adding the feature in stable but was replaced by
2dee29a7dc in 15.0

This is the forward port of 4736344a57e176 keeping only the test

closes odoo/odoo#76476

X-original-commit: f707d5887c168604b7b7571ae4adc47d64b4a55a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-14 13:32:14 +00:00
Antoine Guenet 86e624f5a0 [FIX] website: prevent animations from restarting on a blank page
Commit [1] introduced `_onEditionWasStopped` which besides declaring the
edit mode as disabled, also restarted animations. Since the new editor
was introduced, this is triggered on save and cancel, which is indeed
needed in order to declare that edit mode is disabled, but also
generates a traceback due to the animations now restarting on an already
destroyed wysiwyg. That restarting of animations is unnecessary anyway
since the page will refresh when disabling the edit mode.

[1]: https://github.com/odoo/odoo/commit/f296992317e96562c66bd7ad59a5080d6c551ed5

task-2528814

closes odoo/odoo#76450

X-original-commit: 7aea27968b1d51fc3ca2645a4e4d21258466d5ee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-14 13:32:10 +00:00
Lucas Perais (lpe) ced5b4568d [FIX] web: View component support banner_route
The View component supports banner_route, fetches the HTML and passes
on the prop "bannerHTML" to the concrete component class.

The feature has been a little forgotten in 0134495ba5.
This commit just revives it.

closes odoo/odoo#76370

X-original-commit: 99d1da58392a66dea1187ef4f00e41e924382d61
Related: odoo/enterprise#20779
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-09-14 13:31:59 +00:00