Commit Graph
168927 Commits
Author SHA1 Message Date
Odoo Translation Bot 95a4b6dfdc [I18N] Update translation terms from Transifex 2024-01-21 00:17:03 +01:00
Tiffany Chang (tic) 04e5bfe61e [I18N] gamification: ensure translation of orig motivational messages
For some reason the demo data for some of the ranking motivational
messages is different from their default motivational message (in data).
Because of the way the `translate=html_translate` works, when the demo
data was installed, the original motivational message was overwritten
and therefore not exported in the .pot file so it could never be
translated. Since we want both the demo and original messages
translated, it's best that we add the original messages into the demo
data so that it's not visible to users, but is still exported to the
.pot file.

closes odoo/odoo#150306

X-original-commit: 2f3aafe55ee39a3661477934f63b2a5c90f724a5
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2024-01-20 10:46:54 +00:00
kcv-odoo 865c08ec4d [FIX] partner_autocomplete: correct test cases to check proper conditions
This commit fixes test case to properly target auto
complete block to check auto complate feature is working
as expected or not.

task-3690532

closes odoo/odoo#150279

X-original-commit: b556b7c309530cede3577a3bfc884b1fe821537c
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
Signed-off-by: Kartik Chavda (kcv) <kcv@odoo.com>
2024-01-20 09:33:38 +00:00
kcv-odoo 6bbdd15817 [FIX] partner_autocomplete: fix quick creation issue
Before this commit auto complete suggestion were showing on partner field even though there
is no_create attribute on partner field and because of that user can create partner record
from that field even though user is not allow to create record from it and also it gives
trackback in partner portal field because of access_token.

This commit prevent auto complete suggestion when partner field has no_create attribute
set on them to avoid unnecessary partner creation from that field.

task-3690532

X-original-commit: ba2edab747db2c89d06feb9422d7f53a759766ae
Part-of: odoo/odoo#150279
2024-01-20 09:33:38 +00:00
Christophe Monniez 8b8819c494 [FIX] sale_mrp, sale_mrp_margin: deduplicate tests
By inheriting from a test class that contains test methods, these tests
are executed twice.

closes odoo/odoo#150272

X-original-commit: 835f600eac6fd1ec202cd21876457b14d3d0af06
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2024-01-20 09:33:37 +00:00
Christophe Monniez 2c16088298 [FIX] barcodes_gs1_nomenclature: deduplicate tests
When inheriting from a test class having tests methods, the tests are
played twice. In this particular case, the inheritance was not necessary
at all.

closes odoo/odoo#150287

X-original-commit: 839fa009f3f032cb45c56acfe237933bf0fb69c9
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2024-01-20 08:22:27 +00:00
Trịnh Ngọc Hưng c80fec8f15 [FIX] l10n_vn: VN account chart template use_anglo_saxon as False
- Because default use_anglo_saxon is False

closes odoo/odoo#150278

X-original-commit: fba0b2abda1fb2a101b6bfb0be93d21a2919388e
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-20 05:31:55 +00:00
Brice bib Bartoletti be3058bfb6 [FIX] sale: downpayment invoice and credit note
The aim of this commit is to fix the computation behavior of the downpayment
line of the sale order.

Context:
Create a sale order and invoice a down payment.
Make a credit note for the downpayment invoice for a part of the
invoice's amount.

Before the commit:
The downpayment line on the sale order gets its price_unit updated to
the amount of the last credit note.

After the commit:
The downpayment line on the sale order gets its price_unit updated to
the sum of the amount of all linked invoice.

closes odoo/odoo#150274

Task-id: 3634439
X-original-commit: 48995672ed58c99b1d8b143225a6535104d3bf8d
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2024-01-20 05:31:54 +00:00
Adrien Widart (awt) 3689958cac [FIX] stock_landed_costs: create LC in multi-comp setup
To reproduce the issue:
1. Create two companies C1, C2
2. Select C1 and enable C2
3. Confirm a PO with a FIFO product in C2
4. Process the receipt
5. Bill the PO with a landed cost
6. Generate and post the LC

Few errors will happen: on the LC, the journal used belongs to C1,
not C2. Another one: in C2, on the product's form view, the standard
price does not include the LC

OPW-3651022

closes odoo/odoo#150200

