Commit Graph
146687 Commits
Author SHA1 Message Date
Thibault Delavallée ad445aaff1 [FIX] website_event: correctly cleanup when removing event website menu
Currently if event website menu main checkbox is unchecked the related website
menu is removed. Its children are also removed through the cascade attribute on
parent_id field.

However this is done in SQL, meaning some overrides on unlink of website.menu
is not called. This does not properly cascade unlink views linked to website
menus through the specific "website.event.menu" model. This leads to some
views staying alive in DB. This causes issues with web editor when calling
``_views_get`` as he may receive several views linked to a given view_id (key)
while it expects only one.

We fix that behavior by removing the menu and its children explicitly. This
calls various overrides done in website_event.

Task-2616588

X-original-commit: 9722baee83adea9808de1247c300e226cf6fc537
Part-of: odoo/odoo#80391
2021-11-25 13:28:51 +00:00
Mitul Shah c11f25996a [FIX] website_event: fix event sub-menus display in mobile
Currently in the mobile view, all the event sub-menus are showing horizontally
which looks ugly and hard for selection. This horizontal display is ok for
big screens, not for mobile.

This commit changes the direction of the events sub-menu from horizontal to
vertical when being in mobile. It also sets the left margin to fix the
flicker effect in the mobile view.

Task-2616588

X-original-commit: 2cb67c6be51af61fbdbe6f069e6a32839d7a682a
Part-of: odoo/odoo#80391
2021-11-25 13:28:51 +00:00
Botakely 17497787fd [CLA] Samuel RAMAROSELY
closes odoo/odoo#80393

X-original-commit: 1e39c9e09bbae5cfdf2db72723ab7675cab71c30
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-25 12:41:16 +00:00
wmmmg 7ed56da6c8 [CLA] wael algommaly
closes odoo/odoo#80392

X-original-commit: 352d95cab8f0c9ead28f6754ce1cad7540b3e5c5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-25 12:41:13 +00:00
Patrick Hoste 2625132dd7 [IMP] crm: add default language when creating partner in crm lead
PURPOSE

After this commit when creating a partner the language will default
to the crm lead value.

LINKS

Task-2580065

Pr: odoo/odoo#76812
Related: odoo/enterprise#20689
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-25 11:38:39 +00:00
Patrick Hoste a531a7d7e0 [IMP] mail: add lang default value for suggested reciptient
PURPOSE

Before this commit, when a partner was created through the
suggested recipient tool the langage wasn't considered...
The email was thus sent in the wrong langage most of the time
After this commit, the suggested recipient tool had the
langage correctly if present in the record.

LINKS

Task-2580065
PR : odoo/odoo#76812
2021-11-25 11:38:39 +00:00
Martin Trigaux a0548c65b5 [FIX] mail_group: avoid "Re: False" reply
If the subject is not set, the wizard set the subject as "Re: False"

closes odoo/odoo#80372

X-original-commit: 169775419e0f14723c19ff5f14e0907c179721d9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-25 10:51:45 +00:00
Lucas Perais (lpe) 5df6a6efd7 [FIX] web: list_editable in FieldOne2Many: onSuccess at the right time
When changing a value for a o2m (list) within a form, the _setValue
returned a Promise that did not take into account the real rendering of
the list renderer.

The use case at hand is:
- enable product configurator
- have a product with options
- add that product in a SO
- add the option as well through the product configurator
- confirm the configurator

The configurator triggers an add_record event, with an onSuccess callback

Before this commit, the onSuccess callback was called too early, when the previous
rendering operations were not finished yet.

After this commit, the onSuccess is executed when the list renderer is really ready

opw-2580044

closes odoo/odoo#79591

X-original-commit: 8def0d103020aed4211fd22f2b917567fb06de1e
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-11-25 10:51:42 +00:00
Paolo (pgi) c6c41f359e [FIX] l10n_fr_fec: Cleanup spaces in FEC export
The fields of the FEC export must be sanitized.
All tabs, carriage returns and newlines must be excised.

Ticket link: https://www.odoo.com/web#id=2672261&model=project.task

