Commit Graph
153645 Commits
Author SHA1 Message Date
Zelong Lin d862ff258a [IMP] mail: remove legacy popover
task-2968421

closes odoo/odoo#99402

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-01 18:11:09 +02:00
Laurent Smet a372772ba6 [IMP] account[_edi], l10n_*: Make the EDI taxes computation helper usable on any models
The current taxes computation method defined in account_edi has been moved to account on account.tax to be usable on any models.

closes odoo/odoo#99401

Related: odoo/enterprise#30967
Signed-off-by: Laurent Smet <las@odoo.com>
2022-09-01 18:11:02 +02:00
Brieuc-brd 48d4b386f2 [FIX] mail: Message space between messages
Prior to this commit, the space between messages where too large and
created inconsistencies.

This commit fixes this issue.

closes odoo/odoo#99396

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-01 18:10:59 +02:00
Thanh Dodeur a90266e393 [FIX] mail: make call participant card colors more consistent
Before this commit, we were using `bg-secondary` which was dependent on
whether we used community or enterprise style, and `bg-black-75` which
is legacy and not available on the discuss guest page.

This commit fixes this issue to make the colors consistent across those
cases.

closes odoo/odoo#99393

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-01 17:11:19 +02:00
Nicolas Lempereur 652f7259e4 [FIX] web: dropdown left-positionned in RTL
The dropdown is positionned from the left, with comming from bootstrap:

- left: 0; # from CSS [OVERRIDEN]
- right: auto; # from CSS
- left: 0px; # from JS
- transform: translate3d(123px, 0px, 0px); # from JS

the 123 pixels is the offset to the left border of the parent component.

This is working in left-to-right, but in right-to-left, only the CSS
style is reversed and we get:

- right: 0; # from CSS
- left: auto; # from CSS [OVERRIDEN]
- left: 0px;
- transform: translate3d(123px, 0px, 0px);

Since the result is `right: 0; left: 0px` the size of the dropdown is
set to 100%, but this is not taken into account by Popper.computeStyle
which will have a 100% parent width Popper set at the position of the
small width Popper.

Graphical example:

```
[----------------------] # width of the page
[---]                    # popper in LTR
                   [---] # popper in RTL with fix
         [-------------] # popper parent size
                   [-------------] # popper in RTL without fix
```

as shown, without the fix, the popper content might overflow outside of
the page, and the content aligned to the right unseen).

opw-2926863

closes odoo/odoo#99355

X-original-commit: a883d0de0336c85ebab411ec42ae0e9936b5195f
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-09-01 17:11:15 +02:00
Lucas Perais 7f4f19582b [FIX] web, barcodes: correctly handle chrome's autofill
On Chrome, have a field that supports autofill (you have to have set up an adress in Chrome first).
Click on that field, and apply the autofill proposition.