X-original-commit: 0b623378b3664d428d9146b99b3fa050d76b0e99
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2024-01-20 05:31:53 +00:00
Sébastien Theys fa9815afa7 [FIX] mail: fix chatter reaction crash before init messaging
store.self is not necessarily known when the chatter is rendered

closes odoo/odoo#150103

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:43:06 +00:00
lejeune quentin de1ff5b166 [FIX] hw_drivers: Fix default value for iot_client on boot
If an IoT doesn't have a DB recorded, the IoT client can't have an
url.
So the Websocket can't parse a empty string and return a traceback.

With this commit we check if there are a DB else iot_client is None

closes odoo/odoo#150089

Signed-off-by: Yaroslav Soroko (yaso) <yaso@odoo.com>
2024-01-20 02:43:05 +00:00
tsm-odoo cfea1ace7a [FIX] mail: fix ptt extension not working after worker wake up
The Ptt extension makes use of the `chrome.session` API to keep track
of the connected clients. Before this PR, the session storage was
initialized at the top level of the background script. This is an
issue since it will be executed after the service worker wake up thus
overwriting the existing client map. This PR removes this

closes odoo/odoo#150084

Initialization: the map will be created when needed instead.
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:43:04 +00:00
Xavier Bol (xbo) 2ddc00f9af [FIX] web: display "Remove Cover Image" button
Before this commit, when a kanban card has cover image set and the user
would like to remove it, he does not have the "Remove Cover Image"
button displayed when he goes to KanbanCoverImageDialog. The reason
is because the condition on `t-if` set on that button is always
falsy because `coverId` is undefined in the component.

This commit defines getter called `hasCoverImage` to return true
if the record displayed in the kanban card has cover image set.

task-3623759

closes odoo/odoo#150033

X-original-commit: c5d1894804c590dec208755e93d21f249714721d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-20 02:43:00 +00:00
mjvi-odoo db05ddcf10 [FIX] web: 'upload and Set' button not functional in project task cover image
Steps to Reproduce:

Navigate to Project.task kanban view.
- Attempt to set a cover image.
- Observe the non-functional 'upload and set' button.

Issue:
- The 'upload and set' button in the Project Task Cover Image is unable to click

Solution:
- Resolved the issue, ensuring the 'upload and set' button functions correctly
  for a seamless cover image setting in Project Task.

task-3623759

X-original-commit: fc531640dedf7c8a576ed43d8e27a0c1054ec512
Part-of: odoo/odoo#150033
2024-01-20 02:43:00 +00:00
Christophe Monniez e4dc9a32db [FIX] mrp_account, stock_account: deduplicate tests
When a test case class inherits from another class that has test
methods, those tests are executed again for both classes.

While it could be done on purpose, it does not seems to be the case
here. Moreover, in this particular case, we are talking about 51 tests.
Also, as the child class is tagged `post_install` those tests are run
again on runbot in a post install build.

closes odoo/odoo#150028

X-original-commit: ee747ae5c68871d58647a263d54bb658ef43eece
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2024-01-20 02:42:59 +00:00
Nicolas Viseur (vin) 74d7ad5185 [IMP] l10n_au: Update 100% EX Taxes
The computation of such taxes were wrong, thus we
update the tax template to correct the computation
and the tax tags.

Task id # 3645628

closes odoo/odoo#149978

X-original-commit: 4fb468be5b40a4eb426dee293526ef48eb826e15
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2024-01-20 02:42:58 +00:00
Xavier Bol (xbo) 58b8b5c56f [FIX] project: use new field open_task_count to display open tasks in project
Before this commit, when the task_count is too huge, the number of
open tasks displayed in each kanban card of project returns `NaN` value
the reason is because, for instance, the number is 1026 and using `value`
will format the value and return `NaN` when the soustraction is made
between 2 numbers formatted (task_count - closed_task_count).

This commit introduces a new field called `open_task_count` to get
the number of open tasks and use it in the kanban instead of doing
the soustraction between `task_count` and `closed_task_count` fields
since we cannot really format the result.

closes odoo/odoo#149637

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-20 02:42:55 +00:00
Alexandre Kühn 9b3a0b4aa0 [FIX] mail: no crash on edit message in mobile
Before this commit, editing a message in message in a conversation
and then pressing on the paper plane icon was throwing the following
error:

```
TypeError: null is not an object (evaluating 'thread.model')
@_sendMessage
```

