Commit Graph
154332 Commits
Author SHA1 Message Date
William Braeckman f5edde3624 [FIX] website_sale: fix missing file in assets_editor
Due to the new way of handling qweb assets, one file was missing from
the editor bundle, throwing a traceback when clicking on a product in
the product grid.

closes odoo/odoo#100477

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-19 11:29:14 +02:00
William Braeckman 24fbcf2266 [FIX] hr_org_chart: fix label in res_users form view
The colspan attribute was missing for the form view making it look like
there was a label for the org chart widget, which should not be there.

closes odoo/odoo#100469

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-09-19 11:29:11 +02:00
Lucas Lefèvre 6edfddb5b8 [ADD] spreadsheet_dashboard_stock_account: add stock dashboard
closes odoo/odoo#100467

Related: odoo/enterprise#31457
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-19 11:29:09 +02:00
Lucas Lefèvre 56c75093b1 [ADD] spreadsheet_dashboard_purchase: add Vendors dashboards
Part-of: odoo/odoo#100467
2022-09-19 11:29:09 +02:00
Florian Damhaut 6c0d0cedc7 [FIX] sale: change name to display_name
small change forgotten in c1b41bcd08

closes odoo/odoo#100401

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-19 11:29:02 +02:00
Julien Van Roy f535de2c28 [FIX] base: rendering PDF should save ir.attachment
Printing an invoice no longer saved the ir.attachment on the
move.
This is due to the refactor in ffc525419a,
since the render methods are now `api.model`, `self.attachment` was always
Falsy. To get the attachment name of a report, we need to call
`self._get_report(report_ref)`.

closes odoo/odoo#100363

Signed-off-by: Laurent Smet <las@odoo.com>
2022-09-19 11:28:59 +02:00
William Braeckman 42237c0ddc [IMP] crm: migrate CRM to wowl2
Migrate `crm_form`, `crm_kanban` and all `forecast_` views.

closes odoo/odoo#98837

Related: odoo/upgrade#3895
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-09-19 11:28:51 +02:00
William Braeckman c0e2c64967 [FIX] web_tour: fix drag_and_drop_native in kanban views
Due to how drag and drop works in grouped kanban views now, no event is
triggered when dragging and dropping, this fix listens to mousedown in
order to define whether the element is going to be dragged.

Part-of: odoo/odoo#98837
2022-09-19 11:28:50 +02:00
William Braeckman 51333adefe [IMP] web: extract progress bar parsing code
The progress bar parsing code was inside a big block of code making it
impossible to override to add custom behaviour.
It is not in a separated function.

Part-of: odoo/odoo#98837
2022-09-19 11:28:50 +02:00
William Braeckman 51a3d0e19f [IMP] web: make it possible to prefix KanbanAnimatedNumber
Use the `prefix` slot to give a prefix to KanbanAnimatedNumber, making
it possible to add text while not needing to extend the class/template.

Part-of: odoo/odoo#98837
2022-09-19 11:28:50 +02:00
William Braeckman 01d18acb34 [FIX] loyalty: fix position of generate coupons button
The generate coupon button would appear after the export button prior
 to this commit.

closes odoo/odoo#100463

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-19 10:30:11 +02:00
Katherine Zaoral 0558986464 [FIX] l10n_ar: demo data mixing taxes
Supplier invoice demo data was badly initialized with sales taxes. This
was given problems in some VAT reports. Fixed and they are all purchase taxes

Document type "Despacho de Importación" xml id demo_despacho_1

closes odoo/odoo#100327

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-09-19 10:29:59 +02:00
Raphael Collet 0bec85dcab [FIX] core: remove confused log message about existing index
When a module extends model 'base', the database schemas of all models are
checked, including indexes.  And a log message appears for "unexpected index
mail_message_subtype_id_index on table mail_message_subtype".  The index indeed
exists, but not for the table mentioned in the message.  The ORM actually makes
a confusion between:
 - the index mail_message_subtype_id_index for subtype_id on table mail_message
 - the index mail_message_subtype_id_index for id on table mail_message_subtype

The fix consists in logging the message about the unexpected index only if the
index is on the expected table.

closes odoo/odoo#100297

