Commit Graph
153123 Commits
Author SHA1 Message Date
Dossogne Bertrand cffedb2ee9 [IMP] hr_contract: hr_contract_history_list to owl
taskID 2957257

closes odoo/odoo#98397

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-19 09:12:48 +02:00
Achraf (abz) cb05925d99 [FIX] mail, website_*,base: Update data-toggle to data-bs-toggle
in bootstrap 5.x the toggle attribute changed from `data-toggle` to
`data-bs-toggle`, so we have to change `data("toggle")` by
`data("bs-toggle")`

https://getbootstrap.com/docs/4.6/components/collapse/
https://getbootstrap.com/docs/5.1/components/collapse/
https://getbootstrap.com/docs/5.1/migration/#javascript

Also using `$el[0].dataset.bsToggle` instead of `$el.data("toggle")` is
better since `data()` can be confusing

```js
const a = document.createElement("a");
> <a></a>
a.setAttribute("data-bs-toggle", "dropdown")
> <a data-bs-toggle="dropdown"></a>
a.dataset
> DOMStringMap {bsToggle: 'dropdown'}
$(a).data()
> {}
```

*/

https://pad.odoo.com/p/wowl_views
[aju] https://watch.screencastify.com/v/XuuQTkKRFX3lJh1vnvt9 project.task
kanban view > schedule an activity > mark it as done > traceback
https://pastebin.com/i96Krxrb

closes odoo/odoo#98339

Enterprise: https://github.com/odoo/enterprise/pull/30558
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-19 09:12:42 +02:00
Andrea Grazioso (agr-odoo) d3df2b2c3a [FIX] account: cash basis entry date
Create an invoice in date1 with a tax due based on payment (cash basis)
Create a credit note in date2 for the invoice (with date2 > date1)
Set tax lock date in date3 (with today > date3 > date2 > date1)
In the invoice add the credit note as payment

The system will block the action, because the created cash basis
entry would use as date the most recent between invoice and credit note,
which is previous to the lock date.

opw-2730106

closes odoo/odoo#98425

X-original-commit: 087e967f6ebf6e5829ec1d72a672841f8d543d4a
Signed-off-by: William André (wan) <wan@odoo.com>
2022-08-18 21:09:21 +02:00
Mossaab BOUDCHICHA c7b5ca0d5f [CLA] Signature for Mossaab BOUDCHICHA
closes odoo/odoo#98416

X-original-commit: 42cb8ad0a31162d9d1b93e4eae0562c89685fe3c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-18 21:09:18 +02:00
Zelong Lin 7be59d6603 [IMP] mail: add group_public_id into mock setup
task-2957108

closes odoo/odoo#98378

Related: odoo/enterprise#30582
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-18 21:09:12 +02:00
Jeremy Kersten b9e4068e82 [IMP] web: view metadata - multi xmlids
In case several xml_ids target the same record, now we show an icon with
other xml_ids (not the first one) as tooltip.

task-2954293

closes odoo/odoo#98139

Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-08-18 21:09:03 +02:00
Ignacio Cainelli 7c8b51e091 [IMP] l10n_ar: change message error
The error message now shows that a VAT tax must be added to that line
and that if it is already added, it may be misconfigured. This improves
the functionality since previously it showed that there should only be
one VAT tax and that could generate confusion in some cases

[CLA] add new members to Adhoc CLA

closes odoo/odoo#97640

X-original-commit: 16200f80cd8ae7a471725833655a06fe049b5b4b
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-18 21:09:00 +02:00
Sébastien Theys 5b21f8b346 [IMP] mail: split localId and record indexing
Part of task-2741982

closes odoo/odoo#97026

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-18 21:08:56 +02:00
Thibault Delavallée edb4cb6f8c [REF][IMP] crm, event, test_mail(_full): make performance tests post-install
PURPOSE

Have more reliable tests.
Better spot side effects coming from sub addons.
Lessen non deterministic counters due to local db.

SPECIFICATIONS

Make crm, event and mail performance tests post install.

Update query counters with
  * local values (install module only with enterprise activated);
  * community / enterprise runbots (if value is different);
  * some notes on non deterministic issue if known;