opw-2672261

closes odoo/odoo#80366

X-original-commit: 5869376a95ea2d500bda687ec944354171988a79
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2021-11-25 09:14:13 +00:00
qsm-odoo 870c439737 [FIX] website: properly mark carousel test tour as a test tour
Commit [1] and its forward-ports introduced a test tour (properly added
in assets_tests) but was not declared as a test one. Meaning that if you
were in debug=tests, you were able to follow a strange tour not meant
for user testing.

[1]: https://github.com/odoo/odoo/commit/3c194faa930b0d3a537ca8b893b2c0442b5464e7

closes odoo/odoo#80362

X-original-commit: 732addec9452813a404823f28703d54d37a6b87f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-25 09:14:09 +00:00
Lucas Perais (lpe) c0f68e9037 [FIX] web: webclient: navbar: consistently adapt menu items
The use case happens in studio.
have some overflowing app submenus in an app
go into studio

refresh with a simple F5.

Before this commit, the navbar's overflowing buttons wouldn't put themselves inside the "more" dropdown
This was because the studio client action also reacts to change in the menu service, so the technical flow was:
- laodState (webClient)
- setMenu (MENU-CHANGED on the bus), then because of it:
  - studio client action > render (1)
  - studio navbar > render (with adapt right after that render!) (2)
  - studio navbar > render (because of 1) which cancels the render in 2 without cancelling the promise, that is
  adapt is still called.

To remedy this, the standard use of useEffect and useBus are is put into place.

After this commit, the studio navbar has its overflowing menu items in the dropdown.
The adapt algorithm now uses getBoundingClientRect to get the not rounded width of elements that should be adapted,
otherwise, slight differences in browser's computation and rounding of offsetWidth may influence test results.

closes odoo/odoo#80353

X-original-commit: 231902738287a897f50a1711f991bc55928b77d9
Related: odoo/enterprise#22498
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-11-25 09:14:02 +00:00
Lucas Perais (lpe) 2991b53511 [FIX] web: webclient: navbar: resize ignored when navbar is detroyed
X-original-commit: 7fbbdefc0e4951959c5000c471d50a01481392a8
Part-of: odoo/odoo#80353
2021-11-25 09:14:01 +00:00
Lucas Perais (lpe) c1c5509508 [FIX] web: core: hooks: onDestroyed
Introduce the onDestroyed hook which makes a callback executable
whenever the component is destroyed.

X-original-commit: 0f454392b39dcbc7e297e882117452c5adc342be
Part-of: odoo/odoo#80353
2021-11-25 09:14:01 +00:00
Lucas Perais (lpe) f8920c8078 [FIX] web: webclient, action_adapters: change tab title whenever a push state occurs
From a list view with multiple records, go on a record of that list
Click on the pager next button

Before this commit, the browser tab's title was not updated to the second records.

After this commit, it is.

closes odoo/odoo#80346

X-original-commit: 3d27b739a3e8243d50e9764000727b31727dc2d2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-11-25 09:13:54 +00:00
jbw bc772f4784 [IMP] account: track lock dates changes
Allow log date changes tracking by adding chatter on company and tracking lock date fields.

closes odoo/odoo#78730

Task: 2651834
Related: odoo/enterprise#22479
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-25 09:13:47 +00:00
Philippe Wauthy b6ef46f71c [IMP] hr_holidays: show conflicting time off in validation error message
Description of the issue/feature this PR addresses:
In hr_holidays, there is no information about the conflicting time off when a second time off is scheduled at the same time.
There is a validation error saying "You can not set 2 time off that overlaps on the same day for the same employee".
The validation error should display the conflicting time off

Current behavior before PR:
The validation error displays the following:
"You can not set 2 time off that overlaps on the same day for the same employee"

Desired behavior after PR is merged:
The validation error will display the following:
"You can not set 2 time off that overlaps on the same day for the same employee.
Existing time off: Mitchell Admin / Trip with Family : 24.00 hours / from 06/09/2021 to 08/09/2021 / To Approve"

task-2641682

closes odoo/odoo#76452