X-original-commit: fe8d0024897208e876f097564d50e6795df2c1d3
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-09-19 10:29:56 +02:00
Walid HANNICHE (waha) e22925d59e [FIX] account: fix resquence with empty journal name
Steps to reproduce:
- Accounting > journal entries > misc
- add entries (draft) with empty journal name
- resquence those entries with entries that have names

Bug:
calling min or sort on the names fails when some are strings and others
are bools (False for empty strings)

Fix:
replace names that aren't set with an empty strings

opw-2957750

closes odoo/odoo#99772

X-original-commit: 0f90852818a334d66ed8a6781f5abdc022f76ff7
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-09-19 10:29:51 +02:00
Louis Baudoux c76234e2ae [IMP] account: export AccountMoveFormRenderer to allow the OCR to extend it
Enterprise PR: odoo/enterprise#30931
Related task: #2858695

closes odoo/odoo#99439

Related: odoo/upgrade#3851
Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-09-19 10:29:46 +02:00
Dossogne Bertrand 2a41d237fe [FIX] hr_holidays: show correct remaining leaves value
On the employee page, the employe's remaing leaves
were computed using the allocations. Now that leaves
and allocations are not linked directly, the value
needs to be computed differently.

task-2971148

closes odoo/odoo#100458

X-original-commit: adc29a685ed934f45f8c4bbc482866e8a4f49471
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-19 09:33:44 +02:00
mafo-odoo 7c6cad248f [FIX] project_timesheet_holidays: holiday timesheet can't be deleted
Issue:
When creating time off timesheet from the timesheet app,the newly
created timesheet is connected to a leave request while it shouldn't
be linked to any leave request and in consequence you can only delete
this new timesheet by deleting the leave request.

Explanation:
To create the new timesheet timesheet_grid makes a copy of another
timesheet on the same line and that makes that the holiday_id (used
to link timesheet and leave request) is also copied.

Solution:
When copying a timesheet the holiday_id is not copied

opw-2951062

closes odoo/odoo#100211

X-original-commit: e1e6ba48bb43ebfe9644368287f9bdf2fd1d561c
Related: odoo/enterprise#31347
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-19 09:33:42 +02:00
Valentin Chevalier a6cd96c5c5 [IMP] (account_)payment, sale: add docstrings
Add docstrings to clarify methods in the payment link wizard.

closes odoo/odoo#100186

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-19 08:38:12 +02:00
Valentin Chevalier f02441880e [IMP] sale: check state bef exec in _set_pending()
Check state before execution in _set_pending()

When using webhooks, _set_pending() can be called two times (when the
user comes back and when the webhooks notify the db). To avoid doing
the same treatment twice, we add a check in _set_pending to see if the
transaction is not already pending before doing anything else.

Part-of: odoo/odoo#100186
2022-09-19 08:38:12 +02:00
Valentin Chevalier 2dc5bf555f [IMP] account_payment, sale: log messages with superuser
When payment providers receive a notification from a webhooks and log
something in the chatter of transactions, sale orders or invoices, the
message is shown as from 'Public User'.

Now, all messages will be logged as 'OdooBot'.

Part-of: odoo/odoo#100186
2022-09-19 08:38:11 +02:00
Philippe Wauthy 68c76f479b [FIX] hr_holidays: fix banner and days count
In hr_holidays, the banner disappears when the number of days taken is more than the days allocated.
Also, the count of the days is based on all existing allocations.

This commit fixes the banner by allowing to display negative days remaining when there are more days taken than days allocated.
It also fixes the count of the days by couting days only for active allocations.

task-2983188

closes odoo/odoo#100452

X-original-commit: efb351f86a3645ad292fdaaa6b223ff80096b63c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: phwa-odoo <phwa@odoo.com>
2022-09-18 18:52:42 +02:00
Philippe Wauthy 8b6f1a195a [FIX] hr_holidays: delete calendar event when time off is deleted
Since https://github.com/odoo/odoo/pull/76722, it is possible to cancel an approved time off.
However, the calendar event created when the leave is validated is not archived when the leave is cancelled.

This commit archives the calendar event when the leave is cancelled.

task-2965754

closes odoo/odoo#100413

X-original-commit: d292891997a378578e072cfb01bba612501aa82a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: phwa-odoo <phwa@odoo.com>
2022-09-18 15:26:46 +02:00
Julien Mougenot 186a05ccf7 [FIX] web: Empty irrelevant data in records
Before this commit, when a record from a relational model would start to
load, it would empty its `data` object. The issue is that a rendering
process can be initiated right after a record started loading. In kanban
views, this causes a crash since all records are always assumed to
contain values in their data objects.

