Commit Graph
152817 Commits
Author SHA1 Message Date
Adrien Schoffeniels a84736d610 [IMP] web: slightly change command palette' scss
Purpose:
========
Knowledge's command palette layout is standardized so that its layout
matches the one of the standard command palette. Therefore,
"o_command_left" is not used anymore and its style is removed. 
Fix a small typo: ".test-ellipsis" to ".text-ellipsis".

Task-2710445

Part-of: odoo/odoo#94241
2022-08-05 12:09:54 +02:00
Fabien Pinckaers f981c5f8f0 [IMP] web: FormView: field tooltips UX
- Less Overwhelming: reduces the hover zone to an icon. Tooltip
appearances are less intrusive as you move the mouse in the screen
- More discoverable: show an icon for the fields that have a tooltip
- better UX: max-width on the popup

closes odoo/odoo#97440

Note: commit 3363e55cac reduced help messages to useful ones.
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-05 09:37:16 +02:00
William Braeckman 4f35751bb0 [FIX] hr_holidays: fix accrual level maximum leaves
A test introduced with https://github.com/odoo/odoo/pull/96432
revealed an issue with the level limits for the accrual plans.

The only applied limit was the one of the current level at the end of
the run, however if for whatever reason multiple levels had to be
processed at once (if the database was shut down for a long period of
time for example), the individual levels would not apply any limit logic
to their behaviour which meant that you could have a different behaviour
between running the cron each day and running it after a long period.

This commit aims to fix that issue by applying the said limit.

OPW-2868297

closes odoo/odoo#97540

X-original-commit: 09fa1020f42d641fc0011d482cdd08aea4f4085a
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-05 08:11:45 +02:00
Audric Onockx (auon) bc880f2af0 [FIX] base: address operation context keys in calendar view
Prior this fix, creating an action with (e.g.)
additional_context : {create: 0} wouldn't have any effect
on calendar view.

Now, if this context key is added, the user won't be able to create.
Also true for delete and write.

closes odoo/odoo#97538

X-original-commit: 8d108f32b8333f0698427f9a7f12765c8addd8ae
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-05 04:45:02 +02:00
Hubert Van de Walle (huvw) 92e700fc08 [FIX] web: parseMonetary with NBSP as a thousands separator
Steps to reproduce:

  - Switch odoo language to french
  - Create a client bill for Azure Interior of $1 000 000
  - Confirm it
  - Go to the accounting dashboard
  - On the bank, click on reconcile
  - Select Azure interior
  - Click on the correct bill
  - Switch to Manual operations
  -> $1 000 000 is not a correct monetary field

Cause of the issue:

  Recently in https://github.com/odoo/odoo/pull/94126 , `formatMonetary`
  switched from joining the currency and symbol from `&nbsp;` to a non
  breaking space, NBSP.
  To parse monetary values, the behavior was to split around NBSP to
  get the symbol on one side and the value on the other which is then
  passed to `parseFloat`.

  For the following examples, NBSP is replaced with an underscore.
  So `$_1000` becomes `$, 1000`
  But some languages such as french uses the same char as thousands
  separator.

  In that case, `$_1_000` becomes `$, 1, 000` and then the parse fails.

opw-2937403

closes odoo/odoo#97513

X-original-commit: 9d36722797669498dfd1ad4659e5f29347ba30f3
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-08-05 04:44:56 +02:00
Arthur Detroux (ard) 6d185fd085 [FIX] website: fix dynamic snippet render issues
Prior to this commit, if an user chose to fetch 16 elements, the snippet
would bug out and display 16 elements per row.

Steps to reproduce:
- Install website_sale
- Drop a product snippet
- Select 16 fetched elements
- Layout is broken

Some legacy code introduced in [1] could result in an infinite loading
animation locking the editor out. This commit removes the code as a
fix made at [2] makes it unneeded.

Steps to reproduce:
- Install website_sale
- Enable debug mode
- Drop a "Dynamic Snippet Carousel"
- Click on the Dynamic Snippet for edit
- Sometimes the editor hangs and the page needs to be refreshed

[1]: https://github.com/odoo/odoo/commit/3c0d98bcd8adf9325ee3497eb8d25ec7f904d6a5
[2]: https://github.com/odoo/odoo/commit/ac8d83cc124a6175a263e11795fda35eebe69324

Related to task-2677203

closes odoo/odoo#97502