This happens because this button was in "send" message mode rather
than in edit mode. Since we cannot post a message while editing a
message, the crash happens because composer is not related to thread
but the message.

This button is not visible in desktop mode, and user should use
suggested keyboard shortcuts or click on links to either save edit or
discard it. In mobile, these interactions are not intuitive.

This commit fixes the issue by keeping the paper-plane button while
editing in mobile but it acts as "save". The labels to save/discard
was not appropriate in mobile, so it has been turned to a simple
button to discard editing.

opw-3670482

closes odoo/odoo#148918

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-20 02:42:54 +00:00
Martin Trigaux 6f4dad6f28 [FIX] website_slides: do not subscribe portal user
Everytime somebody leaves a review, it sends a message to every
follower of the subtype "Discussion". Portal users were subscribed
without realising it.

Issue 1:
When subscribing via the controller, a user was subscribed to the
"Discussion" subtype instead of "Presentation Published".

Issue 2:
When requesting access, if there is no responsible for a channel, the
activity_schedule method fallback on the current user (portal) and
subscribe him to the channel at the same time.
If there is no responsible, there is nobody to request access to.
Disable the o_wslides_js_channel_enroll to hide the request access
popup and skip the activity_schedule if the method was called anyway
(i.e. fix for stable without updating the view)

DELETE FROM mail_followers_mail_message_subtype_rel r
 USING mail_followers f,
       res_users u
 WHERE u.partner_id=f.partner_id
   AND r.mail_followers_id=f.id
   AND r.mail_message_subtype_id=1
   AND f.res_model = 'slide.channel'
   AND u.share = true;

closes odoo/odoo#145742

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-20 02:42:51 +00:00
remi-filamentandFlorian Gilbert 2ecbfdb363 [IMP] account,*: new method in ir_action_report returning if invoice
*: account_edi, l10n_ch

closes odoo/odoo#149810

X-original-commit: 9dae0a06a1f77355ed1cdf7a605d085e640b974c
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Co-authored-by: Florian Gilbert <flg@odoo.com>
2024-01-20 00:29:56 +00:00
tsm-odoo 4380131b52 [FIX] mail: fix non deterministic retry loading messages test
Before this PR, the "Retry loading more messages on failed load more
messages" test was sometimes failing. This test uses the `afterEvent`
helper to wait for the load message event to occur. This is too
technical and not reliable: this test just ensures that clicking on
the retry button after failing to load more messages work as expected.
This PR simplify this test and make use of the `contains` helper which
is more reliable to do so. First, 30 messages are loaded, then the
retry button appears and finally, clicking on the retry button should
load 30 more messages for a total of 60.

fixes runbot-53201

closes odoo/odoo#150012

X-original-commit: 6c1f3f0a24913484042148b7101ec6a628d5b8be
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-01-19 23:00:54 +00:00
Mahamadasif Ansari 7842deecd1 [FIX] mass_mailing, website: add markup in tour content
Current behavior before PR:
  - HTML tags are displayed in the onboarding tour.

Desired behavior after PR is merged:
  - Display the HTML tag effects instead of showing it in the onboarding tour.

After the https://github.com/odoo/odoo/pull/107618 web_tour was converted into
Owl, 'markup' was required to show the html tag effect instead of htm tags.

Related Enterprise PR-https://github.com/odoo/enterprise/pull/53893

Task-3457112

closes odoo/odoo#149957

X-original-commit: c26ba2943317e82388bc05adfd64fa729923a86b
Related: odoo/enterprise#54622
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-19 21:25:47 +00:00
Louis (wil) 34b81203da [FIX] sale: make "Down payment invoice" translatable
Nested gettexts aren't exported. This commit solves the problem by
moving the inner gettext outside of the arguments of the first gettext.

closes odoo/odoo#149921

Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2024-01-19 21:25:46 +00:00
Ruben Gomes (rugo) a819d7190c [IMP] odoo.tools: add tests to formatLang()
Tests the method formatLang() to be able to do safe(r) refactoring in future versions.

closes odoo/odoo#149775

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-19 19:10:54 +00:00
Michael (mcm) 178e28b467 [FIX] web: batch position updates
Before this commit, a component that uses the `usePosition` hook could
trigger multiple position update in the same tick and the update would
be call as much as it was called.
In this commit, the hook batches the calls to the update to call it
once.

closes odoo/odoo#149655

