Commit Graph
164301 Commits
Author SHA1 Message Date
luvi 25b992cccc [FIX] web: reduce command palette tip
Before this commit, the tip explaining how to open in a new tab was
long and innefficient.

This commit simply remove obvious "to open" text from the tip, which
makes the dialog less cluttered.

The corresponding translation file has been updated as well to update
the appropriated terms.

closes odoo/odoo#132602

X-original-commit: 871a988f91e7f4190999a89afa854f4ed83a4fa2
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-21 21:00:18 +02:00
Sébastien Theys d08a18b791 [IMP] mail, *: tests: use contains in click and insertText
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail, web, website_livechat

`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

closes odoo/odoo#130451

Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-21 21:00:03 +02:00
Sébastien Theys 9a1efcbde7 [REF] mail, im_livechat, mrp: rename waitUntil to contains
`await contains` is shorter and reads better than `await waitUntil`.

Part-of: odoo/odoo#130451
2023-08-21 21:00:02 +02:00
Sébastien Theys 3f8544d906 [IMP] mail, im_livechat: tests: add assert to waitUntil
`QUnit` tests require at least one `assert`. This change allows to write
tests that only contain `waitUntil` without extra `assert` in the test.

`waitUntil` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

Currently existing tests that contain `waitUntil` have been adapted
accordingly. More and more tests should make use of it in the future.

Part-of: odoo/odoo#130451
2023-08-21 21:00:00 +02:00
Mahdi Cheikh Rouhou (macr) c9cbd5bf58 [FIX] web : display timepicker in ltr direction for rtl lang
Issue:
======
The time display for rtl language is the sale as ltr but in the
timepicker it's displayed as seconds-minutes-hours which is wrong.

Steps to reproduce the error:
=============================
1-Install calendar
2-Change the language to Arabic
3-Go to calendar and click on create new
4-Click on the datepicker for start for example and click on select time

Solution:
=========
I made the display of the datepicker independant of the direction of
language and alwyas display it in ltr direction.

opw-3423875

closes odoo/odoo#132589

X-original-commit: 3e21b50ef51b9f3ebf06b5cd16e3b11497b56896
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-08-21 19:57:59 +02:00
Mahdi Cheikh Rouhou (macr) e43ee20eb0 [FIX] account, web: display total and subtotals correctly rtl lang
Issue :
After the last fix https://github.com/odoo/odoo/pull/124663
there is still an issue of currency placements and alignement
of numbers in rtl language at the total and subtotals.

Steps to reproduce the isse :
1-create an invoice and confirm it.
2-install accounting
3-go to accounting/customer invoices and choose the created invoice

Origin of the problem :
The fields displayed didn't have the appropriate classes and the
style for number and monetary values for rtl language is missing from
the css folder.

Fix:
I applied the class on the `td` tag and `span` tag.

opw-3295573

closes odoo/odoo#132572

X-original-commit: e3eb140fb431aa1fc08e718d79f332c50e86c079
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-08-21 19:57:55 +02:00
dhba-odoo 6a35f242a7 [FIX] web_editor: color pallete flicker
Before this commit:

After applying formatting styles to text that already has some color applied to
it, we encountered an issue where the color pallete would flicker when
attempting to change the color.

After this commit:

Now, the color palette will no longer flicker when trying to change the color of
text that has formatting styles applied to it.

task-3417998

closes odoo/odoo#132561

X-original-commit: 7a9977882b0e9222beba7de23f026de937a60a4d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-21 19:57:50 +02:00
althaf shaik f16b92a8af [FIX] event: handle error in res partner while evaluating static map url
This traceback raises when user click 'send by email' of 'event registration'.

Error: 'Expected singleton: res.partner(20, 19)'

On '_compute_static_map_url_is_valid' method self is referenced to get
'static_map_url'.
when self is having multiple records, it is used to get
'static_map_url', which leads to above traceback.
See:
https://github.com/odoo/odoo/blob/6f45bf0f496db37b28e8c4f8cc23b0eeec683c90/addons/event/models/res_partner.py#L32-L40
sentry-4359170170

closes odoo/odoo#132560

X-original-commit: 1da387373f772c487fa7391aa24be57b464bb5f3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-21 19:57:46 +02:00
niyasraphy fe593090cc [FIX] hr_attendance: error in log on exporting translation
before this commit, on exporting the translation of
hr_attendance module shows warning in the log

* XML declaration allowed only at the start of the document
* Opening and ending tag mismatch: t line 4 and templates

after this commit, no warning/error will be shown
in log

closes odoo/odoo#132530

X-original-commit: def572bc161540dc223e78805a8152b7418f5a28
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-21 19:57:36 +02:00
Mahdi Cheikh Rouhou (macr) 0e2a431fc9 [FIX] sale_product_configurator: edit product with variants sale line
Issue:
======
When you edit an already saved product line which has variants it will
throw an error.

Steps to reproduce the error:
=============================
1-create 2 products having at least one variant each and make them
storable
2-create a sale order and add only the first product and save the SO
3-edit the sale line of the first product with the second product and
try to save it

Origin of the problem:
======================
When retrieving combination we didn't check that the variants are
associated to the product.

Solution:
=========
Try to get the variants that are associated to the product , if there is
no such variants we apply get_first_possible_combination

opw-3423065
opw-3450266

closes odoo/odoo#132527

X-original-commit: 06d18005762377c5188c5537ba4d17c4efd66948
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-08-21 19:57:31 +02:00
Soukéina Bojabza eded9a301c [FIX] web_editor, *: correctly set the ProgressBar component props
*: web_unsplash

Before this commit, if we were in debug mode, when we tried to replace
or add an image, a traceback appeared when selecting an Unsplash image
for the first time or when uploading an image of size 0 (also for the
first time). Note that once the traceback was closed, it did not
reappear until the page was refreshed, but the progress bar was not
displayed anymore.

It happened because in debug mode, there is a validation of the
different owl components props and some props of the `ProgressBar`
component were not correctly set when adding Unsplash images or empty
image files, causing the props validation to fail. Those props
definition were incorrectly added with [1].
The traceback was not reappearing because the `UploadProgressToast`
component (= the parent of `ProgressBar`) has been destroyed and so the
props validation was not done anymore since the components were not
there.

This commit fixes these issues by correctly setting the `ProgressBar`
props and by adding default props, in order for them to always have a
value when omitted.

Steps to reproduce:
- Activate the debug mode.
- In edit mode, drop the Text-Image snippet.
- Double-click on the image to replace it.
- Type something in the search bar and select an Unsplash image or
upload an empty image file.
=> A traceback appears.

[1]: https://github.com/odoo/odoo/commit/886f3de768b647f4b402c97098abf274d6258f75

opw-3413299

closes odoo/odoo#132377

X-original-commit: 425dfb07f21288caf56bceea3a86e0b7ecac4a91
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-08-21 19:57:16 +02:00
Antoine Dupuis (andu) bfaccfcdae [IMP] l10n_ro: Minor changes for l10n_ro_saft
For the l10n_ro_saft module that generates the D.406 declaration, we
needed to:
- create a new export tax specifically for services (which should be
  reported separately from goods); and
- make sure the Bank, Outstanding Receipts and Outstanding Payments
  accounts are created with codes 5121xx, and the Cash account with code
  5311xx, because codes 5120 and 5130 are not available in the official
  CoA and were therefore causing validation errors in the SAF-T export.
- because the CUI number (found in the company_registry field) for
  partners is required for the SAF-T export, and it is substantially
  the same as the VAT number, re-use logic from l10n_be to automatically
  fill in the company_registry if the VAT exists.

closes odoo/odoo#132269

Task-id: 3172198
X-original-commit: 74be0779164f8cd65c399977d5f3e058c213318d
Related: odoo/enterprise#45939
Related: odoo/documentation#5532
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-08-21 19:57:11 +02:00
Rémy Voet (ryv) 1bceb01ff4 [FIX] website: fix unlink page with ir.rule
Issue
=====
The previous commit forced consistency between `check_access_rule` and
`_apply_ir_rule`. Now the parent model `ir.rule` (via inherited) is also
checked before the unlinking (`check_access_rule("unlink")`). The
`website.page` unlink override sometimes calls `unlink` on its parent
view and because view_id has `ondelete="cascade"`, it will actually
deletes the `website.page` itself. Then calling to `super().unlink()`
with self will raise a MissingError.

Fix
===
Batch the old logic and remove already unlinked record from `self`
before calling `super`.

closes odoo/odoo#125916

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-08-21 19:56:56 +02:00
Rémy Voet (ryv) 160acc0200 [FIX] core: fix inconsistencies between _apply_ir_rule and check_access_rule
Issues
======
- `_apply_ir_rule` applies `ir.rule` of the current model and also
`ir.rule` from the inherited model (via inherits). But
`check_access_rule` doesn't check the later one.
- `_flush_search` doesn't flush fields coming from the `ir.rule` of
the inherited model (via inherits). Then the filtering done by
`_apply_ir_rule` may be inconsistent with cached values.

Changes
=======
Because of https://github.com/odoo/odoo/blob/6ddcb448612f5d784c8e9ebb90f19077e65be3e1/odoo/osv/expression.py#L1073-L1073,
and https://github.com/odoo/odoo/blob/00e86b1552d1e5541a8dbf9411de5cfdb8990cc4/odoo/fields.py#L2895
leaf like `('<many2one_delegate>', 'any', [<sub-domain>])`,
will be translated in the same way as `_inherits_join_add` does.
We can remove `_inherits_join_add` and its usage in `_apply_ir_rule`
and change `ir.rule._compute_domain` to also return the inherited
(via inherits) `ir.rule` domain (with the new 'any' operator).
Since `_compute_domain` is used by `_apply_ir_rule` and
`_filter_access_rules_python`, everything is consistent.

Also fix `BaseModel._flush_search` to take in account 'any'/'not any'
operators (compulsory in order to flush correctly new domain
from `ir.rule._compute_domain` generated).

Part-of: odoo/odoo#125916
2023-08-21 19:56:55 +02:00
Pedram (PEBR) 330f5ddb86 [FIX] point_of_sale: always show selected partner at top of list
Before this commit, the selected partner was not shown at the top if
its id was outside those first 1000, because the partner list only
searched the first 1000 partners to display.

With this commit, the selected partner will always display at the top
of the list as expected, even if its id is outside the first 1000
partners queried.

opw-3470824

closes odoo/odoo#132510

X-original-commit: a55a5951ae97c5b702ee7cde525a24df68e1e1b1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-21 18:48:53 +02:00
niyasraphy 6ff6b23a89 [FIX] website_forum: not redirecting correctly
before this commit, on clicking button in the forum main
page the url is not updated correctly with the dynamic
variable, as href is used instead of t-attf-href

* open form
* click meet our community members link
* see the url

after this commit, on redirection url will be properly
updated.

closes odoo/odoo#132536

X-original-commit: 944b47346d3d5452a57bbe1ed6a666b17dfcbdc1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-21 17:01:12 +02:00
divy-odoo ce49ff9742 [FIX] web_editor: preserve content around on unlink images
Before this, we were considering only the case where only a single
element is wrapped by the anchor tag, like `<a><img></a>`. So it simply
replaces parent node `<a>` with childNode `<img>`. However, cases like
`<a>text<img><a>` (where there are multiple element within the <a> tag)
were failing.

To handle such cases, this commit replaced the code that considering
multiple childNodes and replacing parentNode with all the childNode.

task-3231606

closes odoo/odoo#132531

X-original-commit: 08432308819e83fd0122a8e87170ec8ff27ca2a1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
2023-08-21 17:01:07 +02:00
Saurabh Choraria f7d43662e3 [FIX] web: update log while error in generating report
When there is an error in a report and user tries to
download that report a logger exception occurs.

Exception: Error while generating report
studio_customization.studio_report_docume_1c084f7d-9ac2-4dd4-9977
-03d87251392c

The error occurs from report_download controller -
https://github.com/odoo/odoo/blob/0d70e38ab4bab850ee4bddc7b21b4c6c10809294/addons/web/controllers/report.py#L136

The logger is updated to use the 'warning' level instead of the 'exception'
level when an error occurs while generating report.

sentry-4321014875

closes odoo/odoo#132528

X-original-commit: 1210e1c7bc97ea772df5d2230a3b8f42b13e9e10
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-08-21 17:01:02 +02:00
Andrea Grazioso (agr-odoo) 47495d6247 [FIX] account: caba flow with tax group
Accounting > Configuration > Settings > Enable cash basis
Create [Tax 1] as follows:
- Name: Tax Exigible
- Tax Type: "Purchase".
- In the Tax Repartition Lines, add a different tag for each repartition line
- Tax Exigibility "Based on Payment".
Create [Tax 2] as a standard tax for purchase
Create a [Tax Group] as "Group of Taxes" using [Tax 1] and [Tax 2].
Create a Bill that uses [Tax Group], Confirm and Register payment.

Issue:
The CABA entry will not have tax and tax tags set up correctly,
[Tax 1] information will be missing.
Because tax information is missing during the creation of CABA entry
an exchange rate is created when it is not necessary

opw-3435601

closes odoo/odoo#132521

X-original-commit: ea848ab0f065d57b2b018a2e92479b94a49b4848
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-21 14:15:52 +02:00
MerlinGuillaume ecabd74ed7 [FIX] account_3way_match: correct number of draft bills in dashboard
The number of bills to validate in the accounting dashboard is not the
same as the number of bills displayed when clicking on the button

Steps to reproduce:
1. Install Accounting and module `Vendor Bill: Release to Pay`
2. Go to Accounting > Vendors > Bills, create a new one with a due date
   set to yesterday and save it
3. Go to the accounting dashboard
4. In the 'Vendor Bills' journal, see that there is one bill to validate
5. Open the draft bills (by clicking on the `Bills to Validate` link),
   the number of bills in the view is greater than what was previously
   advertised

Solution:
Modify the context used in the action 'Bills to Validate'

Problem:
The module `account_3way_match` modified the query to get the number of
draft bills so the action should be adapted

opw-3440854

closes odoo/odoo#132483

Related: odoo/enterprise#45987
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2023-08-21 14:15:42 +02:00
Andrea Grazioso (agr-odoo) 6da445c15f [FIX] l10n_din5008: floating elements alignment
Right floating 'Total' elements should respect the din5008 margin

opw-3437998

closes odoo/odoo#132482

X-original-commit: 0928d3f5ef6845c507a0e27b6e95e24a156852da
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-08-21 14:15:33 +02:00
Minh Hong 27452ab73a [CLA] signature for Minh Hong
closes odoo/odoo#132480

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-21 14:15:28 +02:00
Dang Van Loc b8081bdfff [IMP] hr_holidays: split function get employees
closes odoo/odoo#132445

X-original-commit: 5ea9e895860ec2f97bd86a5090df9f96a5fdfbb5
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-21 14:15:19 +02:00
Jorge Pinna Puissant a4b9050ec5 [REF] web, website_sale: remove legacy mutex
In our continued effort to remove legacy code, this commit replaces
usage of the legacy mutex util with the new one, which is fully
compatible as a drop-in replacement. The legacy mutex has been removed.

Part of task-3439226

closes odoo/odoo#131748

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-21 14:15:09 +02:00
roen-odoo 9538c0caa3 [FIX] point_of_sale: make sure cash moves are not duplicated
Current behavior:
When your connection is slow and you try to create a cash move, and you
click multiple times on the confirm button. The cash move is created
multiple times.
This happens because the function is not locked while the asynchronous
call is not finished. To fix this we added a custom hook to lock the
function while the asynchronous call is not finished.

Steps to reproduce:
-Open the POS
-Press F12 and in the network tab of the developper tools, set the
 connection to slow 3G
-Open the cash move popup, enter an amount and click on confirm multiple
 times.
-Close the session, and check the cash moves created.

opw-3431775

closes odoo/odoo#131409

X-original-commit: 6abe0bbd6eb47d0eb890f0c120c2095efc72325b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-21 14:15:04 +02:00
Thomas Becquevort (thbe) a2963d689d [IMP] hr_expense, sale_expense: category on product form view
Prior to this PR, when creating a new product.product model, a product.category
is allocated. As it is not shown on the product.expense.form view, the user
might make mistakes  if he did not set  the product.category himself.
This can be fixed by adding the product.category field on the view to allow
the user to modify it.

Also, some design changes are made at the same time to improve the form view.

This PR improves the product.product.expense.form view by adding the
product.category field so the user can modify it and also by modifying the
general layout of the view.

The view is modified adding the field, aligning the two first fields and
removing the notebook page for the notes and placing it in the continuity of
the view as it is the only page in the notebook

task-3413267

closes odoo/odoo#130065

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-21 14:14:57 +02:00
David Monnom (moda) 808a73742c [IMP] pos_self_order: improve qr code PDF
In order to improve the self order user experience, QR code generation
has been improved. Now, the user can reset the access_token linked to
the QR code and then regenerate them, he can also redownload the QR code
whenever he wishes.

The content of the QR code PDF has also been changed. Now, for each
table a QR code is generated and inserted in the PDF with the name of
the table and its unique identifier (access_token).

closes odoo/odoo#129100

Taskid: 3377335
Related: odoo/upgrade#4958
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-21 14:14:47 +02:00
David 734d58e22c [IMP] test_mail: Add message_partner_ids field unit test
This field is mainly used for record rules. We want to be sure that
changes in the _search method don't crash the logic.

Related PR: https://github.com/odoo/odoo/pull/121561

TT43572

closes odoo/odoo#132441

X-original-commit: fe07c6b405c536171cafa3c5a9e05a31049dd7ad
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-21 12:39:56 +02:00
Hubert Van de Walle (huvw) 1076dbdd58 [FIX] purchase_requisition: add missing date_planned computation
Steps to reproduce
==================

- Create a blanket order
- Choose a vendor
- Add a product P
- Set a price
- Save and Confirm
- Click on the RFQs/Orders smart button
- Create a new RFQ
- Delete the line
- Add a new line with the same product P
- Save

-> A validation error appears because the date_planned is not set

Cause of the issue
==================

`_compute_price_unit_and_date_planned_and_name` is overriden and passes
an empty recordset to the super method.

Solution
========

We can compute the `date_planned` using the selected seller

opw-3416573

closes odoo/odoo#132428

X-original-commit: d7db1d799fe042ef248968c6dee53eaf6e0ed3db
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-21 12:39:47 +02:00
Archana Vaghasiya d64e69e49c [FIX] calendar: check self is exists or not
When self does not exist (NewId origin) at that time if user tries to access
the meetings of  `res.partner` which will raise an error.

Error : KeyError: <NewId origin=3128>

On the` _compute_meeting` method self is referenced to get the meeting id when
the self does not exist. So, it will lead to the above traceback.

sentry-4362827298

closes odoo/odoo#132409

X-original-commit: 88bbb28aabae524413b00707028e56e965a4af29
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-08-21 12:39:42 +02:00
David a37214d7ba [FIX] portal: revoke regular portal users for real
When we revoke a user's portal permissions the user type will be changed
to public and be archived. There was an intended exception to check that
if the user had more groups than just the portal one we would keep the
user active.

But there are many groups that the user will have by default when we
install common apps like account, sale, etc.

TT43708

closes odoo/odoo#132404

X-original-commit: 96a5a12a8c277f3774520082d799a22577e00ebe
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-21 12:39:38 +02:00
prye-odoo 1c16fb7844 [FIX] account_payment: uninstall payment provider(s) with payment line
When the user uninstalls a payment provider module(s) and there are some
transaction lines linked with the 'account.payment.method' record(s),
It will throw the "ForeignKeyViolation" traceback. This commit raised the
UserError message.

Steps to produce (Example only):
- Install website_sale module.
- Go Invoicing > Configuration > Payments > Payment Providers
- Search "PayPal" and install it, open it, and fill up the credentials tab.
- Create an order from the website and pay with PayPal.
- Go to the Apps menu and search the "payment_paypal" module and try to
uninstall it.
After that traceback will be generated.

Error: update or delete on table "account_payment_method" violates
foreign key constraint "account_payment_method_line_payment_method_id_fkey" on
table "account_payment_method_line"

sentry-4261586022

[WIP]payment_provider raise msg improvement

closes odoo/odoo#132251

X-original-commit: 9eb5ea9746cf277f09f5258dbc276162280b275b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-08-21 12:39:33 +02:00
VAN BOSSUYT Nicolas ad06a7b2ad [IMP] base: improve PDF generation speed for large tables
This commit addresses performance issues when generating PDFs with large
tables using wkhtmltopdf. Processing time for such tables grows
exponentially with rows, causing significant delays.
Testing revealed a PDF with 250,000 rows took about an hour.

Previously, a workaround involving special XML template was provided to
users, inserting </table><table> tags every 500 rows.
This commit introduces a general solution at framework level.
Now, tables with >500 rows will automatically use this workaround,
enhancing PDF generation speed.

The number 500 is taken from opw-1689673 and seems to be a good
compromise between the number of split in tables and the processing
time by wkhtmltopdf

closes odoo/odoo#131933

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-21 12:39:19 +02:00
Jurgen (jugj) 7edde43100 [FIX] fleet: Take into account vehicle type when applying new drivers
In this PR we fix the current behavior :
When you apply a new driver to a vehicle, all other vehicles having that driver as current driver will have their
driver_id set to false, but if we are applying a new driver to a bike, we don't want his car, if he has one to be unassigned from him.
task-3463518

closes odoo/odoo#131840

X-original-commit: 7649f45ee45aea152224e4ff0fe9b9430ad3c9f8
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-21 12:39:14 +02:00
Hamza (hisl) 970abd4f8d [FIX] web : remove inline class from expected revenue field
The 'oe_inline' class does not allow the 'at' and the following elements to move to right when we have currency symbol of more than one character. Previously the value of max-width was set to 9rem which is now changed to inherit, so that it still have the space even if the space on the sides is consumed by other elements.

Steps to reproduce:
1. Set the currency of your company whose symbol is more than one character e.g AED
2. Start writing in expected revenue field.

Current Behaviour:
The input field will take over the 'at' string and overlap.

Expected Beahviour:
The strings and elements following the expected revenue input should move to right if the currency symbol's width increases.

OPW-3343377

closes odoo/odoo#131811

X-original-commit: 66946eb2311dd31b91d090b119ead610557d6b94
Signed-off-by: Bastien Fafchamps (bafa) <bafa@odoo.com>
Signed-off-by: Hamza Islam (hisl) <hisl@odoo.com>
2023-08-21 12:39:10 +02:00
Pierre Paridans 8164f107be [IMP] web,web_editor,point_of_sale: remove jquery.nearest library
This library provided the `nearest()` and `touching()` methods.

This commit replaces them by our own utility methods from
`@web/core/utils/ui`: `closest()` and `touching()`.

closes odoo/odoo#130818

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-21 12:38:57 +02:00
Hamza (hisl) 5d2116e146 [FIX] delivery : set max-width of tracking # col
If the tracking number in the transfers is lengthy in terms of characters. The column will move to the left and take the space of other columns, resulting in a very bad layout. This is because Wkhtmltopdf does not handle the flexbox properly and and a max width had to be set.

1. Create a transfer with a delivery method.
2. Add a lot of characters in the tracking reference field.
3. Print the delivery slip.

Current Behaviour:
The tracking reference field does not respect the boundaries of other columns are take over their space.

Expected Behaviour:
The columns should keep a decent space to for the other column values.

OPW-3343067

closes odoo/odoo#130430

X-original-commit: 7cea2fc560f719827fc04be85ff9e7dc3a5586b3
Signed-off-by: Hamza Islam (hisl) <hisl@odoo.com>
2023-08-21 12:38:53 +02:00
Gabriel de Paula Felix (gdpf) a395277fed [IMP] microsoft_calendar: add synchronization pause button and tests
Configuration and tests added for 'pause synchronization' button (Outlook module).

closes odoo/odoo#126560

Task-id: 3290898
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-21 12:38:44 +02:00
Gabriel de Paula Felix (gdpf) 9ae8f7dda3 [IMP] google_calendar: add synchronization pause button and tests
Configuration and tests added for 'pause synchronization' button (Google module).

Task-id: 3290898
Part-of: odoo/odoo#126560
2023-08-21 12:38:43 +02:00
Gabriel de Paula Felix (gdpf) c8f2fa1e6d [IMP] calendar: add synchronization pause buttons
Configuration added for 'pause synchronization' buttons (Google and Outlook).

Task-id: 3290898
Part-of: odoo/odoo#126560
2023-08-21 12:38:42 +02:00
PNO 6caa9f5095 [FIX] stock: change error message
The error can be raised either when a move is in state done or cancel. However, the error message only says we cannot split split if the move is in done, which can be misleading.

closes odoo/odoo#132433

X-original-commit: 45bab967033531e0391a923ef1a2186955c36eeb
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Pedro Nogueira (pno) <pno@odoo.com>
2023-08-21 11:11:28 +02:00
Thomas Lefebvre (thle) f24f2d6384 [FIX] hr_work_entry_holidays: ensure the consistency of leaves
Steps to reproduce:
-------------------
- install `hr_work_entry_holidays` module
- create an employee and add two contracts:
    - from 2023-01-01 to 2023-06-30 with a full time (5/5) resource
      which is expired
    - from 2023-07-01 to 2023-12-31 with a partial time (4/5) resource
      which is running
      (doesn't work on Wednesday)
- create an allocation with 10 days
- with the employee, create two leaves:
    - 3 days during the first semester with one Wednesday
    - 3 days during the second semester with one Wednesday

Issue:
------
Leave duration is based on the current contract.
If we change the type of leave by modifying its days/hours unit,
we will get inconsistencies between days and hours for leave taken
in a period belonging to another contract.

Cause:
------
Expired contracts are not taken into account
when calculating the number of days and hours.

Solution:
---------
Add `close` state to contract search.

opw-3419380

closes odoo/odoo#132144

X-original-commit: 249f8c836f606c0dfc5f3b6e64ad9b319b5a4602
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-08-21 07:19:51 +02:00
Alexandre Kühn 92d9b6d779 [FIX] mail: show chatter attachment loading after 1 second
Before this commit, when chatter data were fetched, it shows
spinner icon on attachments immediately until data are fetched.

This RPC is quite fast, so it's annoying to see spinner and then
no spinner whenever chatter is reloaded. This is even more
bothersome when most chatters have no attachments and some followers,
which gives the illusion loading affects followers rather than
attachments, as the spinner takes place of attachment counter that
is empty when no attachment.

This commit fixes the issue by having a 1 second delay for showing
the loading icon next to attachment. This prevents most flickers
when RPC is fast, while keeping it relevant when it's slow so it's
clear data are still loading.

Task-3356922

closes odoo/odoo#132463

X-original-commit: 96b00d25becdf2253975d1b427c30ee287cda98f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-20 18:19:59 +02:00
Loan (LSE) e403eec89b [FIX] mail: "Invalid Date" errors on iOS Safari
Before this commit:
JS errors on iOS with Safari's browser due to the date syntax not being
supported:
```js
new Date("2023-08-18 14:02:53")
-> Invalid Date
```
This does prevent Odoo's backend to start up on the browser and the app
on iOS devices.

opw-3465337

closes odoo/odoo#132461

X-original-commit: a39391d0df644fce86f435ba3f39e7634d8e5172
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-20 16:35:51 +02:00
lrizzi1 698e14a003 [FIX] mail: closing hidden chat window should not crash
Before this commit, closing a hidden chat window may crash.

This happens because closing a chat window was always treated as the
closing of a visible chat window, which should make the 1st hidden
chat window visible, if any. This code should not be called when
closing a hidden chat window, otherwise unexpected behaviour are
to be expected, e.g. closing 2nd hidden chat window swaps last visible
with 1st hidden chat window, or even a crash.

This commit makes sure auto-swapping of 1st hidden chat window only
occurs when closing a visible chat window.

opw-3460466

closes odoo/odoo#132458

X-original-commit: b49364b687757385a2a7356d17dc428edafd2767
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-20 14:43:56 +02:00
Valeriya(vchu) cd887a8289 [FIX] payment_stripe: disable tokenisation that will not be supported
disable tokenisation of payment methods that use sepa debit because
it will not be supported in the future versions

closes odoo/odoo#132424

X-original-commit: df2a358fb22ed50d86bd655858785a31adf934a9
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-08-19 12:03:00 +02:00
MerlinGuillaumeandVictor Feyens d5878829cd [FIX] product: use configurator with deleted attribute
The product configurator can have irrelevant disabled options if the
product selected has some archived variants

Steps to reproduce:
1. Install Sales and Inventory
2. Create a product with two attributes, each with two values (e.g.
   Color: C1, C2 and Weight: W1, W2)
3. Open one of the variant, add some stock then archive it
4. Delete the attribute Weight from the product
5. Create a SO for any customer and add the product
6. The product configurator dialog opens but the C1 color is unavailable

Solution:
Only return the archived combinations for which all of the attribute are
still used in the product

opw-3427753

closes odoo/odoo#132420

X-original-commit: d5cd215dcf1b7e633c86ad734274a65827368ade
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
2023-08-19 12:02:52 +02:00
Christophe Simonis 522c8cd783 [FIX] delivery: correct selection value
Oversight of view-pocalypse (odoo/odoo#104741) that wrongly changed it.

closes odoo/odoo#132408

Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
2023-08-19 12:02:42 +02:00
Hugo Carlier (Huca) ab809baca1 [FIX] *mail, mass_mailing_sms: take domain into account for activity
This commit allows to take domain into account for custom activity
groups in the systray.

Steps
=====
In debug mode:
- Install module mass_mailing_sms
- Add an activity for a mailing.mailing record with mailing_type set to
'sms' (i.e. a record visible in the SMS Marketing app).
- Add an activity for a mailing.mailing record with mailing_type !=
'sms' (i.e. a record visible in the Email Marketing app).
- Open the activity menu

Not in debug mode:
- Do the same step as above
- Click on the category "SMS Marketing" in the activity menu

Issue
=====
- In debug mode: a traceback will pop up when the activity menu is
opened with an error message similar to `Got duplicate key in t-foreach:
1182`.
- Not in debug mode: when clicking on the SMS Marketing category in the
activity menu, all records of model mailing.mailing with activities set
will be displayed and not only the one with mailing_type set to 'sms'.

Cause
=====
- In the method systray_get_activities, the id of each model is used to
create groups of activities. In mass_mailing_sms, the same logic is used
but two groups are created for the model mailing.mailing, thus with the
same id. This create a traceback in debug mode when displaying the
activity menu are the id of the groups are used as key for a foreach in
the view template.

- The methods openActivityGroup and onClickAction called when the user
click on an activity group (or on the activity icon next to it) do not
take the domain of the group into account correctly.

Fix
===
- The id key of activity groups is renamed in sequence
- The value of sequence is only used to sort activity groups on the
client side
- group_index is used as t-key value in the template of the activity
menu
- The domain of each group (if any) is combined with the domains used in
openActivityGroup and onClickAction

closes odoo/odoo#132402

X-original-commit: 1f154b4ba21e34c9021f07c5e62d8de460eb824e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-19 12:02:38 +02:00
Daniel Kosky (dako) ca5051b1ed [FIX] l10n_ke_edi_tremol:credit note currency rate
The problem:
- Multi-currency is allowed, although the fiscal device expects amounts
only in KSh.
- The amounts are converted from the invoice amounts at the moment of
sending to the device.
- When sending a credit note to the device, the amount of the credit
note cannot exceed the amount of the original invoice (otherwise the
device will throw an error).
- In odoo, the journal items of the credit note are created using the
current currency rate (not that of the original invoice), and thus the
amount can exceed the original amount (depending on changes in the
currency rate).

This commit addresses this issue by using the currency rate from the
original invoice (reversed_entry_id) in the case of a credit note.

opw-3422555

closes odoo/odoo#132385

X-original-commit: f28ec1f419fb6e35f6f8a86604796f826283ff20
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2023-08-19 12:02:24 +02:00