This commit takes care to only clean strictly unwanted data when loading
a record instead of removing all the values, ensuring that records
always contain data.

closes odoo/odoo#100414

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-18 09:30:04 +02:00
Didier (did) 2aad13b67d [FIX] mail,hr: fix performRpcRead on user model
Fields param is actually not a kwargs. This cause a stack trace when opening a chat window (other than a chat with yourself) from a Kanban user avatar icon.

closes odoo/odoo#100315

X-original-commit: 95d3f4b0ea4dd5f1f9403b6e5ba97e1e2a510f65
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-18 09:30:01 +02:00
Jorge Pinna Puissant d8d1eea44b [FIX] web: form_compiler, do not link field and label with technical ID
Before this commit, on compiling the field, a search is done to find the
label to link to the field. To do this search, the following field's
attributes were used: the `id`, which is encoded on the arch of the
view; if the `id` wasn't set, the `field_id`, which is an internal
technical attribute, is used, and if neither of these were set, the
'name', which is also encoded on the arch, attribute is used. These
attributes are compared with the content of the `for` attribute on the
label.

The issue with this, is that as the `field_id` is an internal technical
attribute and could never be found on the view arch, neither on the
content of the `for` attribute on the label. Leading to empty labels, or
labels linked to the wrong fields. This principally occurs when two
fields with the same name are found on the view.

Now, only the `id` attribute and the `name` attribute, which both can be
found on the view arch, are going to be used to search the correct label
to link to it's corresponding fields.

closes odoo/odoo#99399

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-18 09:29:59 +02:00
qsm-odoo 08dcbc8f1d [IMP] web, *: move assets_common files directly inside assets_frontend
*: auth_password_policy, bus, calendar, event, mass_mailing, stock,
   survey, web_editor, web_tour, website, website_event, website_forum,
   website_mass_mailing, website_sale

This commit is a first step towards a potential deletion of the
assets_common bundle, although that step would need more work, specs and
discussions as some layouts kinda only use the assets_common bundle
(some take the full assets_common but parts of the assets_backend one
for example).

The main goal of this commit is to have the assets_frontend bundle
directly include the "common" files we need. As a first step, this
commit only blindly duplicates them all into assets_frontend (without
removing the potentially useless ones). The goal is to have those
advantages:

- Reaching a frontend page only calls two main JS files (one normal and
  one lazy-loaded) instead of 4 (two normals and two lazy-loaded). This
  may help reach a better google page speed (which is becoming more and
  more strict).

- The frontend CSS is built as one: the common SCSS which was using
  bootstrap variables, or even Odoo-based SCSS added by mistake in
  common instead of both backend and frontend is now computed with the
  right bootstrap customizations. E.g. the tempusdominus datetimepickers
  use bootstrap grays... after this PR, they use the right grays as
  customized by the user on the website.

It was also chosen to not have a common "sub-asset" which is included in
assets_frontend. Making assets_frontend completely independent makes
sense (as it probably will for other "main" asset bundles): we can focus
on adding the files each layout needs without the need of worrying if it
impacts unrelated layouts. Sub-assets (when not strictly necessary) is
also a source of errors: extending the "main" bundle instead of the
right sub-asset it may use (like it was the case with the sub-assets of
assets_common: _assets_common_scripts and _assets_common_styles as
explained in the previous commit). So this is indeed a small drawback of
not factorizing the code for the inclusion of "common" files in bundles
but it seems more explicit and easier to maintain that way. Note that
adding "common" file is not the most common usecase anyway, apps
generally only need files in backend or frontend.
The __manifest__ declaration will also likely evolve in more and more
uses of wildcards to match entire directories. In the future, adding
"common" web-app files in both backend, frontend and other "main"
bundles could just be about one line duplicated into each bundle.

closes odoo/odoo#100314

Related: odoo/enterprise#31394
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-18 08:37:06 +02:00
qsm-odoo a28527482e [REF] web: remove useless assets_common sub-assets
The "web._assets_common_scripts" and "web._assets_common_styles"
sub-assets were useless, confusing and prone to errors. Especially with
the refactoring done by the next commit in this PR where common files
will be put directly inside the frontend bundle.

