Commit Graph
154116 Commits
Author SHA1 Message Date
Arthur Detroux (ard) da007eabdf [FIX] website: do not cache footer based on website_id
Commit [1] introduced t-cache on the footer making it cached depending
on its website id. This is wrong as the footer can be visible or hidden
depending on the page it is currently rendered in.

This commit adapt the t-cache so that the footer is cached based on the
page.

Steps to reproduce:
 - Go in edit mode and click on the footer
 - Turn off "Page Visibility"
 - Save

 Footer is now hidden on every page depending on which page rendered it
 first.

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

closes odoo/odoo#99832

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-13 20:30:10 +02:00
Pierre Paridans 0c4819f8c3 [FIX] web: list selection banner takes the whole width on mobile
On mobile, in list view's selection mode, both the left & right bottom
parts of the ControlPanel are displayed but only the left one
(containing the selection banner and actions menu) should be displayed
(and take the full width).

Also, small alignment adjustments.

closes odoo/odoo#99483

Related: odoo/enterprise#31269
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-13 20:30:01 +02:00
Pierre Paridans 2736d832bd [FIX] web: Layout's display props could be dynamic
Before this commit, if the Layout's `display` props is a dynamic value
coming from the parent Component (ie. a getter on the component that
controls which parts of the ControlPanel should be displayed), this
value isn't applied after the first initialization.

This commit fixes it by extracting the `display` logic applied in the
constructor to a getter (moving from initialization only to once
called).

Part-of: odoo/odoo#99483
2022-09-13 20:30:01 +02:00
Brieuc-brd 8b708cca59 [IMP] mail: CallSettingsMenu: review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2980888

closes odoo/odoo#100032

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-13 18:57:09 +02:00
Dardenne Florent (dafl) 30bcdf1b91 [IMP] web: kanban: add bottom quickCreate button
The purpose of this commit is to add a quick create button at the bottom
of each column in order to facilitate the user when he wants to quickly
create a record.

It was already possible to quick create a record in the kanban view.
To do so, the user needed to click on the quick create button placed
on top of the kanban view, forcing the user to scroll to the top of
the view if he consults records at the bottom.

task-2823605

closes odoo/odoo#98703

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-09-13 16:27:47 +02:00
Jacky (trj) f9750a5b36 [IMP] point_of_sale: pos_bill support for both US and EU
In order to support US and EU at the same time, we're
adding 0.25 as `pos_bill` and removing the 500 one.
Increasing the height of the `MoneyDetailsPopup` to avoid
having a scroll bar while having default data.

closes odoo/odoo#98315

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-09-13 16:27:44 +02:00
Ivàn Todorovich 1425b5e0b4 [FIX] stock: respect the js_class attribute.
Steps to reproduce (technical):

1. Create a custom view from GraphView and register it in `viewRegistry`.
2. Inherit the `stock.stock_report_view_graph` view and set the `js_class` attribute.
3. Go to any stockable product form view and open the Stock forecast from the smart button.

Result:

The `js_class` is completely ignored.

Explaination:

The view is not loaded like any other regular view. It's loaded in a fragment that's
part of the `stock.ReplenishReport`. When doing so, the `js_class` attribute was ignored.

closes odoo/odoo#100072

X-original-commit: 0b10866a0c66bfcd170bfe6887202e05a0089394
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-09-13 15:31:10 +02:00
Romeo Fragomeli 312a50e949 [FIX] website: fix mega-menu layout
In this commit two errors in the rendering of the mega menu are fixed:
* the position of the mega menu when the option `Sub Menus` is `On Hover`
  this bug is due that we show the mega menu manually adding the `show`
  class on the element in our code. However, in the `On Click` mode,
  it's Bootstrap's javascript that handle the show/hide state.
  Bootstrap adds the `show` class and also adds the attribute
  `data-bs-popper="none"` to the element. In `On Hover` mode this
  attribute was missing.

* the render of mega menu in the `+ icon` (`o_extra_menu_items`).
  This error occurs because in Bootstrap 5 the width is set with the
  `width` property and in Boostrap 4 it was `max-width`. In Odoo
  `col-XX-YY` CSS rules are overridden when the mega menu is in the
  `+ icon`, but the `max-width` was not changed by `width` during the
  Bootstrap 5 migration.