Task-2925606

closes odoo/odoo#96446

Related: odoo/enterprise#29726
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-18 21:08:50 +02:00
David (dafr) 4c85ca43c1 [FIX] stock: Check move_id exist before using it.
Reproduce steps:
- Create P1: storable, tracked by SN, manufacture
- Create C1: storable, tracked by lot
- Add 100 unit of C1 in Stock location
- Add 2 unit of P1 in Production location
- Create BoM for P1 with C1 as component
- Create MO for 2 unit of P1 > Confirm > Mass Produce > Generate Serials > Apply
=> Traceback on ensure_one()

In mrp_production.py in _split_productions(), the 'move_id' field is removed before unlink() is called in order to avoid calling recompute_state().
As move_id is not guaranteed to exist, we need to check before using it.

OPW-2878461

closes odoo/odoo#98391

X-original-commit: 6f2b7af37468d97b8dd4eb6c8e4bdcbaf472a331
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: DavidFesquet <dafr@odoo.com>
2022-08-18 19:58:53 +02:00
tsm-odoo f02e532c76 [FIX] mail: fix traceback on rtc call
Since the PR hiding the screen sharing button on mobile [1], starting a
call result in tracebacks. The issue is that the code is using `env.device`
which is only available in the legacy env while discuss works with the wowlEnv.
In order to solve this issue, let's use `messaging.device` instead.

[1]: https://github.com/odoo/odoo/pull/97947

closes odoo/odoo#98400

X-original-commit: 5fb6ea52ef876939a316bfc289237b443089f37b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-08-18 18:25:43 +02:00
Romeo Fragomeli cf4f23d484 [FIX] web,*: adapt old BS4 classes
*: hr_org_chart,l10n_gcc_invoice_stock_account,mail,point_of_sale,
   purchase,website,website_sale,website_sale_autocomplete,
   website_slides_survey

Some commit have added old Bootstrap 4 classes after the merge of
Bootstrap 5.

Note that it's not possible anymore as the merge bot is now able to
detect it.

closes odoo/odoo#98349

Related: odoo/enterprise#30551
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-18 16:47:30 +02:00
Samuel Degueldre bdabc55280 [FIX] web: fix label with empty string rendering with default label
In legacy, when you have a label with a string attribute that is empty,
that label is rendered as empty. In the new form view, when the string
attribute was empty we would fall back to the default label for that
field, which is incorrect.

This commit fixes that by not rendering labels that have an empty string
at all.

closes odoo/odoo#98237

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-08-18 16:47:26 +02:00
Ipsita Borisagar 968c13103f [FIX] web_editor: error while changing background color of button
Before this commit:

When we want to change the background color of a button, clicking on that button
will occur traceback(dropdown is not a function).

After this commit:

Traceback will not occur by initializing the dropdown component as it has
converted into the OWL component.

Task-2916277

closes odoo/odoo#96508

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-18 16:47:24 +02:00
Andrea Grazioso (agr-odoo) b3fe75b2f3 [FIX] account: recursive computation with out-of-order bank statement
Have a sequence of bank statement out of order
i.e.
|id|  date  |
|--|--------|
|01|20/07/22|
|02|21/07/22|
|03|22/07/22|
|04|18/07/22|
|05|17/07/22|
|06|16/07/22|
|07|15/07/22|

Adding more out-of-order bank statement will trigger recomputation in
all the next (chronologically) statements.
As the records to recompute are ordered by id, it may occur that the
first statements to recompute have the highest date and cause a
recomputation recursion exceeding the limits

opw-2925984

closes odoo/odoo#98373

X-original-commit: f675222786a9f57199117d38fca529dd1b0c2104
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2022-08-18 15:08:10 +02:00
Michael (mcm) 162f783d34 [FIX] web: fix crash on list button cell click
This commit fixes an issue when clicking on a list button cell.