Indeed, their standard purpose was only to be included in the
"web.assets_common"... but making them sub-assets suggests you could
reuse them for something else... which you actually could not since most
"web.assets_common" extensions by other apps were done in the main
bundle directly instead of the correct sub-assets one.

Part-of: odoo/odoo#100314
2022-09-18 08:37:06 +02:00
qsm-odoo 1a5cf7cc8a [FIX] web_editor: restore columns drag and drop (grid)
A recent refactoring allowing to declare static XML files as part of
asset bundles at [1] broke the drag and drop of columns inside the
editor. Indeed, since the recent merge of the grid mode at [2], drag
and dropping requires a grid to be drawn when dragging a column. the
XML template needed for that grid to be drawn was not loaded at all
anymore (it was previously added in assets_qweb via a wildcard path but
it was not adapted).

[1]: https://github.com/odoo/odoo/commit/f05adbc8b59c67cbec4847687a1ee07e620c2a7a
[2]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec

closes odoo/odoo#100443

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-17 01:59:00 +02:00
Xavier-Do c06b1ede4c [IMP] standalone: log exception when standalone fails
Currently the exception is not logged using the logger meaning that the
only indication of the failure is the "module not loaded" error message.

Catching the exception to log it the proper way will help identifying
the cause of the issue, mainly for uninstall tests.

closes odoo/odoo#100431

X-original-commit: b16f850d9aa438aea91b8cbd7c33692e1e1b2f90
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-09-17 00:52:07 +02:00
Romain Derie bb65f518c3 [FIX] website: empty website domain correctly in tests
Emptying the domain should be setting it to False, not empty string,
which is saved in DB as such.

This was not problematic at all before but since [1] the domain must be
unique. As we removed the "multi website by domain" feature, we then
were able to add that constraint.
But since then, having two website with domain == '' would raise the
constraint error, while null values (False in python) would not.

[1]: https://github.com/odoo/odoo/commit/507db4e179514d171ec82e8ea0cbaf2323a6c30d

runbot-5041

closes odoo/odoo#100430

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-17 00:52:04 +02:00
Walid HANNICHE (waha) b8aca9dc5b [FIX] website: prevent favicon removal to crash
Before this commit, when one would remove the favicon of a website in
the settings it would crash.
This is because since [1] the introduction of `base64.b64encode()` in
the `_handle_favicon()` method make it crash with `False` value.

Steps to reproduce:
- Settings > website
- Delete favicon

[1]: https://github.com/odoo/odoo/commit/6b8752604898bf2b583b7f5334e35f6a1583595e

opw-2958836

closes odoo/odoo#100399

X-original-commit: 35ce152d7e5c50cb363c0fa7adecf174fede9e46
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-17 00:51:59 +02:00
Aaron Bohy b3106ecd10 [FIX] web: ListView: no crash when group by date and select
In a list view, group by a date or datetime field, then open a
group and select a record. Before this commit, it crashed, because
we didn't correctly consider the groupBy value, which is of the
form "fieldName:granularity" for a date(time) field.

closes odoo/odoo#100398

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-17 00:51:57 +02:00
Audric Onockx (auon) 889597428a [REM] project: remove unused widget
HtmlWithActionWidget was used in Project Updates
to handle <a/> tags in the html description.
Since odoo/odoo#72736 removes all those tags,
this widget is no longer needed.

closes odoo/odoo#100397

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-17 00:51:54 +02:00
tsm-odoo b47a06c617 [FIX] bus: fix channels subscription ater disconnection test
Before this commit, the `channels subscription after disconnect` bus
test failed randomly. This occured when the websocket reconnection
happened before the first subscription. Indeed, the first subscription
is made only if the resulting channel list differs from the last one
we sent.

This commit fixes the issue by wating for the first subscription
before disconnecting the websocket.

closes odoo/odoo#100391

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-17 00:51:49 +02:00
Kevin Baptiste 1950e11167 [FIX] hr_holidays_attendance: update overtime when time off is validated
The overtime were not updated when a leave was updated, which lead to
incorrect situation.

Example:
    - Check-in from 8:00 to 12:00
    - Take a day off for the afternoon
    - It was wrongly counting 4h of "undertime"

task-2982443

closes odoo/odoo#100389