Related: odoo/enterprise#22490
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-25 08:29:21 +00:00
william-andre dc88be7019 [REF] l10n_*: use xml hierarchic fields for tax report data
closes odoo/odoo#76675

Related: odoo/enterprise#21464
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-11-25 00:31:17 +00:00
wan caa0ac2bdc [IMP] account: allow declaration of tax report without report_id
The `report_id` is redundant and can be computed from the parent.

Part-of: odoo/odoo#76675
2021-11-25 00:31:17 +00:00
wan 2b80f3e5f1 [IMP] core: allow nested declaration of xml for one2many fields
Some data are formatted as a tree structure with a relation of parent.
We are adding meaning to the structure:

* This improves readability and allows to fold/unfold records in
  editors.
* This could be done before using `eval`, but this allows to have an
  xml_id for those records. It also allows to update the records without
  having to rewrite on the parent x2many field.

Part-of: odoo/odoo#76675
2021-11-25 00:31:16 +00:00
Arthur Detroux (ard) dc50a79203 [FIX] website_sale: add names to some blocks
Before this commit, website shop had some blocks without names
which could make it hard for a user to understand to which block was
an option related.

This commit adds names to these blocks.

task-2670809

closes odoo/odoo#78889

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-24 19:21:41 +00:00
Benoit Socias eab9931c11 [FIX] website: manually cascade delete from page to menu
Before this commit when a website page was deleted, its related website
menu was deleted inside the database only through the ondelete="cascade"
of the Many2one relationship. This however did not perform the menu
cleanup on the ORM side.
This caused problems when the related menu id was kept in cache by
website's _get_menu_ids(), because the record could not be fetched
anymore. E.g. deleting a website-specific version of the "Contact Us"
page caused the problem, making the menu bar non renderable on all
pages.

After this commit the caches are cleared when a page is unlinked to
avoid this problem.

task-2686221

closes odoo/odoo#80348

X-original-commit: dd9997753d442f8923b31c3ceaa0cd29b09a06b2
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-24 18:38:06 +00:00
xO-Tx e16b5a590a [FIX] web_tour: fix tip position on text content
After the update in [1], the tip is centered on text content
instead of text container to prevent asymmetry caused by text
alignment.

The goal of this commit is to prevent tours from failing when
the target node is empty[2] by centering the tip on text content
only when the target "hasChildNodes".

[1]: https://github.com/odoo/odoo/commit/ea3b1ec9a0984560f8fce5b5a04f6f24347f97c4
[2]: e.g. After #66844 : The blog will have title as <h1> tag
which is empty by default > which makes 'blog' tour fail.

task-2454130

closes odoo/odoo#80343

X-original-commit: 574ffa2a9f6ece51e446fefa4bc5f4b5acb4340a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-24 18:38:02 +00:00
Alexandre Kühn 0c10101c2e [IMP] mail, *: use component ref instead of component el
*: snailmail, website_livechat

In preparation of using OWL v2 in discuss code

Task-2694242

closes odoo/odoo#80094

Related: odoo/enterprise#22394
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-24 18:37:54 +00:00
Ipsita Borisagar af3f384ab8 [IMP] mail: improvements for chat
Purpose

In discuss, improve chat UI so that it will be easier to read when a voice/video
call is started.

Specification

- Reduce paddings above and below message box.
- Put a white background for the massage box instead of light gray.

Task-2591180

closes odoo/odoo#74312

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-24 17:45:47 +00:00
Touati Djamel (otd) 0b3ad35ae4 [FIX] purchase_product_matrix: fix warning message on product variants
Steps to reproduce the bug:
- install `”purchase_product_matrix”`
- Go to the purchase settings and enable “Warnings” option
- Create a product with variants
- Add purchase warning
- Create a PO and add the product

Problem:
The warning message is not appearing

Solution:
the `”_product_id_change()”` function has no return.
To trigger the warning message, we have to call the `”onchange_product_id_warning”` manually because it is not triggered automatically in the grid case

opw-2696007

closes odoo/odoo#80340