closes odoo/odoo#98358

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-08-18 15:08:04 +02:00
Florian Vranckx 14d1d46ced [FIX] hr_expense : mobile display quantity uom
Steps to reproduce:

	1. Install hr_expense,inventory
	2. Enable unit of measure in the invetory setting
	3. Create an expense product with a uom
	4. Switch to mobile display and refresh
	5. Try to create a new expense, the quantity field is not visible

Cause:

	In 15.0 it was decided in PR #68387 to switch from the selection widget to options. This changed the css of the element.

Solution:

	Checking the entire codebase with the following regex "<div.*class="o_row".*\n.*class="oe_inline".*\n.*class="oe_inline".*\n.*<\/div>"
	in order to find an other usage of o_row with two inline element yielded no result other than hr_expense. In order to minimise the amount of changes,
	a local fix of the styling is probably more appropriate.

opw-2924276

closes odoo/odoo#98336

X-original-commit: 0754f71b5e4760b1956f196f50bd6550e5fc41e0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-18 15:08:00 +02:00
Thibault Delavallée 7fb4d8f919 [FIX] mail: remove unnecessary getattr
We can access fields directly on a record, no need to have a getattr.

closes odoo/odoo#98287

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-18 15:07:57 +02:00
Thibault Delavallée 6942fd3e28 [IMP] (test_)mail: add composer fields in view
Some fields in composer model allows to control generated messages or emails
values. However they are not available in the form view. In this commit we
add them in form view as invisible, as a first step towards cleaning the
composer code and usage.

Next step will be to cleanup composer code to remove the onchange based on
template and have real computed fields. Those will require fields to be
available in views so adding them is a necessary first step.

Some tests are added to see the usage and purpose of some fields. This helps
having a better code coverage.

Query counters update when using the Form tool

  * adding subtype_id: 2 queries
  * adding author_id: 1 query

Task-2816845
Prepares Task-2088884

Part-of: odoo/odoo#98287
2022-08-18 15:07:56 +02:00
Thibault Delavallée 20a13cedea [LNT] mail: lint composer/template code for generating values
Purpose is to better spot field and classify them by usage. This code will
be modified soon and this prepares future modifications.

Task-2816845
Prepares Task-2088884

Part-of: odoo/odoo#98287
2022-08-18 15:07:56 +02:00
Renaud Thiry 00c04b7a8f [FW][FIX] mail: Give reply-to non-template value
When sending a mass mail through the composer, if the field ``reply_to`` had to
fall back to being ``email_from``, reply_to would take the value of the template
syntax instead of the rendered value.

This is notably the case when mass-mailing invoices through the accounting app.
Resulting in reply_to fields such as: '{{user.email}}'

On some mail clients (including mailhog), this could also result in template
syntax being shown as part of the subject or sender field.

This commit fixes that by correctly taking the rendered value of 'email_from'

Task-2816845

X-original-commit: e320b852e8f1958ac3dccaa5333420bb7b8d8f3d
Part-of: odoo/odoo#98287
2022-08-18 15:07:56 +02:00
Renaud Thiry fe0107803e [FW][IMP] test_mail: add test for from and reply-to computation in composer mass mode
FWD-PORT: updated to new test files, and tests are more in-depth since v14

When sending a mass mail through the composer, if the field ``reply_to`` had to
fall back to being ``email_from``, reply_to would take the value of the template
syntax instead of the rendered value.

This is notably the case when mass-mailing invoices through the accounting app.
Resulting in reply_to fields such as: '{{user.email}}'

On some mail clients (including mailhog), this could also result in template
syntax being shown as part of the subject or sender field.

Task-2816845

X-original-commit: b87df6664908615bdf57bf16e239a10c3f7bf89b
Part-of: odoo/odoo#98287
2022-08-18 15:07:55 +02:00
Michael (mcm) f20e3d13fc [FIX] web: fix state selection field position
Before this commit, the state selection field was positioned
on the left of the sheet, just above the title. Now, it is
positioned on the right of sheet.

This commit also fixes the text displayed by this field by
using the value of the fields (normal;blocked;done)_legend.

Finally, this commit removes the last uses of the deprecated
field `kanban_state_selection`.