X-original-commit: 0330eab5f0c477ea07f14d4aa5a0d14ae56da77c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-17 00:51:47 +02:00
Aaron Bohy 45a718aa10 [FIX] web: PhoneField: set correct type on input
"phone" isn't a valid input type, so it had no effect, except
breaking the tour system when a PhoneField input was the target
of a step, since the "consume event" was then "click" instead of
"input"..

closes odoo/odoo#100388

Related: odoo/enterprise#31437
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-09-17 00:51:42 +02:00
Denis Ledoux ef16e96255 [FIX] base, web: graph and pivot views requires more field descriptions
Following odoo/odoo@4636620004
`get_views` only pass the model fields included in the view architecture,
except for the main model when the search views is requested.
Because the search views requires all fields for the user to be able
to make advanced filters and advanced group by using any fields of the
model.

However, other views requires more field descriptions as well than
just the fields included in their architecture:
- the graph view requires all integer and float fields,
    to automatically add suggestions of measures in the measures dropdown
    menu. It's a bit like the search view, the user should be able
    to choose any measure available in the model
    (as long as this is integer or float fields)
- the pivot view requires all groupable fields,
    so the user can group by any groupable fields of the model.

The JS MockServer `getViews` is adapted to include the changes added by the above
revision as well as the current revision,
for the qunit tests suite to be able to reflect these API changes
from the server side.

closes odoo/odoo#100376

Related: odoo/enterprise#31427
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-09-17 00:51:34 +02:00
Stanislas Sobieski 82e8c74f1e [FIX] base: avoid indexing attachment on copy
When sending a mass mailing with a pdf attachment, the ir.attachment
is copied in the mail.composer for each email. Spending time and
resources in the indexing of the pdf. On copy that value is already in
the vals. This is especially true when attachment_indexation is
installed, processing the pdf documents can be costly with pdfminer.

It could also be done by overwriting the copu from ir_attachment but it
could happen a misuse of mass create of ir.attachment with the same file
has the same issue

closes odoo/odoo#100374

X-original-commit: 3d59cc849ed1040c08c4d1488866ba78c80990c8
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-09-17 00:51:32 +02:00
Aaron Bohy c31a159b4e [FIX] web: ListView: do not show handle column if grouped
The HandleField widget should not be displayed in grouped list
view, probably because we do not support the resequence feature
in this situation. This is the legacy spec.

In the wowl ListView, we didn't implement this restriction. As
a consequence, some list views (e.g. DebugMenu > Open View) didn't
render correctly when grouped, because the presence of the handle
field (which is aggregatable) didn't leave any space to display
the group titles.

closes odoo/odoo#100356

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-17 00:51:29 +02:00
Aaron Bohy 31c975ae94 [FIX] web: ListView: correctly format group aggregates
Before this commit, if a grouped list view contained an aggregatable
field (e.g. a float field) with a widget for which there's no
associated formatter (e.g. progressbar), the aggregate value was
left unformatted. It was for instance the case in the "My tasks"
list view, with the field "progress".

With this commit, the value is formatted according to the field
type, as expected.

Part-of: odoo/odoo#100356
2022-09-17 00:51:29 +02:00
Aaron Bohy f6bc1af630 [FIX] web: RelationalModel: wait for load before rendering
This commit fixes a race condition in the RelationalModel, which
can be identified by a ListView test [1], with a subset of addons
installed. Before the fix, we didn't wait for the record to be
reloaded before re-rendering the list. It could then crash because
the data object was empty (not yet filled with values).

This commit also prevent unnecessary reload/rerendering after an
urgent save, i.e. when the user is closing the tab.

[1] editing a record should change same record in other groups when
    grouped by m2m field

Part-of: odoo/odoo#100356
2022-09-17 00:51:29 +02:00
Kevin Baptiste b658171ea2 [IMP] hr_recruitment: allow multiple interviewers on applicant
Allow multiple interviewers on hr.applicant instead of a Many2One.

odoo/upgrade#3904
task-2939388

closes odoo/odoo#100338

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-16 23:49:43 +02:00
Xavier-Do 395b30e39d [IMP] tests, web: improve test_js end catching
Since #99912 logging an error message doesn't always end qunit tests.
This was mainly to allow to failfast logging qunit errors earlier
without stopping the tests in order to test all qunit anyway.

The logic was to have an end message that stops the test.