Before this commit, there was multiple crashes, roughly one for every handler of event `keydown`.
This was caused by the fact that the autofill feature triggers keydown events without the field `key`.
(https://bugs.chromium.org/p/chromium/issues/detail?id=581537, I could not find a better ticket).

This seems to be a bug on Chrome's side, since the spec doesn't mention that field may be unset (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).

After this commit, there is no crash.

closes odoo/odoo#99348

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-09-01 17:11:12 +02:00
FrancoisGe c70d01f429 [FIX] web: save a x2m with an invalid new record
The purpose of this commit is to prevent saving to a form view
if you have created and edited a new invalid record in an x2many.

How to reproduce
- go to a form view with an x2m
- create a new record with at least one required field empty in the x2m
- edit another field than the required one
- click on the save button

Before this commit:
- The view is switched to readonly mode and the new record is deleted.

After this commit:
- The view stays in edit mode, the new record is not deleted and
a notification indicating invalid fields is displayed.

closes odoo/odoo#99288

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-01 17:11:08 +02:00
Odoo's Mergebot 826ac1771d [MERGE] web: improve the date/datetime utility functions
This PR:
- adapts the following fix [1] in master branch, as the former has been fw-ported until saas-15.3 included
- improves the dates utility functions (parse/format) by removing the timezone option, which is difficult to understand and has proven to be error prone
- changes the records fields value/raw_value properties in kanban templates, in order to ease their usage

[1] odoo/odoo#98413

Linked PR: odoo/enterprise#30780

closes odoo/odoo#98980

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-01 17:11:00 +02:00
Bruno Boi 78ac086539 [REF] web,*: raw_value as ISO8601 in kanban templates
This commit will make date(time) raw_value an ISO string
instead of a native JS Date.

- Before this commit
In kanban templates:
  - the raw_value property of a record's date/datetime field is
    a native JS Date object.

The problem with raw_value is that JS Dates toString
method depends on the system locale and timezone.
In the code base, the usage of raw_value for date/datetime fields
usually parse the raw_value into a luxon DateTime object
in order generally to display it in a specific format, or in order
to compare it to another luxon DateTime object (e.g. the now instant).

- After this commit
The raw_value property of a record's date/datetime field
has become an ISO8601 string, instead of native JSDate toString
format (which I recall depends on system's locale and timezone).
The ISO8601 format is easier to work with.

Part-of: odoo/odoo#98980
2022-09-01 17:10:59 +02:00
Bruno BoiandJulien Mougenot 0f49724436 [IMP] web: simplify format/parse/deserialize date(time) utils
The goal is to improve the dates utility functions (parse/format) by removing the timezone option, which is difficult to understand and has proven to be error prone.

- Rationale
When manipulating DateTime objects on the JS side, associated timezones
must be always coherent.
Until now, there were several code parts that had to check the DateTime
timezone and handle things differently in a case or another.
This sometimes lead to wrong code.
E.g. there was a bug in the DatePicker component because the DateTime
object it receives in props is in local timezone, but once it updates it
through the parse utility, the new object is in UTC.

- After this commit
The DateTime objects you'll get through deserialization or parsing are
always set in the user's local timezone.
The formatted strings you'll get through formatDate and formatDateTime
utils will always be expressed in the user's local timezone.
The formatted strings you'll get through serialization utils will always
be expressed in UTC.

- serializeDate and serializeDateTime
  - expected input: a DateTime object (its timezone does not matter)
  - outputs: a string formatted for the server expressed in UTC

- formatDate and formatDateTime
  - expected input: a DateTime object (its timezone does not matter)
  - outputs: a string formatted for the user, expressed in the user's TZ

- deserializeDate and deserializeDateTime
  - expected input: a date(time) string provided by the server, in UTC
  - outputs: a DateTime object in user's TZ

- parseDate and parseDateTime
  - expected input: a date(time) string provided by the user, in its TZ
  - outputs: a DateTime object in user's TZ

- Other changes in this commit
As the timezone option has been removed from parsing/formatting utils,
all their usage had been adapted in the codebase.
The large diff in dates_tests.js is because some tests were reorganized,
others were removed/adapted/joined.
A test has been removed from daterange_field_tests.js, because it has
no sense: it displays a date field as a datetime, but a date field does
not have any time information.

Part-of: odoo/odoo#98980
Co-authored-by: Julien Mougenot <jum@odoo.com>
2022-09-01 17:10:59 +02:00
Bruno BoiandLiu Jinjiu 49caf7c06b [FIX] web: disable timezone convert for Date field custom filters
Reproduction:
1. Install Timesheet, and load demo data
2. Mimic a timezone in browser (Chrome): Right click->Inspect->Sensors,
in the Location-> choose Other…, type “America/Puerto_Rico” in Timezone
ID, refresh the page
3. Go to Timesheets->Timesheets->All timesheets, choose pivot view
4. Add custom filter, Date is between 1st/Aug/2022 and 5th/Aug/2022,
apply
5. The filter result is correct but the tag in the search bar is “Date
is between 31/07/2022 and 04/08/2022”

This also happens to other fields with type Date, but not Datetime. For
example, in Accounting->Reporting->Invoices Analysis->Pivot view, the
same issue happens with Due Date filter. For Datetime field, it doesn’t
have the issue, for example in CRM->Sales->My pipeline, change to pivot
view, the custom filter for Assignment Date doesn’t have the time zone
issue.

Note: reproduction usually works during the daytime in Brussels.

Reason: miswriting when rewrote custom_filter_item from V14 to V15. The
value pushed to descriptionArray should not be changed on time zone.

Fix: in parseField and formatField, use default formatters/parsers options. Add test for the Date filters.

Related PR: odoo-dev@aeb8e49?diff=unified#diff-6d9230cfcd007b087b2851cbf0b4a33b26dc3c91087853da6fe7ce8c2b60e42f

Reference code in V14: https://github.com/odoo/odoo/blob/14.0/addons/web/static/src/js/control_panel/custom_filter_item.js#L170-L173

opw-2941231

Part-of: odoo/odoo#98980
Co-authored-by: Liu Jinjiu <jili@odoo.com>
2022-09-01 17:10:59 +02:00
Odoo's Mergebot 708a1739ff [MERGE][IMP] website_mass_mailing: improve newsletter snippets
These commits improve the newsletter snippet by adding a template selection to it.
One can now choose between email / sms / form templates.
The first two are composed by a unique input to allow the user subscribing with its email or mobile phone.
The last allows the user to fill up a form more thoroughly and to select more than one mailing list to subscribe to.

it's also possible for one to create a subscription form by using the form snippet directly.

Task-2672194

closes odoo/odoo#79582

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-01 17:10:54 +02:00
Patrick Hoste 766bf5e7d6 [IMP] (website_)mass_mailing: allows subscribing through the form snippet
PURPOSE

This commit adds the possibility the create a subscribing form from the
form snippet, it creates default inputs automatically.

LINKS

Task-2672194

Part-of: odoo/odoo#79582
2022-09-01 17:10:53 +02:00
Patrick Hoste ee90b7e551 [ADD] website_mass_mailing_sms: new module adding template to newsletter snippet
PURPOSE

This commit adds a new bridge module that allows one to select the SMS Template
for the newsletter block snippets that allows the user to enter his mobile phone
and get the latest news via mobile text.

LINKS

Task-2672194

Part-of: odoo/odoo#79582
2022-09-01 17:10:52 +02:00
Patrick Hoste bd6ef64f4c [IMP] website_mass_mailing: add template selection to newsletter block snippet
PURPOSE

This commit adds a template selection to the newsletter block snippet to
allow one to switch between email, mobile (added with a new module) or
form template.

LINKS

Task-2672194

Part-of: odoo/odoo#79582
2022-09-01 17:10:52 +02:00
Patrick Hoste a5a31c7e70 [IMP] website_mass_mailing: move mailing list option to parent block
PURPOSE

This commit moves the mailing list option of the editor to the parent
block to ease the configuration of a newsletter snippet.

LINKS

Task-2672194

Part-of: odoo/odoo#79582
2022-09-01 17:10:52 +02:00
Sébastien Theys aad27c38ea [FIX] mail: fix model manager isDebug
Mix of proxy and non-proxy was causing issue in set of records.

closes odoo/odoo#99388

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-01 15:33:36 +02:00
Didier (did) ac5cf64c24 [FIX] mail: remove unexisting fields from condition
closes odoo/odoo#99387

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-01 15:33:29 +02:00
Alexandre Kühn 449d76dbca [FIX] im_livechat: do not willStart when livechat unavailable
Follow-up of https://github.com/odoo/odoo/pull/98160

PR above made single app im_livechat tests sometimes fail with
following error:

```
TypeError: LivechatController.livechat_init() missing 1 required positional argument: 'channel_id'
```

This comes from RPC `/im_livechat/init` in frontend, which must
provide `channel_id` but somehow doesn't sometimes.

This only happens with `test_im_livechat_support_page`, sometimes on runbot.

Task-2969488

closes odoo/odoo#99385

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-01 15:33:25 +02:00
Didier (did) 091e54ca17 [FIX] mail: remove unexisting field from template
https://github.com/odoo/odoo/pull/98262 introduce a t-out on a field that
doesn't exist.

closes odoo/odoo#99381

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-01 15:33:19 +02:00
kir-odoo 3bb348bdde [FIX] mrp: mo split and merge fix
This commit fixes two bugs:
1) Wrong source location

    Before this commit:
    - Source location is incorrect after merging MOs and 3-step manufacturing is selected.
    - Operation type is incorrect after merging MOs

    After this commit:
    - Set the source location from the correct picking_type's value while merging MO.
    - Set the Operation type for the merged MO to be the same as the original MOs';

2) Traceback when splitting mo

    Before this commit:
    - When splitting a MO without a "responsible user" set then boom it's throwing traceback

    After this commit:
    - The "responsible user" is no longer required which matches the existing MO behavior