closes odoo/odoo#97765

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-08-18 15:07:47 +02:00
Bruno Boi df05f8f91d [FIX] web: restore correct m2m_tags style
This commit completes the style of the tags of m2m_tags field.
Tags did not have correct colors and had border.
The commit also fixes the m2m_tags_avatar field for the same reason
as well as a traceback when clicking on the remove tag button.

closes odoo/odoo#96654

Related: odoo/enterprise#30012
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-08-18 15:07:43 +02:00
Nicolas Bayet 209cf112f1 [FIX] web_editor: properly remove image loading attribute
The fix that removed the loading attribute of images was targeting
the wrong method `_createWysiwygInstance`.
In 15.0, the method does have a typo (`_createWysiwygIntance`).

closes odoo/odoo#98363

X-original-commit: 7a352330094ee2e267f29d9f479b4e31e90dbec6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-18 13:47:00 +02:00
Louis Wicket (wil) 8537944b4b [IMP] mail: rewrite MessageReactionGroup/message to not use compute
closes odoo/odoo#98344

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-18 13:46:51 +02:00
Ivan Yelizariev 39d16f085f [FIX] website_sale: prevent changing name when invoiced are issued
/my/account controller blocks name/vat/company_name updating if there are issued invoices.

However Before this commit, user can change name via /shop/address page

STEPS

1/ install sales, eCommerce,inventory,Accounting
2/ create a sales order from the portal page, validate and create an invoice from SO and post it
3/ Try to change the name from the Portal > Account
Result - not possible = correct
4/ Place a new SO by the same portal user and edit the name on the address before proceeding to checkout

[1]: https://github.com/odoo/odoo/blob/1f49528a4b198e8912beb33be921d2855c694e2e/addons/account/controllers/portal.py#L111-L113

opw-2848251

closes odoo/odoo#98335

X-original-commit: 3c8337d17c23779ef265cb5037243b533725c494
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-18 13:46:48 +02:00
Nicolas Bayet 3dc3b6cc3c [FIX] web_editor: don't observe changes that cancel each others
Before this commit, if the mutation records would contain records that
would cancel each others, those change would be listened and considered.
For instance:
- Mutation 1: Adding ID on element A
- Mutation 2: Removing ID on element A
When processing the mutation records, it is useless to consider those
2 as the Id of the element A is the same before and after the mutation.

This led to multiple issues, especially in case where some elements have
the same branding (and are thus the same field/xpath).
In such cases, the editor is replicating the changes made on one of them
to the others to keep the "same" fields sync'd.
For instance, if you go on an event page and try to modify a date, the
change will be replicated at multiple place in the page which are
actually the same t-field.

When replicating those changes, somehow the jQuery Sizzle ID changes
were listened, leading to infinite loop of mutation observer.

Step to reproduce:
- Install website
- Go to any page and enter edit mode
- Click on the navbar and in the right panel select Vertical header
- Activate the CTA option in that navbar right panel (should already be)
- Click on the CTA button
- Try to edit the URL in the right panel or any link option (style etc)

The changes will be ignored as the button's section is being re-rendered
every 50ms infinitely.
On chrome you can easily see it by watching the DOM in the dev tool. The
section will blink again and again, hinting about DOM change.

opw-2893480

closes odoo/odoo#98331

X-original-commit: 97c712e81692661fc9bc65e0810abc4dc017ed87
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-18 13:46:45 +02:00
Josse Colpaert 7408eef971 [FIX] l10n_eg_edi_eta: avoid infinite loop by setting the blocking level to error
If you have only blocking level warning/info and
the batch is bigger than 25, then it will generate
an infinite loop.  In order to avoid that, when an invoice
is still to be signed we put it in error, also because
a manual intervention of the user is required anyways.

closes odoo/odoo#98322

X-original-commit: a707934ac0494b707975b96c18fddfd7b5ef8b9f
Signed-off-by: William André (wan) <wan@odoo.com>
2022-08-18 13:46:35 +02:00
Benjamin Vray bf5eabd03d [FIX] website: hide logo height scrolled option if no logo
Before this commit, the logo height scrolled option was displayed even
if there was no logo.