Unfortunately some errors will prevent the qunit suite to start
and the test will wait a 1800 long timer. An example was because of
a Missing dependencies. https://runbot.odoo.com/runbot/build/19306352

This new approach will avoid to stop only if the message looks like a
qunit failure and the final message is not there (to be sure).

closes odoo/odoo#100238

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-09-16 20:52:08 +02:00
Xavier-Do c61c4a4068 [IMP] web: log qunit for each tests
A previous version tried to log qunit by module but it is still possible
to have multiple random errors in the same test occuring with different
combination. This will help to avoid duplicating automatically
parsed errors in this case.

Also skips the message if it is emppty/undefined.

Part-of: odoo/odoo#100238
2022-09-16 20:52:08 +02:00
Simon Genin (ges) 7fcee56737 [FIX] web: fix grouped kanban hasData
Before: In a grouped kanban view, if all the groups are set to folded
by default, the view incorrectly thought it had no record. They were
simply not loaded and some method was not fetching the right data to
get the number of records.
It resulted in displaying the demo data and the no content helper,
making it impossible to see the actual data.

After: The number of records, despite no being fetch, is correctly used
in hasData and showNoContentHelper to fix the wrong behavior.

closes odoo/odoo#100234

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-16 20:52:04 +02:00
Romain Estievenart 98a97d0fea [IMP] *: removes .form-group
this commit removes the usage of .form-group class which is deprecated
since BS5.

Here is the css rules that was used:

a) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L1997
As we can see, it simply adds a `margin-bottom` of `1rem` which
corresponds to the `.mb-3` BS class.

b) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2326
As we already checked all `form-inline` in [1] and [2], we don't have to
do anything about these rules.

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

Notes:
- `position: relative` is already on `#new-password-group`.
- `.field-db`, `#editor-media-image`, `.unsplash_img_container` and
`#url-form-group` seems unused.
- Sometimes margins are unnecessary because of blocks overlapping.
  (e.g. `margin-bottom` is not needed if margin-top is set on the
  following node)
- CSS rules applied on `.s_website_form_rows > .form-group` are now in
the XML by adding `mb-0 py-2` BS classes.

Follow-up of:
[1] https://github.com/odoo/odoo/pull/97967
[2] https://github.com/odoo/enterprise/pull/30343

closes odoo/odoo#100052

Related: odoo/enterprise#31261
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-16 20:51:56 +02:00
Hubert Van de Walle (huvw) c1809ab7dc [FIX] mrp_workorder, sign: missing styles for the pdf_viewer
The class for the pdf_viewer field changed from o_field_pdfviewer to
o_field_pdf_viewer

closes odoo/odoo#100014

Related: odoo/enterprise#31237
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-09-16 19:17:08 +02:00
Valentin Vallaeys (vava) efbf0c0838 [IMP] payment: use ondelete instead of custom error
Use generic method on_delete instead of personalized one for the sake of
clarity and reproductibility.

task-2883630

closes odoo/odoo#99958

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-16 19:17:05 +02:00
Romain Derie af320bad34 [IMP] website: make code snippet more obvious to edit
Some (most?) people keep trying to double click on it to edit it.
The wording was not helping as "Replace this" doesn't really tell the
user how to do it. He actually has to click on the "Edit" button on the
right panel.

Personal experience, the first times I tried that code snippet, I didn't
find that button and it took me a few times before understanding how it
works.

The new wording and the shortcut button to edit it should be more clear.
Another idea was to allow dblclick to enter edit mode, but this seems
overkill and the 2 improvements here should be enough to make it easy to
figure.

Also added a comment about the `&#10` and one-liner, it is far from
obvious when reading the code..

task-2978786

closes odoo/odoo#99922

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-16 19:17:02 +02:00
Pierre-Yves Dufays e94d65519d [FIX] website: fix issue when creating account / relogging
When creating an account from the website (through the link "Don't have an
account?") while having been previously identified, the creation lasts a very
long time and ends-up with a http 502 error (actually a timeout). Same when
logging although being already logged.

Technical note: The problem was due to a database deadlock because of going
twice through authentication. A record was deleted in one transaction while
being written in another (_merge_visitor deletes it and _update_visitor_last
visit writes it but with different environment).

Task-2950241

closes odoo/odoo#99723

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-16 19:16:59 +02:00