TaskID - 2754217

closes odoo/odoo#99374

X-original-commit: 67e3f2f66aeb1aa1a93ad5091af7c0375f6d9a93
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-09-01 15:33:15 +02:00
Lucas Perais a62768a8a6 [FIX] web: FormRenderer is responsible for focusing default field
The FormView can autofocus a `default_field` if it exists, or, the first usable
field.

This commit moves the logic to the FormRenderer, has we need this feature in the KanbanRecordQuickCreate.
Besides, it makes sense for the FormRenderer to have that responsibility.

closes odoo/odoo#99297

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-09-01 15:33:08 +02:00
Lucas Perais e8ef723a89 [FIX] web: legacyFields: put fieldId on the focusable element
Before this commit, the dom ID of a field was not put onto the legacy fields'
focusable dom node. It prevented a form view containing legacy field to properly focus
the default_field.

After this commit, a legacy field's focusable element can be focused at the init of the FormView

Part-of: odoo/odoo#99297
2022-09-01 15:33:07 +02:00
Dardenne Florent (dafl) 86feda1968 [IMP] web: kanban: drop card only when a column is highlighted
Before, when the user dragged a card outside of a column
(e.g. whitespace to the right), the card was moved to the last stage
for which the event handler for the target was registered.

Now, we move the card only when the card drop is done inside a column.