Task-id: 3673493
X-original-commit: 12fbf33aca2e9efafbb94337d9c3b538779d9f6c
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2024-01-19 19:10:53 +00:00
Michael (mcm) 86d00f1053 [FIX] web: fix searchbar menu position
Before this commit, the searchbar menu was misplaced after opening the advanced search dialog.
After this commit, the searchbar menu is always at the correct position.

Task-id: 3673493
X-original-commit: 19d40f48fb98b28b7fd49b79581ac0ac5fcecc87
Part-of: odoo/odoo#149655
2024-01-19 19:10:53 +00:00
Josse Colpaert 6628d2b4e7 [FIX] l10n_es_edi_tbai: FechaOperacion should be set when the invoice date is different than today
closes odoo/odoo#149538

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-19 15:21:50 +00:00
Josse Colpaert 07d2cea85d [FIX] l10n_es_edi_tbai: in the newer versions of Ticketbai we can have 8 decimals
opw-3685542

Part-of: odoo/odoo#149538
2024-01-19 15:21:50 +00:00
Abdelouahab (abla) 1acd0b6c5d [FIX] hr_attendance: fix checkin/checkout on iOS
To reproduce
============
- With hr_attendance installed on ios application
- click on small button (green/red) to checkin/checkout
- nothing happens

Problem
=======
the method `signInOut` is failling because `navigator.geolocation` is
not defined on iOS

Solution
========
check if `navigator.geolocation` is defined before using it

opw-3649654

closes odoo/odoo#149518

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-01-19 15:21:49 +00:00
amdi-odoo f232abd716 [FIX] web: fix percentpie value rounding
Fix the rounding of the percentpie field value as it was sometimes
displaying a very long number due to python rounding precision.
The value is now displayed rounded to 2 decimals without trailing zeros.

Task-3648755

closes odoo/odoo#149226

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-19 15:21:47 +00:00
Lucas Perais e7a511b7b5 [FIX] web: nested subviews pieces do not pollute main view
Have a nested (2 levels) form view with a footer.
On the main view, add a record in the one2many in form view (dialog).

Before this commit, the footer of the nested one2many form (within the dialog) was
put inside the footer of the dialog, which is wrong, as the footer originates
from a subview, hence has nothing to do with its parent.

After this commit, each subview's part that should be rendered elsewhere than
in the main formRenderer doesn't pollute the main view.

opw-3681966

closes odoo/odoo#150010

X-original-commit: 4891753cc3ef1a6a1daa36ecd70e79e7410e9bb0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2024-01-19 13:13:55 +00:00
guva-odoo 461ac4cb3a [FIX] analytic: all accounts count wrong on sub plans
When having an analytic plan with subplans, with analytic
accounts on each, the all accounts count is not well computed
on the subplans.

opw-3677889

closes odoo/odoo#149898

Signed-off-by: William André (wan) <wan@odoo.com>
2024-01-19 13:13:53 +00:00
fkantelberg 988d228830 [FIX] hr_holidays: fix read access error when a normal user writes on leave
Description of the issue:
When a user without rights on time off writes to a previously created hr.leave an access
error is raised because of reading employee_ids. This happens becausethe field is
restricted to the group hr_holidays.group_hr_holidays_user and it's used in _check_date.
To prevent this all_employee_ids should be used because of the compute_sudo set.

Current behavior before PR:
Access error on save

Desired behavior after PR is merged:
No access error on save

closes odoo/odoo#149308

X-original-commit: 10d3d0b43fbb336d823cec9e68b68651298678cd
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-01-19 11:40:35 +00:00
Paul Stroobant 94052e51ac [FIX] website_forum: reintroduce last post in forums front page
Steps to reproduce:

1. Create multiple forums
2. Click on edit in Forums front page
3. Toggle Last Post button
4. No Last Post is shown

Explanation:

The Last Post element was removed from the `forum_all_all_entries` template in *v16.4*.

Fix:

Recreate the Last Post, mixing the behaviour and look of *v16.3* (clickable title, truncated text) and the look of *v16.4* (badge with dark background).
The `<object>` tag wraps the inner `<a>` tag to avoid nested links issues.

opw-3558730

closes odoo/odoo#149993