X-original-commit: 26bdebf6fd8b77013ea449a02184e8a843ffe9e9
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-24 16:33:01 +00:00
Hubert Van de Walle (huvw) fd381e99af [FIX] web: quickedit on readonly one2many list
Steps to follow

  - Go to the purchase app
  - Create a RFQ, add a line, confirm it, lock it and save it
  - Click on the one2many line
  -> An editable popup is opened and the main form is also switched in edit mode

Solution

  - Check if the one2many list has a readonly modifier before switching the main
    form to edit mode
  - When opening the one2many preview popup, pass along an editable param

opw-2689420

closes odoo/odoo#80338

X-original-commit: d1c9265659572c738596889f7a5ad53f673e9db4
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-24 16:32:57 +00:00
Tiffany Chang (tic) 481806137c [FIX] mrp: sync operation's work center and bom
Fixes 2 issues:
1 - odoo/odoo#61027 made mrp.routing.workcenter.company_id =
  self.bom_id.company_id. This made it so the work center selection is
  empty until a BoM is selected, which is confusing to users. To make it
  less confusing, we switch the order since we expect users to fill in
  the fields from top to bottom.

2 - odoo/odoo#65628 made it so the BoM can be changed. This made it so
  it's possible to save the record and have the company of the BoM and
  the work center not match. This can lead to a usererror when users try
  to start the WO associated with the operation. Steps to reproduce:

  - create a new operation from Configuration > Operations
  - select a BoM from company 1 and a Work Center from company 1 + save
  - edit and change BoM to a BoM from company 2 and DO NOT change the
    Work Center

  Expected result: save error
  Actual result: Save will be allowed, but WO will throw an usererror
                 when you try to start it.

  To fix this, we prevent the user from saving when the workcenter
  company does not match the BoM's (if both have a company_id assigned).

closes odoo/odoo#80337

Task: 2682365
X-original-commit: f77c9560ad304940610d797018246a8f5d32f721
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-24 15:49:14 +00:00
Goffin Simon 669976db67 [FIX] base: The symbol ANG must be before the amount
REF:https://www.xe.com/currency/ang-dutch-guilder/

opw:2690166-

closes odoo/odoo#80188

X-original-commit: e84af51ffbb550d069288e498e96604cb610443e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-11-24 15:49:11 +00:00
Noe Antoine 4ceda8c137 [IMP] sale_crm: propagate fields on quotation creation from stat button
When using the 'new quotation' button on the opportunity view, the tags of the
opportunity are propagated on the quotation. However, this is not the case when
using the stat button 'quotations' and creating a quotation from there.

This commits adds the tags in context to propagate them in that case as well,
as well as the other fields propagated on the 'new quotation' button:
medium, campaign, user / team if any...

This means both behaviours now have the same context, except for the search
default values.

--- LINKS ---
Task-2679488

closes odoo/odoo#79352

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-24 15:49:06 +00:00
baa c99a5f837e [FIX] l10n_gcc_invoice: changes a div to allow studio editing on the english/arabic invoice
closes odoo/odoo#80332

X-original-commit: c2f6df4eeed8d69867893c69704782b2a2b46b75
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-24 14:53:28 +00:00
Touati Djamel (otd) 2c6fab231c [FIX] sale_product_configurator: stop hiding subsequent dialogs after configuration step
Steps to reproduce the bug:
- install `”sale_product_configurator”`
- Go to the sales settings and enable the “Warnings” option
- Create a product with variants
- Add sale warning
- Create a SO and add the product

Problem:
The warning message is not appearing

Solution:
The product configurator does not need to hide modals after the product is added.
This fix ensures that any modals displayed after adding the product (such as warnings, messages, etc.) are correctly displayed and not hidden.

opw-2696002
opw-2679495

closes odoo/odoo#80331

X-original-commit: e82230fd395fa71081dc94ffefc39b51ad258382
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-24 14:53:24 +00:00
thcl-odoo 3ce63a0041 [FIX] mail: members can be added through channel settings' form view
Current behavior :
When we try to add a member through channel's settings by clicking on "Add a line", a blank line is correctly added but can't be edited.