task-2459381

closes odoo/odoo#98897

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-09-01 15:32:59 +02:00
Dardenne Florent (dafl) 209a97c61b [IMP] web: kanban: highlight destination column on drag&drop
Before, the destination column while drag&drop was not highlighted.
Therefore it was not obvious for the user in which column the card
would be dropped. e.g. when the column header is not visible because
the user scrolled

Now, the destination column is highlighted when drag&dropping a card.

task-2459381

Part-of: odoo/odoo#98897
2022-09-01 15:32:58 +02:00
Dardenne Florent (dafl) 8b21056df2 [IMP] web: utils: add drag and drop helper functions
Before, it was possible to drag&drop an element from a point to another.
However it can be useful for tests to drag, make actions/tests
and then drop.

Now, the user can use the `drag` function and drop after with the
returned function.

Part-of: odoo/odoo#98897
2022-09-01 15:32:58 +02:00
William Braeckman 2b5f9114aa [IMP] website_sale,mondialrelay: add mondial relay setting
Adds a setting to enable mondialrelay from the settings just like the
other shipping methods and a way to access the configuration of such
shipping methods more easily.

TaskId-2845799

closes odoo/odoo#98156

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-01 15:32:51 +02:00
Pierre-Yves Dufays ac67e6a8df [IMP] base,{fetch}mail,l10n_it_edi,{test}mass_mailing:prevent using arch server
Prevent archiving in-use mail servers by displaying an error message that
lists where it is still used, allowing to easily identify what need to be
updated before being able to archive the mail server.

Additionally,
- prevent the use of archived server as a fall-safe
- when duplicating a mailing with an archived mail server, replace mail
server by the default one