closes odoo/odoo#100068

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-13 15:31:00 +02:00
Romain Derie f29607143e [FIX] website: fix nightly standalone theme test
The history of this one is kind of tricky, to say the least.

A fix in the theme install process was done in 14.0 with [1].
It came with a `standalone` test in the `design-themes` with [2].
It had to be a `standalone` test since it is playing with module
operation, which is forbidden in the regular testing suite (sadly).

Since this new test was the first `standalone` test in the
`design-themes` repository, it actually wasn't even properly tested for
months before we realized it. It was missing some runbot configuration
in the nightly build to include the `design-themes` repository in the
standalone testing suite.

Once the runbot configuration was correctly fixed, the test wasn't
working anymore in 15.3 and later version because of some change in the
httpocalypse [3] which made the `MockRequest` not behaving as expected.

Indeed, with [3] the request's context had to be updated through
`update_context` which wasn't adapted/working with `MockRequest`.

Then, since [1] (merged in 14.0) was ported in saas-15.3 at [4] (where
[3] also exists) it was the first time a test using `MockRequest` was
ending up calling business code doing a request's context change.
The business code doing `update_context` and called through the test in
`MockRequest` was then not doing anything and not changing the
`context`. The test was then failing despite the behavior/normal code
base working properly.

This commit makes the request's context change working with
`MockRequest`.

Some people think `MockRequest` should disappear, but right now that's
how it is, we are still using it as this is really useful to be able to
test business code in a frontend context without going through a tour.
For what it's worth, multiple time the community asked us to move it
outside the website module, but also multiple other internal team in
odoo. So, while it might be better or not correct in some cases (mainly
python super), the tool is useful.

[1]: https://github.com/odoo/odoo/commit/b8a24efa71daea1f96465b780f4f0e384ce74703
[2]: https://github.com/odoo/design-themes/commit/4de16d85b7f7d69212576eede82e8a15190d357b
[3]: https://github.com/odoo/odoo/commit/f61aa39ff1190f66cebb8efb8432723214932161
[4]: https://github.com/odoo/odoo/commit/14387f36438b731753e2e7169f54865b123cdcfa

closes odoo/odoo#100070

X-original-commit: 885ce02a15dc093ff98822f80b22c4415fa9cceb
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-13 13:53:49 +02:00
Aaron Bohy 8640f33b36 [FIX] web: FormView: do not switch record if invalid
In a form view, modify a record s.t. a required field is unset,
and then click on the pager to navigate to the next or previous
record. Before this commit, a notification was displayed (because
a required field is unset), but we switched to the other record
anyway.

This commit restores the desired behavior, which is to stay on the
current record to let the user fix it or discard it.

closes odoo/odoo#100050

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-13 13:53:41 +02:00
Aaron Bohy 8f58b1c768 [FIX] web: actionService: do not allow to leave invalid form
From a (e.g.) list view, click on "Create". In the form view, fill
in some fields, but leave a required field empty. Click on the
breadcrumbs to come back to the list. Before this commit, a
notification was displayed (because some required fields are
unset), but we left the form to come back to the list anyway.

The desired behavior is to stay on the form view, and display a
notification indicating that some fields are invalid.

In legacy views, we rejected promises to indicate that we couldn't
leave. This is a pattern we tried not to use anymore in new code.
Instead, we return a promise (if the method is async obviously)
which resolves to a boolean value, indicating if it works or not.
As a consequence, the action service wasn't properly dealing with
new views, as the promises they return always resolve.

This commit fixes the issue by adapting the code in the action
service.

Part-of: odoo/odoo#100050
2022-09-13 13:53:41 +02:00
Aaron Bohy 69a72aa4e1 [FIX] web: Many2ManyField: use correct title in dialog
Before this commit, the title of the SelectCreateDialog opened
when clicking on "Add a line" in a Many2ManyField was always
"Select Records" (the default value), whereas in this case, we
want to see "Add: something", where `something` is the `string`
attribute of the field (which can be overriden by an attrs on the
field node in the arch). This commit restores the desired behavior.

closes odoo/odoo#100046

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-13 13:53:36 +02:00
tsm-odoo 03e47dd6ff [FIX] bus: fix interface error on server stop
When stopping the server, all cursors are closed. The issue is that
the ImDispatch thread is kept alive until the main thread exits.

This can lead to errors during server stop: the ImDispatch thread
could try to poll an already closed connection thus raising a
`psycopg2.InterfaceError` exception.