X-original-commit: 105442a33725e1179f3b5f8955aa4fc6a6c9d638
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2024-01-19 09:15:29 +00:00
mebe-odoo b1461d2879 [FIX] l10n_sa_edi: fix access issues for non-admins
Currently, when a user that is not part of the 'base.group_system' group, they are unable to submit invoices to ZATCA and print B2B invoices since the QR code requires the use of the l10n_sa_production_csid_json fields. To fix this, we mark the l10n_sa_qr_code_str as compute_sudo=True and use sudo when we try to sign XML before submission to ZATCA

 X-original-commit: ddeb47e8fd0ed8385492d50cc0d8c30b631bfb21

closes odoo/odoo#149979

X-original-commit: 84224f7bb6ba28228351fc86eeb24e054622f9d6
Signed-off-by: Josse Colpaert <jco@odoo.com>
2024-01-19 07:59:48 +00:00
Alexandre Kühn 8b5f8dea8b [FIX] mail: open chat window from home menu reliably
Before this commit, opening chat window from messaging menu
might not work.

Step to reproduce:
- open Discuss app
- Go to home menu
- Reload the page
- Click on Messaging Menu
- Click on chat item to open chat
=> Chat window is not open

This happens because when in the home menu from Discuss app
in background page reload, the URL contains the Discuss app
menu_id, but the action is "menu" rather the action id. This
difference is crucial to distinct discuss app being actively
open or it's in the background from home menu. The latter
should NOT consider Discuss app being open.

This is not a problem when opening/closing Discuss app, because
the mounting/unmounting of the Discuss app component is good
enough to detect that. However, with page reload, the way to
detect Discuss app being open from URL was only relying on `menu_id`
instead of `action` value.

This commit fixes the issue by checking `active_id` of discuss app
rather than `menu_id`, as `active_id` is 100% reliable whereas
`menu_id` is not. The problem with home menu is one example among
many other cases (e.g. page reload in channel settings form view).

closes odoo/odoo#149969

Related: odoo/enterprise#54638
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-19 05:20:52 +00:00
luvi c1d250fcbc [FIX] web, *: show a dismiss button in the PWA notification
*: mail

This commit fixes the behavior of the notification to install the PWA.
The initial spec was not completely achieved, since the 'Dismiss' button,
using the fa-close icon was not present. See task-3275275.

Now, the button is present, and it can hide the notification and the user don't
need to interact with the installation prompt to dismiss it.

The fix also fixes the behavior of the notification when being used in
an incognito tab. The installPrompt service assumed the PWA could be
installed, since window.BeforeInstallPromptEvent is defined. But in an
incognito scenario, the event was never actually triggered, since the
feature is disabled by the browser.

This could finally create a UX issue if the app had been installed, and the
localStorage cleaned. The notification would appear, but wouldn't do anything
when clicking on the Install button since the event is no longer triggered by
the browser. Now, we rely on the trigger of the event exclusively, except on
Safari, where we rely on the installationState and the standalone display-mode.

Now, the service only set its state when the event has effectivelly been
triggered and the native prompt can be called. Since the UI relies on the
state from the service, the notification is no longer shown.

Tests have been adapted, to dispatch a custom event, allowing the service to be
initialized as if it was in a situation where the PWA can be installed effectively.
A new test have been added to verify the interaction with the close icon.

closes odoo/odoo#149961

Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2024-01-19 01:36:10 +00:00
tsm-odoo 13f4d046f7 [FIX] mail: update html fields according to html insert option
Since [1], the `insert` method accepts the `html` option to
automatically cast record fields marked as `html` to markup. Before
this PR, this option was ignored after the first insertion if the
field value remained the same.

Steps to reproduce this issue:
- Insert a message without passing the `html` option: the body field is
an instance of string.
- Insert the same message setting the `html` option to true: the body
field of the message is still an instance of string while it should be
an instance of markup.

This PR fixes this issue.

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

closes odoo/odoo#149953

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-01-19 01:36:09 +00:00
Alexandre Kühn c22fa19636 [FIX] mail: new message notif on channel only with needaction
Before this commit, any new message in a channel of type "channel"
was automatically opening a chat window and showing new message
counter in tab title when out-of-focus.

This behaviour is only intended for important messages. In chat
(group chat, DM chat, livechat), all new messages are considered
as important so this is good. However, for channels, these are
intended for communication with many users, and we only want to
notify on messages that are explicitly flagged as "needaction".
As a reminder, message are needaction through `@mention` or
reply-to for example.