Detailed explanation:
1. A check has been added that raise an exception when trying to connect to the
smtp server or send an email when the server is archived.
With that solution,
- testing the connection of an archived server displays an error telling that
an archived server cannot be used.
- if a mail is still sent with an archived server, mail are in error :
"Connection failed (outgoing mail server problem)"
This fail-safe ensures that no mail will be sent through an archived mail server
and that the user will get some feedback about it.

The same fail-safe for the incoming mail server has been added.

Notes:
- the connection will outlive the archiving of a mail server still allowing
to send email through the archived server until the connection is closed. But
connection are not kept for long so this shouldn't be a problem.
- it cannot be tested because the connect method return immediately in test
mode.

2. When a mail server is archived, an user error is raised if it is in-use.
The implementation relies on each module to override the method
"_active_usages_compute" in "ir_mail_server" to complete the list with
user-friendly message describing the active elements that could send mail
through the mail server. This has been implemented for:
- l10n_it_edi: server used to send e-invoice
- mail: optional server configured for template
- mass_mailing:
-- default mail server
-- active server configured for mailing

Mail server are referenced in other elements but are not active anymore, it is
just for temporary or history purpose. Those references doesn’t prevent the
archiving of the mail server:
- mail_message
- wizard survey_invite and compose_message
- res_config_settings

Task-2821516

closes odoo/odoo#91240

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-01 15:32:44 +02:00
Julien Castiaux a8b9ab083f [FIX] core: typo in cron comment
Fine tuning of 81c70a594a785

closes odoo/odoo#99383

X-original-commit: edbacffaf470ee74a111235a8b81acb858cfb2ad
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-09-01 14:17:07 +02:00
William Braeckman 30f885c877 [IMP] delivery_mondialrelay: migrate widget to owl
This commit adapts the `mondialrelay_relay` widget to use wowl instead
of legacy.

closes odoo/odoo#99380

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-01 14:17:04 +02:00
FrancoisGe 914dd0f6f9 [FIX] web: legacy x2m didn't display any columns
Before this commit, a legacy x2many field in list view mode didn't
display any columns.

The legacy_field compatibility layer passed the wrong views to the
x2many field. The x2many field was not receiving the arch that allows
it to generate its columns.

closes odoo/odoo#99344

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-01 14:16:58 +02:00
Habib (ayh) 31e381f170 [FIX] account: upload buttons on Accounting Dashboard are disabled
OWL disables view buttons that are missing attributes.
These buttons used legacy javascript, and were omitted from the accounting owl migration.

Activate those buttons.

closes odoo/odoo#99066

Related: odoo/enterprise#30815
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-01 13:08:53 +02:00
Zelong Lin 14316ddd74 [IMP] mail: group_id explicit in channel_create
follow up https://github.com/odoo/odoo/pull/94510/commits/64d01d43a0f69c29cb9ad900c7aaa6ae00d8b4e4

task-2893661

closes odoo/odoo#98875

Related: odoo/enterprise#30722
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-01 13:08:47 +02:00
minhthuy145 addc7bafc4 [FIX] base: fix helpstring
closes odoo/odoo#98540

closes odoo/odoo#99375

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-09-01 11:32:39 +02:00
Achraf (abz) a51eecbddb [FIX] web: Move context in kwargs
The context should be a key inside the kwargs object.

since https://github.com/odoo/odoo/pull/99018/commits/97cf55fc1e510b1473670863fd44a0a38047ce9c

closes odoo/odoo#99331

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-01 11:32:35 +02:00
luvi 679739a63d [FIX] web, *: fix ProgressBarField behaviors
*: survey

This commit brings back the correct behavior on blur
to the progressbar field. It turns as a text value as
soon as the user has focused out of the input. It
also removes the wrong usage of the max_value option.

The behavior was wrongly adapted from the legacy
progressbar implementation. Tests have been adapted
to assert the correct behavior.

closes odoo/odoo#98902

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-01 11:32:32 +02:00
Florian Charlier 70dbae8a01 [REF] website, *: make _search_get_details extensible
* = test_website, website_blog, website_event, website_forum, website_sale,
website_slides