This commit solves the issue by hiding the interface error when
it occurs during server stop.

closes odoo/odoo#100002

X-original-commit: 83777078f1be093c218267c8282e8c11f4fb4e8d
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-09-13 13:53:33 +02:00
Aaron Bohy c313c25ff1 [FIX] web: x2many: send field context to x2many dialogs
Have a x2ManyField displayed as a (non-editable) list view, and
with a context defined on the x2m field node in the arch. Before
this commit, this context wasn't propagated to the dialog opened,
for instance, when adding a new record. It is now the case.

To make the tests pass, we also needed to make a slight change in
the BasicModel, as it didn't correctly process the context when
adding a new record with additional contexts (e.g. in x2many list
views with custom `<creates>`.

closes odoo/odoo#100000

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-13 13:53:30 +02:00
FrancoisGe 194dbc8a0d [IMP] web: export graph helper clickOnDataset
closes odoo/odoo#100030

Related: odoo/enterprise#31191
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-09-13 13:53:24 +02:00
William Braeckman e2ba23ea17 [IMP] mail: Migrate many2many_tags_email widget to Owl
closes odoo/odoo#99230

Related: odoo/enterprise#31254
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-13 13:53:08 +02:00
Nicolas (vin) 77f3953e1a [IMP] account,l10n_*: cleanup reports menu items.
Following reportalypse, reorder the menu items in order to bring
some consistency to the report menu.
Also clean the menu items by removing all the menu items no longer
used since most reports are now selectable by going  on the generic
reports and then switching to localized ones.

Task id #2965755

closes odoo/odoo#99210

Related: odoo/enterprise#30854
Related: odoo/upgrade#3831
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-13 13:53:04 +02:00
Ahmed Khalaf (ahkh) af4bc31267 [IMP] sale, stock: add sendcloud setting
SendCloud added in settings as a third party shipping connector

closes odoo/odoo#92610

Task: 2797613
Related: odoo/enterprise#27920
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-13 13:52:52 +02:00
Nicolas Bayet 8aca2e4a94 [FIX] web_editor: prevent reset the editor on blur
When the editor blur, the odoo editor gets reset but shouldn't. One of
the side effect is to loose the history.

task-2981508

closes odoo/odoo#100051

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-13 11:31:33 +02:00
Luis Torres 3b5baa2e34 [FIX] account_edi_ubl_cii/l10n_it_edi: call to super fixed
The `test_mode` flag was removed in 22e04c6d56

closes odoo/odoo#100042

X-original-commit: b0e960bbe142f6d00b444f78fe11e63b83cecb29
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-13 11:31:30 +02:00
luvi e63c2adca0 [FIX] web: fix style of CopyClipboard fields
This commit improves and fixes the styles used by
CopyClipboard[...] fields. Before this commit, the
char type was not truncated when the text was too
long, and the Copy button appeared centered but not
stretched to the edges of the container. Now, a grid
layout replaces the flex layout, which bring a more
consistent UI.

Text: the text is not cropped but goes to next line
Char/URL: the text is cropped to fit in the space

closes odoo/odoo#99991

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-13 11:31:27 +02:00
Antoine Guenet 2c4521cee5 [ADD] web_editor: show user avatars in collaborative edition
This adds a feature that displays the avatars of the users editing a
document collaboratively, in front of the block they are editing.

task-2947368

closes odoo/odoo#99842

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-13 11:31:20 +02:00
Julien Mougenot 55f30554ea [FIX] web: Kanban columns are created at correct position
Before this commit, quick creating a column in a kanban view would not
necessarily put it at the right index.

Now, after creating a new kanban column, the columns are immediatly
resequenced to have a consistent order.

closes odoo/odoo#99347

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-13 11:31:17 +02:00
Rémi Rahir 19295506fd [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/fd4cd7cf [FIX] style: use cell computed style to compute the text width
https://github.com/odoo/o-spreadsheet/commit/d0f02506 [IMP] link: do not display hover in dashboard mode
https://github.com/odoo/o-spreadsheet/commit/adc180a9 [IMP] InteractiveTests: Moved sort interactive tests to ui helper tests
https://github.com/odoo/o-spreadsheet/commit/e2f1f436 [IMP] menu_items_actions: default chart title
https://github.com/odoo/o-spreadsheet/commit/f19fdbfa [FIX] composer: ctrl clears topbar composer selection
https://github.com/odoo/o-spreadsheet/commit/c4ec1d78 [IMP] selection: dont select chart when it's updated
https://github.com/odoo/o-spreadsheet/commit/14b899ab [FIX] CF: Fix preview test for single color cf
https://github.com/odoo/o-spreadsheet/commit/5de0414b [FIX] charts: duplicating a sheet preserves figure dimensions
https://github.com/odoo/o-spreadsheet/commit/fe2e93f0 [FIX] scorecard: use evaluated format for baseline value

closes odoo/odoo#100049

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-13 10:30:26 +02:00
Antoine Guenet e22b681bac [FIX] web_editor: check selection in editable in contenteditable true
The function that checks if the current selection is in an editable
area only checked if it was in a descendant of the editor's editable
element, failing to account for sub-zones that might be set to
`contenteditable=false`.

task-2962912

closes odoo/odoo#100040

X-original-commit: b16609c9d0107d09df9ffac158a3a540b42547d8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-13 10:30:23 +02:00
Sébastien Geelen (sge) 992acd25e2 [FIX] web_editor,website: top menu edition
Ensure all the `#top_menu` links are unremovable.
This prevent the editor to merge two `<a>` elements together
during delete commands.

task-2967314

closes odoo/odoo#99966

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-13 10:30:20 +02:00
Yolann Sabaux 04a352ea76 [FIX] purchase: update analytic account on change of the line
Steps to reproduce:
- create two products
- create two analytic accounts
- create two new analytic rules by assigning an account to a product
- Create a new PO and select on of the product
- On the same line, change the product to the other one

Issue:
- The analytic account won't be updated

Cause:
Bypass of the `account_analytic_id` whenever there is already on defined

Solution:
For the `Sale` fix, I added the `line.state == 'draft'`.
The reason? Because the compute is triggered after confirmation of the order due to:
https://github.com/odoo/odoo/blob/14.0/addons/sale/models/sale.py#L931-L935
Therefore, the compute won't also be triggered after confirmation of the SO.

opw-2948950

closes odoo/odoo#99858

X-original-commit: 61604e18128c1cfd0e6d4e510852f780491d6e4e
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-13 10:30:17 +02:00
Rob Coekaerts 3c6060b7bb [FIX] hr_contract_salary: Fix email in simulation link.
Change the default recipient of the simulation link to be the employee's
work email address, instead of the private email address.

Currently the private email of employees is used for this but this doesn't
work because mail.compose.message does not allow allow private partners
to be configured as recipients. Secondly, it also just makes sense to send
work-related email to the work email address.

In addition, since a partner is automatically created when sending an
email to this work email address (which is currently a string field, a new
field is created to keep track of this partner, in addition to other
partners that might be linked to employee.

task-2790044

closes odoo/odoo#95655

Related: odoo/enterprise#27808
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-13 10:30:07 +02:00
William Henrotin 2a3ff43ff1 [ADD] mrp_workorder_hr_account: analytic accounting for employee in MRP
Create analytic accounting entries for employee times logs on workorder.
Compute BoM costs based on employee hourly cost and employee number
required on mrp operations.

closes odoo/odoo#91565

Task: 2427466
Related: odoo/enterprise#23032
Related: odoo/upgrade#3556
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-13 10:30:00 +02:00
Arnold Moyaux d2158f8789 [IMP] mrp: clean productivity timer + hook button start
Part-of: odoo/odoo#91565
2022-09-13 10:30:00 +02:00
William Henrotin 2c65e916fc [IMP] mrp: workorders redesign
This patch is part of a complete rework of the workorder tablet view and general
work order processing experience. It's mainly done in the Enterprise
repo. In community: the changes are the follows:

 - The workorder kanban view remodeled
 - Prepare workorder productivity timer to work with employee

Task: 2427466
Part-of: odoo/odoo#91565
2022-09-13 10:30:00 +02:00
Damien Bouvy 1f8e265e43 [IMP] hr_expense: allow default for the company journal
Revision 26a5653f48 introduced
the possibility to set up a default journal for accounting
entries created by "employee-paid" expenses

This commit adds the same possibility for the "company-paid"
expenses (because why allow it for one and not the other?).

closes odoo/odoo#99993

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-13 09:31:30 +02:00
Eleftherios Kritsotakis ff7637f189 [REM] website_slides: legacy field_float_rating widget
We remove the `field_float_rating` widget in this commit
as is was not used anymore. Its use was dropped at an
earlier PR, however without deleting it.

For reference, we mention here the PRs in which the widget
was firstly introduced and when in was made redundant.
- introduced: #33255
- removed: #55698

closes odoo/odoo#99983

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-13 09:31:26 +02:00
Arnaud Baes 84d17e57e8 [FIX] website_slides: Ensure viewed_slides is a set
Since 5b375d6 `viewed_slides` are now
stored in a set. This is causing issues post migrations because people
still had the list format in their sessions, and this results in a crash
when `.add()` is called on the list.

While deleting the sessions would likely solve the issues, this fix will
spare some troubles for people migrating in the future.

via p/feedback

closes odoo/odoo#99954

Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-13 09:31:23 +02:00
Kevin Baptiste 7a8b88edaf [IMP] hr_recruitment: properly show job creation dialog
The job creation wizard was not properly displayed.

task-2968897

closes odoo/odoo#99802

Related: odoo/enterprise#31151
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-13 09:31:17 +02:00
Xavier BOL (xbo) 347f66bc22 [FIX] project: redirect /my/task/<task_id>
Before this commit, the commit [1] renames the routes to keep the url
and add the id when the user selects a task id.
However, the redirection is missing for `/my/task/<task_id>` due to
an issue in the routes selected for the redirection.

This commit redirects the `/my/task/<task_id>` to `/my/tasks/<task_id>`
to keep the old route accessible.

[1] b517fdc19d

closes odoo/odoo#99713

X-original-commit: db379b6838b8883ae8fef2659912854dd08cf31c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-13 09:31:14 +02:00
Viktors Lipskis (vili) bbf3dedb7a [FIX] mail: fix activity Mark as Done panels
Clicking on kanban activity Mark as Done button now works as expected, either displaying one empty panel or displaying no panels at all.
Before this commit, repeating a click on the button did not reset the panel, so the next click added another form to the panel.
Also, clicking on the button left other panels open.

task-2961943

closes odoo/odoo#98832

Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-09-13 09:31:11 +02:00
Aaron Bohy f42110cbcd [FIX] account: settings view: set invisible on correct node
Before this commit, the title of the container "Fiscal Localization"
was always displayed, even though it has an invisible modifier. The
reason is that the container was never hidden (it always contained
at least an empty div), because the corresponding modifier was set
on a child in the container (its unique child). This commit fixes
the issue by moving the modifier to the container itself. Note
that it also prevents from having an empty div in the DOM.

closes odoo/odoo#100031

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-13 08:34:58 +02:00
Audric Onockx (auon) 0cc8e582ca [IMP] website_slides: create hook to update slides values
With the integration slides-knowledge,
slides can be set on the team, so that the user can be redirected
to them when searching for help.
We want to use the same view as for all slides,
but limit the records presented to the user.

With this commit, we create two distinct methods:
one that prepares the values
one that renders them.
This way, we can hook into the first one to replace the records
before rendering them, when the `/helpdesk/<team_id>/slides`
route is used.

task-2890043

closes odoo/odoo#97739

Related: odoo/enterprise#29283
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-13 07:37:56 +02:00
Audric Onockx (auon) 927ec413c5 [IMP] web: allow Record override
With this fix, it will be possible to override Record.

Part-of: odoo/odoo#97739
2022-09-13 07:37:56 +02:00
Benjamin Vray 3036c7dc47 [IMP] website, *: review mobile view layout
*: web_editor, website_blog

This commit improves the mobile preview of websites. A mobile phone
image has been added around the iframe during the mobile preview. This
image was already used for the themes mobile preview, this is why the
css code has been unified to be used in these 2 mobile previews.
Parallel to this commit, we have modified the websites displayed in the
iframe of the preview of the themes so that the scrollbar of these is
visible (before it was hidden behind the image of the phone) but with a
smaller width in mobile mode.

This commit also improves the button to switch to mobile preview by
coloring it green when mobile preview is active.

task-2890050

closes odoo/odoo#98061

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-12 21:07:16 +02:00
Denis Ledoux 26b1c3846d [IMP] base: move TestViews assert methods to ViewCase
The goal is to easily re-use these 3 common methods
for unit tests in module implementing new type of views,
such as `web_cohort`

closes odoo/odoo#100021

Related: odoo/enterprise#31239
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-09-12 20:03:18 +02:00
Samuel Degueldre 01aaca36b7 [FIX] web: log source of QUnit test failures in info instead of error
This allows easier parsing of the logs for indeterministic errors, so
that when the same error happens in different build, it has the same
error message, as the stack trace contains the file name of the assets
which get generated with a different hash every time, while also
preserving the existence of potentially useful tracebacks to debug
indeterministic issues.

closes odoo/odoo#100028

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-09-12 17:33:48 +02:00
qsm-odoo accb4b3245 [IMP] website, *: review website tour utils
*: test_website, website_blog, website_crm, website_event,
   website_forum, website_hr_recruitment, website_mass_mailing,
   website_sale, website_sale_wishlist, website_slides

- Make sure that all website tours reaching the website preview before
  their first step use the related website util to register their tour.

- Rename the website util to register a tour starting on the website
  preview from `registerEditionTour` to `registerWebsitePreviewTour`.
  Having a method using "Edition" in its name and having a boolean
  parameter named `edition` was a bit... strange.

- For both non edit mode and edit mode as a first step, ensure the util
  sets a high timeout for the first step. Indeed loading both the
  backend and the frontend (in the iframe) and potentially starting the
  edit mode can take a long time in automatic tests. We'll try and
  decrease the need for this high timeout of course.

- Review the implementation of those utils to be more consistent and
  also fix one or two mistakes in them.

closes odoo/odoo#100024

Related: odoo/design-themes#588
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-12 17:33:39 +02:00
Aaron Bohy 91e242e1c7 [FIX] web: kanban grouped by date: display None if not set
Before this commit, `false` was displayed as column title in kanban
views grouped by date(time) fields, for the column containing
records with unset value. When grouped by relational and date(time)
fields, we expect `None` to be displayed. This commit restores the
legacy behavior.

closes odoo/odoo#100020

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-12 17:33:35 +02:00
Victor Feyens 2307773338 [FIX] sale: correct display for credit warning
closes odoo/odoo#100019

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-12 17:33:32 +02:00
Aaron Bohy 1fb3882cd4 [FIX] web: kanban: display no content helper
The no content helper logic (determining when it is displayed) in
kanban is quite complicated. Apparently, in a kanban view grouped
on a field that isn't a many2one, with no groups (and thus no
records), and where we don't have the "group_create" permission,
we want the no content helper to be displayed. At least, this is
how it used to work in the legacy kanban view. This commit restores
the previous behavior and encodes this situation in a test. In the
future, it would probably be a good idea to sit down and challenge
the corner cases of this feature.

closes odoo/odoo#99914

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 17:33:26 +02:00
William Braeckman 44cfa03587 [IMP] mrp: migrate mrp_documents_kanban to wowl2
This views has multiple custom features such as file upload, attachment
viewer and download.
A lot of files have been rendered obsolete and have been deleted,
notably `file_upload_mixin` which has been replaced by the
file_upload service and hooks.

closes odoo/odoo#99769

Related: odoo/enterprise#31145
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-09-12 17:33:14 +02:00
Younn Olivier 78c59afd13 [FIX] website, *: fix the website custom systray and menus in mobile
*: website_event, website_links

This commit fixes the navbar on the enterprise mobile mode. With the
enterprise modules, in mobile mode, the navbar menus are removed and
displayed in an an additional systray item, the BurgerMenu.

This behavior was not adapted to the website systray and contextual
custom menus, introduced in [1].

For the website systray, some elements are hidden in mobile:
- the "edit" and "translate" buttons,
- the mobile preview,
- the "+ new" new content button,

The logic for displaying the contextual custom menus is moved from the
navbar patch to a service, so that we can define a patch for the
BurgerMenu that uses that logic and has the same behavior as the
navbar.
For now, the "Menu Editor" and the "HTML/CSS Editor" menus are hidden in
mobile.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#99605

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-12 17:33:11 +02:00
Younn Olivier a8361c8fcd [MOV] website, *: move navbar patch to website custom menus service
*: website_event, website_links

This commit moves the current navbar patch, defined with [1], to a
service. This service will be implemented in the next commit and used by
both the navbar and the burger menu patches.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

Part-of: odoo/odoo#99605
2022-09-12 17:33:11 +02:00