Steps to reproduce :
- Install Discuss
- Go to channel settings
- Try to add a member by clicking on "Add a line"

Reason :
Since commit 89eef4cdd419cc23cfb8d3e0af7a7115119549c2 , 'partner_id' field as been set to readonly because it doesn't make sense to edit the partner_id of a channel. However, this prevents the possibility of adding a member.
( diff : https://github.com/odoo/odoo/pull/75496/files#diff-d02eca5ffaa6b9765330a905661cd6cb917b92d851b473d459ee011bb2c5be3cR17 ).

OPW-2677329

closes odoo/odoo#80326

X-original-commit: 9536f8ec556670f67939fdee825630e06d5b4808
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-24 14:04:32 +00:00
Julien Van Roy c31f971508 [IMP] account: hide field currency on misc journal
- Hide the field 'currency' on the journal entries (for the miscellaneous journals only) because it is neither necessary functionally nor doing anything technically.
- Accounting journal views: amount in currency is made optional (shown by default)
- Journal entry view: currency is made optional (hidden by default)

closes odoo/odoo#79486

Purpose: lighten the user interface/make it clearer
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-11-24 14:04:28 +00:00
Odoo's Mergebot d5f7f6c21e [MERGE] survey: improve survey views, especially kanban
PURPOSE

When dealing with lot of surveys kanban view is not really optimal and its
state based grouping is not really helpful. Indeed we do not have total of
each coumn and there is not point adding new states, meaning most surveys
hang in the same column. This is not an optimal display.

SPECIFICATIONS

Improve ungrouped display as this is the main usage of surveys. It should
be displayed like a global list view: each card should take the whole
screen (like ``Visitor`` kanban view). Each line contains some "columns"
holding statistics. We notably use a progressbar to display a nice passed
ratio, as well as a many2one avatar widget to make survey enters the era
of amazing wow kanban views.

When grouped, display should be the old one, aka a standard card.

This is done using a small CSS hack: card template actually consists in main
templates related to two displays. Each card style is hidden depending on being
groups or ungrouped. This triggers a class that is used using CSS to hide
irrelevant content.

A ribbon is also added on kanban cards displaying an Archived danger ribbon
when survey is not active anymore. It is therefore coherent with the form
view display that also has a ribbon defined.

An override in website_slides_survey is added to add number of courses using
the survey.

Order is updated so that new surveys are on top. No need to be bloated by
old ongoing surveys when creating new one.

Finally, some labelling is done with answers to be clearer: registered (number
of raw user inputs), completed (finished answers), certified or passed (quiz
with certification activated or not).

Task-2388785

closes odoo/odoo#77227

Related: odoo/upgrade#2862
Related: odoo/enterprise#21194
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2021-11-24 15:04:22 +01:00
Thibault Delavallée d5b688956b [IMP] survey: display a list-kanban when being ungrouped
PURPOSE

When dealing with lot of surveys kanban view is not really optimal and its
state based grouping is not really helpful. Indeed we do not have total of
each coumn and there is not point adding new states, meaning most surveys
hang in the same column. This is not an optimal display.

SPECIFICATIONS

Improve ungrouped display as this is the main usage of surveys. It should
be displayed like a global list view: each card should take the whole
screen (like ``Visitor`` kanban view). Each line contains some "columns"
holding statistics. We notably use a progressbar to display a nice passed
ratio, as well as a many2one avatar widget to make survey enters the era
of amazing wow kanban views.

When grouped, display should be the old one, aka a standard card.

This is done using a small CSS hack: card template actually consists in main
templates related to two displays. Each card style is hidden depending on being
groups or ungrouped. This triggers a class that is used using CSS to hide
irrelevant content.

A ribbon is also added on kanban cards displaying an Archived danger ribbon
when survey is not active anymore. It is therefore coherent with the form
view display that also has a ribbon defined.

An override in website_slides_survey is added to add number of courses using
the survey.

Order is updated so that new surveys are on top. No need to be bloated by
old ongoing surveys when creating new one.

Finally, some labelling is done with answers to be clearer: registered (number
of raw user inputs), completed (finished answers), certified or passed (quiz
with certification activated or not).

Task-2388785

Part-of: odoo/odoo#77227
2021-11-24 14:04:20 +00:00
Thibault Delavallée f13857bf74 [IMP] survey: update views naming
As we are about to refactor survey views, especially kanban, let us rename
some views xml IDs. Especially they have few overrides so quick to do.

Task-2388785

Part-of: odoo/odoo#77227
2021-11-24 14:04:20 +00:00
Thibault Delavallée 937e5e181a [IMP] mail: allow to display responsible name in avatar widget
Currently mail override of avatar user widget strips user name in
kanban view. Real reason is quite obscure, see odoo/odoo@59641325c7

In this commit we add an option to display both the avatar and the name.
Sometimes you want to display an avatar and a name to have a nice display
especially when focus is more on the displayed user / partner than on
chat capabilities.

Task-2388785

Part-of: odoo/odoo#77227
2021-11-24 14:04:20 +00:00
Michael (mcm) 8f3c693b7d [FIX] web: fix calendar popover opening
Before this commit, the opening of a calendar popover could crash
because we tried to evaluate the domain of the readonly modifier.
Only the invisible modifier is necessary in the calendar popover so
this commit fixes the issue by evaluating only the invisible modifier.
It was also evaluated twice to do both the same thing so this commit
remove the duplicated lines.

closes odoo/odoo#80318

X-original-commit: c558ae309ff63a26c30ea0196930eb15a279e1dc
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-24 13:17:14 +00:00
Michael (mcm) 4649d9c0a2 [FIX] web: fix readonly patch._super
Since https://github.com/odoo/odoo/pull/79858,
we define the patch._super with an `Object.defineProperty`.
It works well but it prevents objects from being patched
by the legacy patch method afterwards.

closes odoo/odoo#80317

X-original-commit: 2090e09c51876b9b8af4097ca8f093a8c19361e0
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-24 13:17:10 +00:00
Paul Morelle 6223ac2130 [FIX] sale_project: prevent unacceptable project form loading time
Previous implementation was generating an unoptimised query which
lead to unacceptable loading time on large databases.

task-2697814

closes odoo/odoo#80316

X-original-commit: fa1578abea4ebe887d4e23a81bb1011ed986cc0c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-24 13:17:05 +00:00
Lois Rilo 7e3f429911 [IMP] stock: add hook to control lot creation on incoming shipments
closes odoo/odoo#80314

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-24 13:17:01 +00:00
Alexandre Kühn 89218e7e82 [IMP] mail: use t-component with component as value
Was done with https://github.com/odoo/odoo/pull/80084
But then https://github.com/odoo/odoo/pull/79259 reintroduced
`t-component` with string.

In preparation for using OWL v2 in Discuss code.

Task-2694217

closes odoo/odoo#80307

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-24 13:16:56 +00:00
Fabio Barbero 43fc87ecc4 [IMP] mass_mailing: improve mailing form view
Purpose
=======

Improve UI of mass_mailing module to give the user a clearer view of the
mailings they send, enabling A/B test by default since it is not invasive.

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

Remove border and padding around the chatter in mass mailing form view.
Add sum and average in mailing list view for KPIs
Change sort order from sent_date to calendar_date
Move user_id in form view
Set group_mass_mailing_campaign to True by default

Task-2679537

closes odoo/odoo#79213

Related: odoo/enterprise#22202
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-24 13:16:52 +00:00
Aurélien Warnon 4a329da6a0 [IMP] website_slides: improve quiz error management
This commit slightly improves the quiz error management when building a quiz
directly on the website or when answering to the quiz.

When there is a validation or submission error, instead of displaying a toaster
very far from the user focus, we add the error next to the button he just
clicked.

For the question validation, this requires a small trick in the controller,
where we catch the ValidationError to return the message to the JavaScript.

Task-2678061

closes odoo/odoo#79081

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-24 13:16:45 +00:00
Benjamin Vray db27973180 [IMP] website, website_livechat: redesign and improve livechat button
After this commit:

- The livechat button is redesigned as a floating icon in website.
- The "colliding" check between buttons and bottom fixed elements is no
longer done only on the buttons but also on the <a> elements.
- When the livechat button hides a button/link, it is moved up rather
than made invisible.

task-2614762

closes odoo/odoo#78891

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-24 13:16:40 +00:00
Adrien Widart f0a835a404 [FIX] sale_stock: let public users open the DO
From the portal view of a SO, when a public/portal user tries to open
the delivery order, he will have an error

To reproduce the issue:
(Need sale_management. Use demo data)
1. Create & Confirm a SO:
    - Customer: Joel Willis
    - Add some products
2. Log in as portal (i.e., Joel Willis)
3. Open the SO
4. Open the Delivery Order

Error: It leads to a 403 error page.

When rendering the template, the `sudo` flag is forced to False. Since,
in this case, this is a public controller that uses a token, we can use
`SUPERUSER_ID` (see [1] for more details)

[1] 61b4b6777d64218f94c51ec839c187fdc7b2034f

OPW-2689053

closes odoo/odoo#80308

X-original-commit: cb098f6348ddc85edfef06c284c74c8af44ca7ba
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-24 12:31:21 +00:00
Elisabeth Dickinson 8a01be5d62 [IMP] base: redesign company image
Align style of company_image.png with avatar_grey.png to keep interface
and usage coherent.

Task-2487489
Task-2688887

closes odoo/odoo#80304

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-24 12:31:17 +00:00
Thibault Delavallée 7c95dd9506 [IMP] sales_team, crm: add chatter on team member view to display trackings
Currently no chatter is added on team member form views. Indeed this model is
mainly technical and accessed through a dedicated menu in configuration.

However some fields are tracked and being able to see tracking information is
important in day to day dealing of team members. This is why we add chatter
on team members form view.

We also add context key to avoid autofollow when creating team members. As
chatter is mainly present for tracking and information no need to add extra
followers automatically. This causes unnecessary notifications.

Task-2679897

closes odoo/odoo#79356

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-24 10:18:24 +00:00
Odoo's Mergebot de8af73f9a [MERGE][REF] website_slides: rework the slide.embed feature
PURPOSE

Make the slide.embed feature more reliable and more visible.

REASON

Currently, we use the same URL to embed slide content within the e-learning
module and when the end-user wants to embed that content on an external
website.

However, we want to know whether the slide is embedded externally or not to
show different controls and update some statistics.
The code previously relied on the presence of the "referer" header to achieve
that detection, if the referer URL comes from a domain that is not this Odoo
website -> then it's embedded externally.

The issue with that strategy is that it's not very reliable, indeed some modern
browsers now completely avoid passing the referer header (mostly for security
and privacy reasons).

SPECS

- Introduce an external embed URL to ease external embed logic
- Improve various sharing controls when slide is embedded externally
- Globally improve the slide.embed feature and give it more visibility

See underlying commits for more details.

LINKS

Task-2654009

closes odoo/odoo#77736

Related: odoo/upgrade#3059
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-24 11:18:19 +01:00
Aurélien Warnon 043b3385d2 [IMP] website_slides: improve slide.embed feature
Currently, the slide.embed statistics only work if a 'Referer' header is passed
in the request object.

The issue with that strategy is that it's not very reliable, indeed some modern
browsers now completely avoid passing the referer header (mostly for security
and privacy reasons).

This commit refactors the slide.embed feature to work even without a referer
header.
When the header is missing, the incremented count will be stored under a
common slide.embed record with a url field = False.

This count is still useful because the end-user will want to know if the slide
is popular externally, even if we don't know on which website it has been
embedded exactly.

In addition, we add more visibility to the slide.embed feature by introducing
a stat-button on the slide.slide form view, that redirects to the list of
slide.embeds for this slide.

Finally, we also renamed the 'embedcount_ids' field to 'embed_ids' to get a
better / clearer naming.

A few tests about embed detection were added to ensure this behavior.
(Tests are based on the work of Nathan Marotte <nama@odoo.com>).

Task-2654009

Part-of: odoo/odoo#77736
2021-11-24 10:18:17 +00:00