`_search_get_details` extension in other modules can now be performed with
fewer lines of code by updating a search type-to-model mapping, without the
need for method override.

This will also have the benefit of slightly reducing the call stack length,
avoiding some unnecessary `if` statements and list lookups at runtime.

Task-2957361

closes odoo/odoo#98423

Related: odoo/enterprise#30946
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-01 11:32:25 +02:00
Mathieu Duckerts-Antoine 96b211cc4d [FIX] web: date picker inside a dropdown
Have a date picker component in a dropdown (like in Add Custom Filter),
open the related bootstrap datepicker by clicking on the date picker
input and select a date: the dropdown closes. In this fix, we make the
dropdown stay open in that situation.

closes odoo/odoo#99345

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-09-01 10:30:18 +02:00
Barad Mahendra cd0c245eae [FIX] project: fix the portal chatter button's visibility
Before this commit, Chatter in project sharing: the
'employees only' and 'visible' buttons are not toggled and both
are visible at same time.

So in this commit fixes the issue by making the 'employee only'
and 'visible' button as toggle button same as portal chatter.

task-2858336

closes odoo/odoo#99326

X-original-commit: eee722bb74db70a49ba88250afd0359c510e5ade
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-01 10:30:14 +02:00
Rémy Voet (ryv) 713fc48693 [REM] core: remove _check_concurrency method
`_check_concurrency` was used to check if 2 people were modifying the
same record at the same time. It was doing so by setting a special
`__last_update` value inside the context that was later evaluted to
prevent some concurrency issues.

It was mostly unused, wasted a lot of cpu cycles and was not covering
all cases (e.g. pending write).

closes odoo/odoo#87756

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2022-09-01 10:30:10 +02:00
shsa-odoo 8c8d283286 [FIX] web_editor: changing header style keep its text alignment
Before this commit:

changing header style, changes the alignment of the selection

After this commit:

Now after applying header on selection it doesnot changes its alignment.

Task-2641462

closes odoo/odoo#99358

X-original-commit: da8d2669b03e1016dc05f031a2a7ac840541962e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-01 09:23:20 +02:00
Alexandre de Pape (alpa) 3160c7c0ac [IMP] website_sale{_stock,}: automatic abandoned cart email
This commit adds automatic emails for abandoned cart.

TaskId-2907692

closes odoo/odoo#98100

Related: odoo/enterprise#30700
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-01 09:23:13 +02:00
Xavier BOL (xbo) 1b6af2addb [FIX] project_sms: cannot change task stage to stage with sms template
Before this commit when the portal user changes the stage of a task
to a stage with sms template, he got a traceback saying he has no access
to the `sms.template` model.

This commit fixes by checking if the user is a portal one to send the
sms in sudo when the write on the task is correctly done.

Steps to reproduce:
==================
1) install `project_sms` module,
2) create a project,
3) in the kanban of tasks for this project create 2 stages,
4) edit the last one to set a sms template,
5) share the project in edit mode to a portal user,
6) create a task with the quick create,
7) log in as portal user and go the project shared
8) move the task into the last stage.

Actual Behavior:
---------------
A traceback is occurred saying the portal user has no access to
`sms.template` model.

Expected behavior:
-----------------
The task should be in the last stage and the sms should be sent.

closes odoo/odoo#99363

X-original-commit: 9aa5e65273885001106a5fcc64677a284b77f61d
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-01 06:46:55 +02:00
Stefan-Calin Crainiciuc (stcc) 859351aa57 [FIX] website_sale: Added base_url to schema.org microdata tags
Steps to reproduce the bug:
- install eCommerce module with assets
- go to any product page
- check the source code with https://validator.schema.org/

Notice that the 'image' and 'url' microdata tags have no base url,
so the engine assumes http://schema.org/ to be the base url. This
makes certain ad trackers such as facebook pixel unable to detect
the product being sold.

This commit adds the base_url field to both tags so that they are
correctly traced.

opw-2830058

closes odoo/odoo#99328