It was because the condition to display or not this option (in the
"_computeWidgetVisibility") had not been updated correctly when the DOM
of the navbar was refactored.

task-2800680

closes odoo/odoo#98321

X-original-commit: 2b2ff732914e6c491e48540958bec967a3acfe33
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-18 13:46:31 +02:00
Arnaud Joset 4525f14780 [FIX] rating: remove profiler in test
closes odoo/odoo#98319

X-original-commit: 2227cfb98d6ca3986e6344027690d8bb893e213c
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-08-18 13:46:28 +02:00
Shawcker 747ac40b0d [FIX] stock_account: fix anglo saxon stockvaluationlayer tests
Currently the test in stock_account/tests/test_stockvaluationlayer.py for Anglo-Saxon accounting is slightly wrong as it uses a company that can change depending on which l10n is installed (mainly coming from the company's country_id and account_fiscalcountry_id). This means that the test might be running with different settings from one time to another (= non-deterministic) and fail in some circumstances.

This commit fixes this issue by making this test an AccountTestInvoicingCommon test instead. This allows for the use of a test company, always the same. Of course, a few items have to be re-created since they can't be inherited anymore.

closes odoo/odoo#96320

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-08-18 13:46:05 +02:00
Kevin Baptiste 1974f1a385 [FIX] hr_work_entry_holidays: bump query counter
odoo/odoo#96545 added an extra query - the query count needs to be bumped.

closes odoo/odoo#98348

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-18 12:24:46 +02:00
Romain Derie 35805108a7 [FIX] website: display website in ir.ui.view relation fields
Since [1], the ir.ui.view name_get can suffix the name with the website,
something like `Main Layout [Website 1]` instead of just `Main Layout`.
This is fundamental when managing a DB as with the multi website / COW
mechanism, views are duplicated, making it impossible to know which one
is coming from which website (or is the generic one) when selecting a
new record in a field input.

While it worked great for the autocomplete list, the default value when
loading the form/list views were still not displaying the website.
You thus have the same issue: you have to navigate to that view to
figure which one it is.
When managing multi website DBs, this is becoming tricky.

This commit also adds that behavior to the value shown when loading a
form/tree view.

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

closes odoo/odoo#98320

X-original-commit: d66f8649a8f18fc67a595dd5254d1aeb680c29c6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-18 00:23:43 +02:00
Philippe Wauthy d57aba65fa [FIX] hr_holidays: remove allocation_id on hr.leave
As part of hr_holidays B2B, the holidays allowances were moved from hr_leave_type to hr_leave_allocation.
This didn't allow to take a leave longer than the maximum duration of an allocation. Also, despite all the
allocations could have enough days for a certain leave, it was not possible to use all available days without
splitting the leaves across the different allocations.

This commit moves the holidays allowance to the hr_leave_type to remediate the issues described above.

task-2834887

closes odoo/odoo#98317

X-original-commit: 8c37d5c7cc397e517c43c1ec13a131b4b35e48b7
Signed-off-by: phwa-odoo <phwa@odoo.com>
2022-08-18 00:23:40 +02:00
Florian Charlier 992dfc4312 [FIX] mass_mailing_crm: fix link in demo data
So that the link works...

Task-2954531

closes odoo/odoo#98310

X-original-commit: 617a4b8245315cbd47f83bed3e2ad74b105b5975
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-17 22:52:17 +02:00
Adrien Dieudonné fe9d1720ea [FIX] sale: portal: automatically open the popup for payment
Before this commit, the popup for payment wasn't open after signature.

This is because Bootstrap no longer uses jQuery and jQuery .trigger
only calls jQuery handlers.

See 'o_sale_portal_paynow' button with data-bs attributes on it.

closes odoo/odoo#98290

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-17 19:48:59 +02:00
Ivan Yelizariev 918f936de7 [FIX] account: add missing _name_search for account.move.line
The model had name_get, but not _name_search, which leads to difference between
what user sees and what he get as search results.

This patch doesn't fix the issue completly, but adds more search results on
searching just by account move (e.g. invoice) name.

STEPS:

* open menu Analytic Items (account.analytic.line)
* make custom filter *Journal items contains "INV/"* (
`[["move_id","ilike","INV"]]` )

BEFORE: no items found even if you see such analytic items

---

opw-2691495

closes odoo/odoo#98289

X-original-commit: 84f440c7b0d18c3c9f9dd57d5352f1da10fedf00
Signed-off-by: William André (wan) <wan@odoo.com>
2022-08-17 19:48:56 +02:00
Louis Wicket (wil) 5d43fad9e6 [IMP] mail, *: auto add implicit attributes of identifying fields
Automatically add `required` and `readonly` on identifying fields and
remove them from field definition.

Task-2955910.
* = calendar, hr, im_livechat, rating, snailmail, website_livechat

closes odoo/odoo#98283

Related: odoo/enterprise#30511
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-17 19:48:53 +02:00
std-odoo e916f944af [FIX] fetchmail, *: use the new bootstrap 5 syntax
* google_gmail, mail, microsoft_outlook, base

closes odoo/odoo#98277

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-17 19:48:46 +02:00
Adrien Dieudonné 358194e99a [FIX] website: searchbar: wrong usage of BS dropdown
Before this commit, we had a crash when a user types something in a
searchbar in the website (on /shop eg) and do keydowns:
"Cannot read properties of undefined (reading 'nextElementSibling')"

BS dropdown doesn't use JQuery anymore and is therefore less permissive
with empty arrays. Also note that the logic is different between BS4
and BS5.

To fix this, we need to make sure that all elements are in the DOM
before BS dropdown instanciation.
It's why we have to render the 'dropdown-menu' before the dropdown
constructor is triggered.

We also had to add the 'data-bs-toggle' attribute to let BS find it
to set '_element' (which must be the previous sibling of the dropdown-menu).
This data attribute was probably not set before because in this case
the BS dropdown is not used on a button or a link as documented;
we use it as an autocomplete functionnality.

closes odoo/odoo#98254

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-17 19:48:43 +02:00
Bruno Boi 3021a676de [FIX] web: don't apply TZ when serializing dates
# Before this commit
Serializing a date would apply the TZ offset of
the luxon's DateTime object in which it is contained.
This sometimes led to output the wrong date.

# After this commit
Serializing a date contained in a luxon's DateTime object
will not apply any TZ offset and will output a serialized version as-is.

# Note
If you still want to apply the TZ offset, you should do it manually:

    const toSerialize = date.setZone("utc");
    const value = serializeDateTime(toSerialize);

closes odoo/odoo#98194

Related: odoo/enterprise#30469
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-08-17 19:48:36 +02:00
Romain Derie 5ad404fbb5 [REM] website, *: remove the now useless backend_dashboard tour
* website_sale

That tour keeps failing. A fix attempt was made with [1] but wasn't
enough.
The tour was actually useless as since [2] google analytics dashboard
was not part of the website dashboard anymore (due to google not
allowing GA4 dashboard to be embed).
The tour, which was initially made to ensure that google analytics was
correctly shown even if not yet connected to was then not useful
anymore.

The opportunity is also taken to rename the misleading ID of related
records still mentioning Google.

[1]: https://github.com/odoo/odoo/commit/1a191357e3ac0c4542b2fc7c3a2aee18dc54699d
[2]: https://github.com/odoo/odoo/commit/985e49bdb5e22fa197ba267aa41d7a8ba7e50550

runbot-4498
runbot-4499
runbot-4466

closes odoo/odoo#98090

Related: odoo/upgrade#3774
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-17 19:48:28 +02:00
Noe Antoine b13e822b67 [IMP] survey: allow live session participant identification
In the participation screen (user_input tree view), the users can
see the email and contact name of the participants. However, this
is fixed. Those will be empty for live session participants.

Therefore, make those optional but show them as default. Also add
the nickname field in the view before them, not shown by default
but optional, in order to be able to see nicknames for live session
and identify the participants.

Task-2928143

closes odoo/odoo#97902

Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
2022-08-17 19:48:24 +02:00
Guillaume (gdi) caf1ca67e9 [FIX] website: permit to open the image wall modal correctly
Since the bootstrap 5 merge at [1], when you click on an image in the
Image Wall block, the modal no longer opens. This commit restores that
and adds a test to make sure this problem does not happen again.

Steps to reproduce:
- Drop the "Image wall" block in a page
- Save
- Click on an image
-> The modal does not open

[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968

task-2937538

closes odoo/odoo#97053

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-17 19:48:21 +02:00
Benjamin Vray 6bfca9f714 [IMP] web_editor: adds a remove button next to the shape selector
This commit aims to make it easier to remove a shape over a background
image.

Before this commit, we could only remove a shape by clicking on the
"shape" button in the background options (it was not easy to find
quickly), but with this commit we can now also remove it thanks to a
"remove" button that has been added next to the shape selector.

task-2827802

closes odoo/odoo#96788

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-17 19:48:18 +02:00
Rahul Prajapati 4123505efa [IMP] *: have replace as default command on update
* im_livechat, mail, snailmail, website_livechat

PURPOSE:

A `replace` command should be default while updating a field.

SPECIFICATION:

- If no command is passed while updating a field, add a `replace` command as
default.
- Remove all the existing occurrences of `replace` command.

Task-2851488

closes odoo/odoo#95885

Related: odoo/enterprise#30494
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-17 19:48:11 +02:00
Camille Spiritus 7035b8ba72 [FIX] random crash occuring during the populate
In this specific branch, populating the DB would systematically create a disbalanced move (id 835, balance -70.0)

This seems to be linked to the balance being equal to 0, and therefore considered faulty in the get_lines function.

We're still not aware of the wizardry explaining why it would happen specifically on this branch, but this should avoid this problem repeating.

closes odoo/odoo#94050

Related: odoo/enterprise#28607
Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-17 19:48:08 +02:00
Camille Spiritus 7482aff6d7 [IMP] account: cash discount improvements
Purpose :
Improve multiple use cases while handling the Accounting part of Cash Discounts in Odoo.

When creating a Payment Term, the user can now specifically design an early payment discount through an additional part in the wizard.
This will, amongst other things, allow the user to choose in which way the tax should be computed on the discounted invoice (tax included/excluded).

The discounted amount and the conditions to fulfill are printed below the invoice PDF, as well as the details.

Registering a payment while filling the condition for an early payment discount will prefill the fields accordingly.

Reconciliation --> In the reconciliation widget, the logic of Early Payments Discounts are also applied.

Related : odoo/enterprise#28607
Task:2729038

Part-of: odoo/odoo#94050
2022-08-17 19:48:08 +02:00
Odoo's Mergebot 5060204e49 [MERGE][IMP] survey: implement a tour & revamp onboarding data
PURPOSE

This commit improves the accessibility of the survey samples when no records
are shown, revamps the onboarding data, slightly modifies the integration
of test surveys and related filters, and adds a tour that is started when the survey
module is installed

SPECS

1. Remove the modal used to show the samples and show them on the empty screen
	instead.

When no survey exists, the user gets the proposition of trying survey samples.
Previously, the user had to click on a button to open a modal showing the
different samples. Now, the samples are shown in the empty screen directly.

2. Revamp sample surveys data

Considering this is the data wa want to push forward, it needs to be as
relevant as possible while being "light" for the db.

3. Consider completed test surveys as completed surveys

Most people expect to see the test the just did counted in the completed
surveys counter in the survey view. The filter excluding the tests surveys has
therefore also been removed from the participation view.

4. Rename the filters related to the test surveys

"Tests Only" and "Exclude Tests" are more straight to the point than
"Test Entries" and "Exclude Test Entries".

5. Implementation of the tour

The tour suggests to the user to try and test a sample survey, and shows how
to check the results gathered for this survey.

6. Changed the target of the "test" button to "self"

Since the test action is used during the tour, the test page needs to be opened
in the same tab so that the tour can continue.

7. Added ids to some elements

These ids are used by the tour to identify which element is the current target
of the tour.

Task-2794884

closes odoo/odoo#87326

Related: odoo/enterprise#26661
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-17 19:47:59 +02:00