X-original-commit: 5ef31db8599d5dbe7ed07c88ac1c703bd7287345
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-05 04:44:51 +02:00
Benoit Socias dcd1ee109b [FIX] website: not record header animation in editor history
Before this commit when the header scroll effect was happening, the
related DOM updates were recorded in the editor's history.

This commit deactivates the history during the updates of the header.

Steps to reproduce:
- Drop a "Text" block in the page.
- Drop 4 "Banner" blocks below the "Text" block to make the page
scrollable.
- Save.
- Edit page.
- DO NOT SCROLL until the last step.
- Select the Text block.
- Delete the Text block.
- Click undo => Text block reappears as expected.
- Click redo => Text block disappears as expected.
- Click undo.
- Scroll down until header vanishes and reappears.
=> Redo step is lost, undo tries to undo the header animation.

task-2930568

closes odoo/odoo#97488

X-original-commit: c710f73f84ce798b8363b7f8904f96b9eacd56dc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-08-05 03:38:26 +02:00
Rémy Voet (ryv) e96666ccd4 [IMP] base: add the reason of skipped test in log
When test are skipped, we don't have any information of why.
It seems important to log also the reason, it can help
developers to find the source of issues (example: when your chrome
doesn't the devtools active: you just know that test is skipped, but
don't know why)

closes odoo/odoo#97481

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-05 03:38:23 +02:00
Xavier BOL (xbo) 650d0679c0 [FIX] web: fix autofocus when input type is 'number'
Before this commit, when the autofocus is used on an input with
`type="number", the `selectionEnd` is not available because the input
element's type ('number') does not support selection.

This commit checks the input type is not a number:
- if it is the case then the selection is used to place the cursor at
  the end of the input content,
- otherwise the selection properties are not used and the input is
  simply focused.

closes odoo/odoo#97466

X-original-commit: 38a5de7b2962a47c29b23f12f2ea7599bdea11fd
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-05 03:38:20 +02:00
rd-manatec 22c4e926ae [CLA] manaTec signs Odoo CLA
closes odoo/odoo#97460

X-original-commit: e40fc33340b0477d5b9e1e5dcf09f83b66af3514
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-05 03:38:17 +02:00
Kartik Chavda 7517bf46d4 [FIX] sale_,(project): set default analytic account and analytic tags in task
Currently, the project's analytic account and analytic tags are not set by
default in the task. Now it will be fixed.

 Steps to reproduce:
    1. Install project
    2. Activate the analytic account and analytic tags in the user setting
    3. Create a project with analytic account and analytic tags
    4. Create a task from the kanban view
    5. Check the analytic account and analytic tags in the task

 Steps to reproduce:
    1. Install sale_project
    2. Activate the analytic account and analytic tags in the user setting
    3. Create a project with analytic account and analytic tags
    4. Create a product (Create on Order = task)
    5. Create a sale order and confirm
    6. Check the analytic account and analytic tags in the task

task-2930761

closes odoo/odoo#97455

X-original-commit: 0a5bc153cf682b29b1c86ac966d8164bd41acbdb
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-05 03:38:14 +02:00
Eteil Djoumatchoua (etdj) 4dc5d76c8d [FIX] website_sale: Some translation bugs
Issue: When using other languages, some expressions aren't translated.

Solution: Add the untranslated words in the .pot file of the module website_sale, which will
be translated later in transifex or directly in customer database.

opw-2938969

closes odoo/odoo#97454

X-original-commit: 56a3adf46b5b361c304075da7ceccb5d915befb0
Signed-off-by: Eteil Djoumatchoua (etdj) <etdj@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-05 03:38:11 +02:00
Rohitkumar (roku) a819d6a597 [IMP] sale_(project),hr_timesheet: improve generic UX for project
Purpose of this commit to improve generic usage of project app.

So in this commit done following changes:
 - when deleting a project, delete all of its tasks in the process instead of
   raising an error
 - make the list view editable bottom
 - add a 'view task' button to open the task form view
 - the 'download' and 'print' buttons should be centred
 - rename 'planned hours' into 'allocated hours' (or 'allocated days' if the
   timesheet encoding unit is in days)
 - when a project is linked to an SO manually, he should appear in the
   'projects' stat button of the SO; same goes for tasks
 - remove the 'profitability' setting
 - display the SOL and the quantity in red as well if the milestone hasn't been
   reached yet for update right side panel
 - add a project field for quickcreate in kanban view
 - 'fa-check-square-o x/y' in muted on the project kanban cards

task-2838372

closes odoo/odoo#92262

Related: odoo/enterprise#27758
Related: odoo/upgrade#3561
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-05 03:38:02 +02:00
pedrambiria 5db33bfa43 [FIX] point_of_sale,pos_sale: load the missing partners
Before this commit: if the "Limited Partners Loading" were enabled, the
partner wouldn't set when using the "Quotation/Order" functionality
for unsynced partners.

Steps to reproduce the issue on the runbot:

	Enable developer mode.
	Go to the Point of Sale.
	Open the config of any pos.
	Enable "Limited Partners Loading" and set "Number of Partners
    Loaded" to a low number (like 5 or 10)
	Disable "Load all remaining partners in the background."
	Open a new PoS session for the configured PoS
	Use the "Quotation/Order" functionality.
	Select any order, for example, S00043.

	The customer is not set for the current pos order.

Solution

	The solution is to load the partner.

Also, there was an issue when using the limited number of partner loading
when it tried to load the cached and paid orders' partners. I added a function
to load missing partners.

opw-2883686

closes odoo/odoo#97442

X-original-commit: 4d7c05346e0c253c8b11736b9ee9f8426a87f2af
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-08-05 01:41:50 +02:00
FrancoisGe ed237addb1 [FIX] web: ListView click on sortable column header
Before this commit, in a list view with a record being edited, if you
click on the header of a column sortable and press a key then a
crash is displayed.

Solution:
We will unselect the record when we click on a column header
(sortable or not). It will be impossible to focus the header of a column
when a record is in edit mode. Either the record is in readonly mode,
or it is invalid and the invalid field is focused.

How to reproduce:
- Go to a list view
- Switch a record to edit mode
- Click on the header of an sortable column
- Press a key (for example "a")

Before:
    Crash is displayed, the record is still in edition and the header
    of the column is focused.

After:
    When you click on the header, the record switches to readonly mode
    and the header of the column is not focused.

closes odoo/odoo#97433

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-05 00:29:47 +02:00
Lucas Perais 9b81ddb993 [FIX] web: settings form view: save on click on an action button
On the res.config.settings form view, click on button that will do an action
e.g. defined as some flavor of `<button type="object" name="myMethod" />`

Before this commit, this did not work as we never fully created the res.config.settings record in python
hence, when executing myMethod on the model res.config.settings, the ID was unset, pointing to no record.

After this commit, we "create" in python the transient res.config.settings record before doing anything.

closes odoo/odoo#97428

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 20:11:03 +02:00
Romain Derie 1ac43fab05 [IMP] website: fix python linter errors
Just a nice to have. It will prevent those errors to be replicated when
copy pasted and will help reading the files in the IDE.

closes odoo/odoo#97282

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-04 20:11:00 +02:00
Dardenne Florent (dafl) 13e9388c87 [FIX] web: restore specialData when discarding
Changed specialData (as in statusbar) were not discarded when clicking "Discard".
Now, when a form is Discarded, the specialData is restored.

Example: In project.task form view, there is a statusbar in which the domain depends on the project_id.
Edit a task, remove the project and the statusbar is updated. When discarding, the statusbar
is not restored to his initial state. Now it is restored to his initial state.

task_id: 2811530

closes odoo/odoo#97164

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 20:10:57 +02:00
Michael (mcm) 1bbdeb1456 [FIX] mass_mailing: fix form view styles
Since the merge of the new form view, the styles of the
form view in mass_mailing was completely messed up.
This commit fixes the styles of this view.

closes odoo/odoo#96949

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 20:10:54 +02:00
Pablo Montenegro 25687147cb [IMP] l10n_ar: group by on IIBB-Sales report
The report "IIBB-Sales by jurisdiction" group invoice subtotal amounts by partner address instead of the delivery address set on customers invoices. This PR changes that behavior and group amounts by delivery address.

closes odoo/odoo#96938

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-04 18:35:35 +02:00
Lucas Perais 6c155e1713 [FIX] web: relationalModel: basic keys supported in record context
Have an editable list view, displaying a many2many tags field. The m2m field
has a context, mentioning `active_id`. (`context="{'default_field': active_id}"`)

"basic context keys" is to be understood as the usual suspects: active_id, active_ids, current_company_id, active_model

Type something in the m2m input, and selet create and edit, in order to create a new record in a dialog form view.

Before this commit, there was a crash because active_id was not present in the evaluation context.

After this commit, the new record opens in its form view, with the right value for the field that must have a default.

closes odoo/odoo#96910

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-04 18:35:32 +02:00
Michael (mcm) b3bc5a0a03 [FIX] web: less bounce edit form button
Before this commit, the edit button in form view bounced on any click.
Now, the button bounces only when clicking in the area of a field or its label.

closes odoo/odoo#96784

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 18:35:29 +02:00
Rohitkumar (roku) 2720bc2034 [IMP] sale_(project),hr_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project app.

So in this commit done following changes:
 - add the following filters for project.update search view
 - display 'due mm/dd/yyyy' in red if the deadline is in the
   past and the milestone hasn't been reached yet for milestone section
 - add an 'x Milestones' stat button that should open a list view of all of
   the Milestones that are linked to an SOL of this SO for sale.order form view
 - add an 'unread messages' filter with separated from other filter
 - rename 'create' into 'create project for project wizard
 - change to "Create projects to organise your tasks. Define a different workflow
   for each project." for project.project action helper

task-2864875

closes odoo/odoo#94936

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-04 18:35:23 +02:00
Kartik Chavda 873dd773c0 [IMP] project: set default analytic account and analytic tags in task
Currently, the project's analytic account and analytic tags are not set by
default in the task.

Technical-
- In this task, we have added a demo of analytic tags in the project.
- The default_get() method does not call when the demo data is loaded, so
  the analytic account and analytic tags are not set. So we called
  default_get() from _load_records_create().

task-2861376

closes odoo/odoo#94144

Related: odoo/enterprise#28656
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-04 18:35:11 +02:00
Kartik Chavda 02d485779f [IMP] *_: add the analytic tag on projects, tasks, and timesheets in demo data
*_ = project, hr_timesheet

Currently, the analytic tag is not added to the project, task, and timesheet.
In this commit, we have inserted analytic tags in some projects, tasks, and
timesheets. If an analytic tag is inserted in the project, it will be automatically
added to the task and timesheet.

task-2861376

Part-of: odoo/odoo#94144
2022-08-04 18:35:11 +02:00
Kartik Chavda b49e1de862 [IMP] sale_timesheet: add groups on timesheet and timesheet report search views
If the user does not have access to the salesman then the billing type filters will
not appear.

task-2861376

Part-of: odoo/odoo#94144
2022-08-04 18:35:11 +02:00
Kartik Chavda ad1b64ab02 [IMP] hr_timesheet: set favorite project in timesheet
If the last five timesheets belong to the same project then that project is considered a
favorite project.
Currently, this feature is only in the timesheet's grid. Now done in all view.

task-2861376

Part-of: odoo/odoo#94144
2022-08-04 18:35:11 +02:00
Pierre-Yves Dufays 29bf004bc1 [IMP] website_event{|track|exhibitor}: improve UI of event app
Improve UI of event app.

Detailed changes:

1) change the wording of the selection item "sponsor" of
event_sponsor.exhibitor_type from "sponsor" to "Footer Logo Only"
2) event name placeholder changed to (quote added):
e.g. "Conference for Architects"
3) in the track page and exhibitor page, if the description is empty:
- for external user: hide the empty description zone for external user
- for internal user: display an alert (info) inviting the user to complete it
with a link that triggers the edit mode.
3 bis) in the track page and exhibitor page, the page and the menu aside
are glued to the top. Add some space there.
4) display unpublished tag on the side menu for unpublished tracks

Some other changes:
- When some content are empty, there were some awkward horizontal lines
separating nothing, we have decided to remove them
- Fix track layout and improve mobile layout

Task-2692907

closes odoo/odoo#83488

Related: odoo/enterprise#23798
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-08-04 15:15:48 +02:00
luvi 9c4590f6fb [IMP] web: improve ImageField style
This commit improves the style of the image widget
to use more approriate icons for edition/deletion.
Before this commit, a rectangle was covering the
entire image to highlight those buttons. Now, only
those are visible and highlighted on desktop when
hovered, while being always visible on mobile.

This will improve the visibility of this field
with views being always-edit.

task #2860958

closes odoo/odoo#97208

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 13:54:24 +02:00
stefanorigano (SRI) 6b41d20815 [ADD] web, *: transition-x utility classes
Define classes for some default bootstrap transitions + 'none'.
These values are generic enough to fit different circumstances.

Classes added:
- transition-base
- transition-fade
- transition-none

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

closes odoo/odoo#97051

Related: odoo/enterprise#30066
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-04 13:54:15 +02:00
stefanorigano (SRI) d8bbddb9a7 [ADD] web: font-sans-serif utility class
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:15 +02:00
stefanorigano (SRI) b89296c12b [REM] *: drop o_debounce_disabled class in favor of bootstrap defaults
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:15 +02:00
stefanorigano (SRI) 71611ff3c0 [REM] *: drop bg-muted class in favor of bootstrap defaults
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:14 +02:00
stefanorigano (SRI) 56064ff1e4 [REM] *: drop oe_clear class in favor of clearfix bootstrap default
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:14 +02:00
stefanorigano (SRI) 6eeecd19b5 [REM] *: drop custom bg-[color]-light classes
Drop custom `bg-[color]-light` classes in favor of BS's background
color opacity system.
ref: https://getbootstrap.com/docs/5.1/utilities/background/#opacity

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:12 +02:00
stefanorigano (SRI) e377a08417 [IMP] web, *: size and position utility-classes
Improve BS default size and position stack adding classes to fine-tune 
the layout in several circumstances. Classes added:

- 'position-[device]-[position]'
- 'mw-[device]-[size]'
- 'mh-[device]-[size]'
- 'flex-basis-[device]-[size]'
- 'z-index-[0, 1]'
- 'overflow-[x, y]-[overflow type]'
- 'min-w-0'

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:12 +02:00
stefanorigano (SRI) bd2a1110a0 [REM] *: drop o_cursor_default & o_cursor_pointer classes
Drop custom cursor classes in favor of Bootstrap default ones.
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:12 +02:00
stefanorigano (SRI) fe5a3a89fb [IMP] web: opacity-x utility classes
This commits adds the '$o-opacity-disabled' value in the opacity
utility class generation list,  allowing to use the 'opacity-disabled'
class to style on the fly elements that don't support disabled states by
default (eg. generic divs)

The commit introduces also a new '.opacity-trigger-hover' class.
It can be applied on parent elements in order to trigger their children
opacity states. Eg:

   <div class="opacity-trigger-hover">
       <span>Always visible</span>

       <span class="opacity-0 opacity-100-hover">
           Visible when parent is :hover
       </span>
   </div>

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

Part-of: odoo/odoo#97051
2022-08-04 13:54:11 +02:00
Aaron Bohy a8e84d33c9 [FIX] web: debug: don't highlight legacy fields in legacy views
In debug mode, we highlight legacy fields with a red background
and legacy views with a red top border. Legacy views only use
legacy widgets. There's no point highlighting legacy fields inside
legacy views.

Note that these highlightings won't be in v16, their purpose is to
ease the identification of legacy/wowl fields/views during the
conversion phase.

closes odoo/odoo#97415

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-04 11:45:42 +02:00
Aaron Bohy 2ca93bd1ec [FIX] mail: correctly display activity dropdown in list
Before this commit, the dropdown of the activity widget wasn't
visible when the widget was used in a legacy list view, because of
the `overflow: hidden` rule on the cell.

Part-of: odoo/odoo#97415
2022-08-04 11:45:42 +02:00
Aaron Bohy b48148a702 [REF] web: tests: remove QUnit.skipWOWL
This function helped us managing the transition from the legacy
/web codebase to owl, and we don't need it anymore as there's no
test using it.

Part-of: odoo/odoo#97415
2022-08-04 11:45:41 +02:00
Lucas Perais 6260816c56 [FIX] web: legacy form view dialog opened with res_id and view_id
Open a record in a many2one.
Make the form view to take a js_class that is an extend of the legacy form view

Before this commit, the resId of the record and the view id were not transmitted to the legacy form view dialog.

After this commit, they are.

closes odoo/odoo#97385

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-08-04 11:45:35 +02:00
qsm-odoo 29613c6ec4 [FIX] web_editor: fix the look of the indent symbol in the editor panel
As a stable fix, to not touch XML templates and break existing
translations, the ⌙ character was automatically replaced by └ which
makes more sense for the usecase and should work properly in all
browsers. The ⌙ character is actually rendered mirrored on Windows 11
Chrome (and others) as the font used for those unicode characters is
left to the browser. We could force a font of our own but it's probably
not worth it.

A better solution with a SVG or CSS solution has to be done in master.
That would unify the look of the symbol across all browsers and
also prevent special characters to be placed in translations.

With this forward-port commit, we'll start first by using └ via a CSS
rule. Three new classes have been created: o_we_sublevel_1,
o_we_sublevel_2 and o_we_sublevel_3. Adding any of them on a widget
automatically adds the └ character. Then choosing 1, 2 or 3 controls
the indentation, which was previously controlled by placing the &emsp;
HTML entity directly inside strings.

This commit also takes the opportunity to fix some of those level
indentations (sometimes 2 was used instead of 1 or 1 was used instead of
2, etc) and also review some related labels.

closes odoo/odoo#97361

X-original-commit: e5d45643598671077ade7e41f0dbfe2b502665b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-04 11:45:31 +02:00
FrancoisGe 054c2f21df [FIX] web: FormView with OuterGroup empty
Before this commit, if a form view has a group containing only invisible
elements and at least one invisible group, then the view crashes.

Example:
    <form>
        <sheet>
            <group>
                <group invisible="1">
                    <field name="foo"/>
                </group>
            </group>
        </sheet>
    </form>

The solution is to have an empty list as the default props for the
OuterGroup slots. OuterGroup is a group containing at least one other group.

closes odoo/odoo#97295

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-04 11:45:28 +02:00
FrancoisGe 9569438643 [FIX] web: filter_domain with an integer value
Before this commit, an error was returned when opening a view if the
view's searchArch contained a field with a filter_domain and the view's
context contained an integer "search_default_" for that field.

Example:
<search>
    <field name="m2o" filter_domain="[('m2o', 'child_of', raw_value)]"/>
</search>

context: {
    search_default_m2o: 1,
}

Part-of: odoo/odoo#97295
2022-08-04 11:45:28 +02:00
FrancoisGe 7759025310 [FIX] web: ViewButton not display error dialogs
When a ViewButton is clicked and the action fails, you would expect to
see an error dialog explaining the failure.

For example:
- go to a form view
- click on a state button which should open another view
- the new view has an issue when rendered

Result before:
    We stay on the form view and nothing happens

Result after:
    We stay on the form view and an error dialog is displayed.

Part-of: odoo/odoo#97295
2022-08-04 11:45:27 +02:00
Xavier Morel bb543d75a9 [FIX] web_editor: breaking _onBeforeUnload when canceling edition
After updating mass_mailing_snippets_menu_tabs to cancel the
template's edition at the end of the tour, the editor starts blowing
up during cleanup with:

```
Trying to set result to failed (UncaughtTypeError: Cannot read properties of null (reading 'anchorNode')
    at Sanitize._parse (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1453:105)
    at Sanitize.parse (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1450:6)
    at new Sanitize (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1448:6)
    at sanitize (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1460:53)
    at OdooEditor.cleanForSave (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:1372:37)
    at Class.getValue (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:2547:1121)
    at Class.isDirty (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:2547:407)
    at
    _onBeforeUnload (/web/assets/363-d1667a2/web_editor.assets_wysiwyg.min.js:2509:560)
```

After consultation with the relevant team, there are edition contexts
where it's perfectly valid to have no "live" selection for one reason
or an other, so this should be fixed.

Ideally the field should also properly be discarded such that the
event listener is removed and the callback is never called at all,
however the legacy client has no such hook at the field level (the
controller seems to be the lowest).

closes odoo/odoo#96517

Related: odoo/documentation#2550
Related: odoo/enterprise#29824
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-04 09:14:11 +02:00
Xavier Morel bcb3e35754 [FIX] test_main_flows: properly terminate tours
- the community version would finish with a wizard opened in edition
  mode, add a "real" final step of waiting for the wizard to finish
  processing (the invoice to be marked as paid)
- the enterprise version would finish on the reconciliation widget,
  which is always an edition-mode form, check that the reconciliation
  succeeded and (as in the accounting tour) return to the accounting
  dashboard afterwards

Part-of: odoo/odoo#96517
2022-08-04 09:14:11 +02:00
Xavier Morel 67f36e8b2f [FIX] *: properly finish a bunch of form editions
Cancel or properly wait for save to finish, depending on tour.

Part-of: odoo/odoo#96517
2022-08-04 09:14:10 +02:00
Xavier Morel f552711074 [FIX] test_sale_product_configurators: correctly end a bunch of tours
Part-of: odoo/odoo#96517
2022-08-04 09:14:10 +02:00