X-original-commit: 6817b964156938afb1f9ef261413e76ba256067f
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-01 02:57:01 +02:00
Alexandre de Pape (alpa) fef332bec4 [IMP] website_sale{_stock,}: reorder from portal
This commit adds a new feature to eCommerce: "Reorder"
The system administrator may enable the feature in the website's
settings.
It will add a new button on a completed sales order portal page to
reorder the same content.
Upon clicking the button a dialog will pop up to configure the different
product's quantities and display any error that would prevent a product
from being added to the cart.
If the user has something in his cart already a confirmation dialog will
be prompted asking the user if they want to clear their cart before
adding the products to the cart.

TaskId-2837571

closes odoo/odoo#96040

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-01 02:56:43 +02:00
Dossogne Bertrand a91523cef2 [REM] hr_attendance: unused attendance smartbutton
On the res.users form view, a smartbutton was created to
appear in very specific situations to inform on the user's
last connexion. Since its limited usage, that button is
removed from the view.

taskID 2958115

closes odoo/odoo#98470

Related: odoo/upgrade#3839
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-09-01 01:57:09 +02:00
Romain Derie 3d7367a25e [IMP] website, *: prefer request.website over get_current_website()
* website_sale_wishlist

When request.website exists, it is supposed to be the same as the
get_current_website() result as that's exactly where it comes from.
The dispatcher, if the request is a frontend one, is setting the
get_current_website() result as the request's website.

closes odoo/odoo#98200

Related: odoo/enterprise#30691
Related: odoo/upgrade#3808
Related: odoo/design-themes#582
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-31 23:50:07 +02:00
Romain Derie d117f40e7f [IMP] website_sale: clean condition related to editor groups
- Fix linter error
- Checking only "if group B" is the same as "if group B and if group A"
  if group A implies group B, it is the case here, being a designer also
  mean being a restricted editor

Part-of: odoo/odoo#98200
2022-08-31 23:50:07 +02:00
Romain Derie 7ae60a7261 [IMP] website, *: fix wrong method naming
* website_event, website_slides

Note that `restricted_editor` is the new technical name used instead of
`publisher`

Before this commit, the `is_restricted_editor()` method was actually
checking for `designer` rights and not `restricted editor` ones.
Indeed, a restricted editor (previously publisher) never had the write
right on ir.ui.view.

Despite the method name being wrong, it was still correctly used where
we actually checked for designer rights and not publisher/restricted
editor ones.

Also, the method was checking for write access on ir.ui.view instead of
checking directly if the user had the related group.
While it wasn't really wrong, it was also including people who would
have the write right on ir.ui.view but were not part of the designer
group.
This doesn't really makes sens, as we don't want someone which received
that write right on ir.ui.view from another module (not related to the
website) to be considered as a website admin -> we don't want to show
them website admin UI and stuff like that.

The method could have simply be renamed to `is_designer()` and could
have just checked for `has_group(designer)`, but having such an helper
seems overkill, we would end up with as many utils as there is groups.

At the end, this PR:
- removes the confusing util method
- replace it by has_group checks

Part-of: odoo/odoo#98200
2022-08-31 23:50:06 +02:00
Romain Derie 5456dc499a [IMP] website, *: rename group publisher to restricted_editor
* portal, web_unsplash, website_*

This commit renames the `website.group_website_publisher` into
`website.group_website_restricted_editor`.

While the change in itself might look unuseful, it will help the dev and
tech community figuring which group is related to which feature.

Even internally when we discuss specs, we always have to remind which
group is the restricted editor: the publisher one or the designer one?

While it is probably, after all those years, now anchored in some dev
mind, there is no easy way to directly figure which of those 2 groups is
the restricted editor one.
Note that I myself always got confused about it.

Now, the "Restricted Editor" right will be reflected in its technical
name `group_website_restricted_editor`.
Same as for the "Editor & Designer" which technical name is
`group_website_designer`.

As we would like to have a fully working and ready system in v17 for the
community to be able to build themes easily, removing that dubious part
is a nice to have.

Part-of: odoo/odoo#98200
2022-08-31 23:50:06 +02:00