This commit fixes the issue by limiting notifying out-of-focus of
new messages in channel "channel" to only needaction. Also the
auto-opening of chat window as a consequence from this new message
is also limited to needaction messages.

closes odoo/odoo#149943

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-19 01:36:08 +00:00
Daniel Blanco 09016beb99 [FIX] l10n_cl: fix terms in english that are wrongly defined
[I18N] l10n_cl: fix origin for translation terms

closes odoo/odoo#147528

Signed-off-by: Josse Colpaert <jco@odoo.com>
2024-01-19 01:36:07 +00:00
Mehdi Outagant (MOU) 3b569aed65 [FIX] website_payment: fix Stripe payment base URL configuration
Steps to reproduce:

- Configure a non-ASCII custom domain (Punycode encoded) on a database
(e.g. `test-môu.com` <> `xn--test-mu-y0a.com`).
- Setup test API keys on a Stripe account ("Publishable" & "Secret").
- Install and activate the Stripe payment acquirer (in "Test Mode").
- Go to the Stripe Odoo config (Invoicing > Payment Acquirers > Stripe).
- Configure Stripe API keys and click on the button to "GENERATE YOUR
WEBHOOK" > traceback: `Invalid URL: Non-ASCII characters in URLs must
be percent-encoded in order for the URL to be valid`.
The same error occurs in every interaction with the Stripe API.

The `get_base_url()` refactoring (exactly [1]) introduced a way to get
the most suited URL for a record in the following order:

`record.website_id` > `record.company_id.website_id` > The ICP:
`web.base.url`.

For payment acquirers, and to handle multi-website scenarios, the code
uses the base URL: `httprequest.url_root` which explains why the error
occurs even when the domain name is configured in punycode.

The goal of this commit is to fix this behavior by correctly encoding
the returned base URL.

[1] https://github.com/odoo/odoo/commit/92175d3341b576676a550c60db7c759f71cb17ea

opw-3619608

closes odoo/odoo#149947

X-original-commit: ffb19d0481f623c969266b14dce2b78127ec2391
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2024-01-18 23:10:29 +00:00
Alexandre Kühn 9f24bb72ec [FIX] mail: discuss jump to present scrolls reliably
Before this commit, when looking at old messages of a message,
clicking on "Jump to present" was frequently not scrolling to
most recent message.

This happens because loading messages is not immediate, and thread
UI has some heuristics to adjust scrolls that were working against
scrolling to present when the RPC to load messages around present
is not immediate.

This commit fixes the issue by handling the actual scroll to present
in the same workflow as all other scroll adjustments. Also the logic
for adjusting scrolls requires immediate scrolling, hence this commit
has to remove smooth scrolling to comply with current scroll
adjustment techniques.

closes odoo/odoo#149915

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-18 23:10:28 +00:00
nda 64c995384d [FIX] mail: use chatter on archived record
The webclient returns a message "server error" if you add an attachment or send
a message on an archived record chatter.

steps to reproduce:
- archive a record (ex: a partner)
- send a message on the chatter or add an attachment

before this commit:
- a popup error is raised "server error"

after this commit:
- the chatter is working properly on archived records

opw-3689169

closes odoo/odoo#149862

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-18 21:49:42 +00:00
roen-odoo 70f3b748f7 [FIX] point_of_sale,l10n_be_pos_sale: invoice settled order
Current behavior:
?In Belgium? when using a EU intracom tax, as we need to report those
special sales to the government we need to create an invoice as we need
to report the customer name, VAT number and the country where the goods
are going to end up

Steps to reproduce:
- Create an order with a product and a tax (0% EU M)
- Settle the order in the PoS and pay it (no invoice)
- Go to the accounting and check the EC Sales List report
- There is an error shown in the report

opw-3514737

closes odoo/odoo#149239

X-original-commit: bea9ab596950967873766434787e705ccfe04839
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-18 20:16:02 +00:00
Kartik Chavda (kcv) d89b6556d6 [FIX] web: fix record saving issue
Steps:
- Open the Project module.
- Open any project.
- Add a subtask.
- Without manually saving the subtask beforehand, click on 'View'.
Form view of sub-task opens that doesn't have any of the fields it should
inherit from its parent task.
- Go back to the parent task using the breadcrumbs.
- Click on 'View' again. Now, the sub-task has all of its fields set as it should.

Issue:

- After clicking on 'View', the form view of the sub-task opens, but it doesn't
have any of the fields it should inherit from its parent task.

Cause:

- On clicking 'View', the switchToForm action is called, and this action
doesn't save records before switching to the form view. Also, it should load
that record into the Parent task after saving. In other modules, when clicking
on 'View', the openRecord action is called,  which is also not saving data.

Fix:

- Records should be saved when the action is called on clicking 'View'.
For the project module, when the action is called, after saving the record,
it should also load records in the parent task.

task-3631285

closes odoo/odoo#147665

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-18 20:16:01 +00:00
sabr 5e38390f47 [FIX] mail: content getting overlap over emoji icon
Steps to Reproduce : 
1. Open Email Marketing
2. Type a long text in the subject line
3. You will notice that the content gets overlapped over the emoji icon

Observed behavior:
content getting overlap over emoji icon

Expected behavior:
the content should be hidden by the emoji icon

Task-3628324

closes odoo/odoo#149918

X-original-commit: 80c96838a4d16a821aaf11e04ca2776f6a884507
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Sanket Brahmbhatt (sabr) <sabr@odoo.com>
2024-01-18 15:12:01 +00:00
Mahdi Cheikh Rouhou (macr) 4a3e8e8281 [FIX] website_sale: show payment method on change delivery
Issue:
======
Payment methods doesn't show when updating delivery method

Steps to reproduce the issue:
=============================
- Install website_sale
- Activate coupons and promotions in settings
- Create a coupon program with the follwing values : reward: discount,
  percentage: 100%
- Save the program and generate some coupons
- Activate at least 1 free delivery method and 1 free delivery method
- Activate at least one payment method
- Go to shop add anything to cart
- Apply one of the codes from the generated coupons
- Go to confirm order and change between the delivery methods.
- If the default delivery method is free, the payment methods will never
  show , otherwise they will always show.

Origin of the issue:
====================
The payment methods were rendered using `t-if` directive which means
that we can't toggle it dynamically since they don't exist in the view.

Solution:
=========
we reload the page only when we toggle from zero to non zero total.

opw-3662606

closes odoo/odoo#148431

closes odoo/odoo#149487

closes odoo/odoo#149909

X-original-commit: c88eaa301544d470088d5295028910364ebb34cf
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2024-01-18 15:12:00 +00:00
Mahdi Cheikh Rouhou (macr) 2b65959cdc [FIX] web_editor: sign documents with safari 15.4+ with ios
Issue:
=====
Users with IOS can't sign with safari.

Steps to reproduce the issue:
=============================
- Install sign
- Make sure you have a template which has at least one signature sign
  item.
- Share the document and open the link with ios on safari in v 15.4+
  (browserstack) for example.
- Go to the signature sign item and use auto and click sign or sign all
- Nothing will happen.

Origin of the issue:
====================
https://github.com/niklasvh/html2canvas/issues/2864

Solution:
=========
https://github.com/niklasvh/html2canvas/issues/2864#issuecomment-1111044861

opw-3660682

closes odoo/odoo#149903

X-original-commit: f11723f406f2af95090bdd13e9acb30c89014638
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2024-01-18 15:11:59 +00:00
Paul Stroobant 98b1346bb9 [FIX] product: remove extra content option on dymo format label
Steps to reproduce issue:

1. Go to Products.
2. Select a Product with an existing Barcode.
3. Click on Print Labels.
4. Select Dymo as format, add Extra Content, Confirm.
5. Extra Content is not shown.

Explanation:

The Extra Content is pushed out of the label by the other elements.

Suggested fix:

Remove Extra Content to make up for lack of space. Approved by PO (thd) and already removed on other label formats.

opw-3614842

closes odoo/odoo#149843

X-original-commit: 0cf6e768d8c307e4d6c9b85b78664dd82d8a4416
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Stroobant Paul (stpa) <stpa@odoo.com>
2024-01-18 15:11:58 +00:00
Jay Savaliya 2fa8c6e208 [FIX] website_slides: retrieve space between checkbox and label
This commit retrieves space between checkbox and label in course groups from
view which may be lost in a major owl refactor(https://github.com/odoo/odoo/commit/48ef812a635f70571b395f82ffdb2969ce99da9e) in form view.

Task-3557567

closes odoo/odoo#149811

X-original-commit: a07e63a0e511a5e382f83da3555d4a469d3f12f4
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-18 13:46:51 +00:00