Commit Graph
164380 Commits
Author SHA1 Message Date
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
momegahed e74d383f69 [FIX] l10n_de: foreign vat doesn't work with din8005
Steps to reproduce:
1. Install l10n_at, l10n_de
2. Activate EU intra community option in accounting settings
3. Configure BSS Germany to have a foreign fiscal ID
4. Select document layout DIN 5008
5. Create and print PDF of an invoice for a german customer
6. Foreign fiscal ID does not appear

Issue:
the logic to handle `forced_vat` is missing in din5008 layout

opw-3381688

closes odoo/odoo#132381

X-original-commit: 0a0ddc98924e5fdd5fa10a7b858009b953d0236a
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-08-19 12:02:20 +02:00
Alexandre Kühn 941e28cee1 [FIX] mail: show seconds in message datetime
Before this commit, when mouse hovering on relative time of the
message, it showed the datetime without the seconds.

Not showing the seconds can make it hard to determine chronological
order of 2 messages in different conversations.

This commit fixes the issue by showing the seconds in datetime format
of message when mouse hovering on relative datetime part.

opw-3423016

closes odoo/odoo#132376

X-original-commit: b0019f5b92b9cebab9f1162631cbf00be5101b6f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-19 12:02:15 +02:00
Habib (ayh) 0a19ea1b35 [FIX] web: currency reload
The currency service is responsible for reloading currencies from the session_info, however it does not retrieve the correct key/value.
The issue can be reproduced  in saas-16.4:
- Activate a currency
- Accounting Dashboard > Reconcile x items
- Client stack trace
(after hard refresh the correct currencies are loaded)

closes odoo/odoo#132375

Cause: the `reloadCurrencies` method is assigning the entire session_info response object to the session's currencies
X-original-commit: bbbf836f99b0271442e5e3a7ec03f108de69ec78
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-08-19 12:02:10 +02:00
Florian Charlier bb27a340f9 [IMP] website_slides: add populate
We make sure to have courses with a huge number of
attendees w/r to partners count.

Task-3463533

closes odoo/odoo#132374

X-original-commit: abd040a1084d462167d13cb071b4faf8439112f0
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-08-19 12:02:06 +02:00
luvi 440c72f2aa [FIX] web: fix draggable with touch input
This commit fixes some isues with touch behaviors in the drag and
drop feature. Since commit (1), pointer events are used instead of
mouse events in the draggable hook. This makes the drag and drop
available with touch, but some issues appeared.

The following issues have been adressed by the commit:
- Scrolling in a kanban view has become difficult, since items are
dragged, and columns are moved. A simple scroll in the view to show
other items was nearly impossible without interacting with elements.
A small delay has now be introduced in the draggable_hook_builder by
default for touch interactions. The user has to do a long press (500ms)
to instanciate the drag sequence.

- on Windows laptops, the hasTouch helper would not return true, even
on PCs and tablets with a touchscreen, because 'ontouchstart' is not
present in the window object. It meant that any touch feature was not
working properly (e.g. moving icons from the home screen).
This commit adds a mediaQuery check right after the current check on
the window object, to also consider those laptops as touch devices.

Tests have been added to check the behavior of the touch drag, and the
presence of a bouncing animation when initiated. The corresponding drag
helper now has the possibility to set a custom pointerType.

task-3436591

closes odoo/odoo#132373

X-original-commit: 4c5cf0962f91d05085fea75e9c26ecdca9c0eb13
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-08-19 12:01:57 +02:00
Antoine Guenet cd527b9394 [FIX] mail: replace local url of background image with single quotes
Relative image urls have to be replaced with absolute urls in order to
be able to display them in the email. This failed to be done for urls in
styles attributes if they were enclosed in (unicode decimal) single
quotes.

opw-3452655

closes odoo/odoo#132339

X-original-commit: d952e0117a68dd19e86c45ae75250807231e82ad
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-19 12:01:52 +02:00
yhu-odoo 6624cbf75b [FIX] mrp_subcontracting_purchase, purchase_stock: price difference
entry wrong when resupply subcontractor

In case product is using standard price and automated inventory valuation.
We post account entries in price difference account when the price on
purchase order is different from the cost of product. However, when we
do subcontracting and resupply our subcontractor, the cost is not just
the price on purchase order, but also the cost of the components we sent
to the subcontractor. Currently, we didn't take the components cost in
to account when post price difference entries. Fix it in this commit.

Task-3223451

closes odoo/odoo#132282

X-original-commit: e771535b487e76f4e5a23b767d220d7f640292a6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2023-08-19 11:01:00 +02:00
yhu-odoo 77a8616263 [FIX] mrp_subcontracting_account: subcontract cost don't match the price
When doing subcontracting with standard price product. If
Final procut cost != Components cost + subcontracting cost
When posting account entries for final product, the amount of componets
entry is adjusted for the difference of the two costs.
After this commit, we will post components cost according to it's price
so that it can match the value change of the stock. We adjust the amount
on subcontracting cost for the cost difference.
NOTE: the remaining of subcontracting cost will be post in price
difference account when create vendor bill.

Task-3223451

X-original-commit: 514f5b51ad30cce0048abb4cf343e830f0288b36
Part-of: odoo/odoo#132282
2023-08-19 11:00:59 +02:00
yhu-odoo be911c2c58 [FIX] mrp_subcontracting_account: wrong account subcontracting
When we do subcontracting, components and final products are sent to/
received from production location. The account entries are also post
using the accounting setting on production location like normal
manufacturing which is not correct.
To fix, we use account setting on product categories instead of
production location for subcontracting.

Task-3223451

X-original-commit: 017209068f308e87870e2b352afbdf6febc41da0
Part-of: odoo/odoo#132282
2023-08-19 11:00:57 +02:00
Saurabh Choraria ea9d6649ee [FIX] base: handle error when editing comment in view's architecture
Currently, When the user is adding a double hyphen or space or anything within a
comment in a view's architecture and tries to save the view, then an error
occurs.

To reproduce the issue:
1. Go to Settings > Technical > Views > open a view.
2. In View Architecture comment out a line.
3. Add a double hyphen or space or anything within the comment.
4. Then save manually, the error will occur.

To solve this issue the error has been handled using a try-except block in
'parse_html' method.

sentry-4306359331

closes odoo/odoo#132267

X-original-commit: ba6f90fac142ae53995f4fce4b75799e61b95b6c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-08-19 10:05:45 +02:00
Antoine Vandevenne (anv) d5bee8b86f [REM] payment(_alipay,_demo,_paypal), website_payment: drop fees support
The "fees" or "extra fees" or "customer fees" feature was meant to make
customers pay for the processing fee charged by the payment provider
they choose to make their payment. The fee was also displayed on the
payment form to deter customers and encourage them to choose another,
cheaper, payment provider.

In practice, it didn't hold up because:
1. the provider's API must allow sending the fee as a separate amount,
   and PayPal was the only supported provider to do it;
2. charging extra fees is highly discouraged by providers, and forbidden
   in Europe;
3. the final fee amount depends on the customer, country, payment
   method, risk profile... rendering charging the actual fees amount
   infeasible;
4. most of the time, only one payment provider is enabled at a time,
   thus alienating customers who would have no other choice than paying
   the fee;

task-3358581

closes odoo/odoo#132104

Related: odoo/documentation#5517
Related: odoo/upgrade#5053
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-08-19 09:06:59 +02:00
William Henrotin 743f174a63 [ADD] mrp: complete demo data
closes odoo/odoo#132366

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-19 07:58:50 +02:00
Habib (ayh) 7a78f5856e [FIX] account: save on tab change
Due to the new relational model (218ad8456a), a new property isInEdition is available while `mode` has been removed.
Due to mode always being undefined, the save method was never actually called, preventing the journal items from being available when switching tabs.

Task-3471248

closes odoo/odoo#132345

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-19 06:59:49 +02:00
Romain Estievenart 2057dd3bfe [FIX] web: traceback occurs on Quick assigns (M2M_tags_avatars)
This traceback only occurs if you quickly assign and close the popover
during the rerender of the popover. We call an element inside the
popover already destroyed.

Steps to reproduce:

- Open a kanban view inside the project app
- Click on the "Quick Assign icon"
- Select a user A
- Press directly "escape" to close the dropdown a traceback occurs
  => bug

closes odoo/odoo#132337

X-original-commit: f75074d225a05571bea87589b81fbefb11b054f4
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-08-19 06:59:44 +02:00
Loukas Wets (lowe) 885d52f75a [FIX] point_of_sale: blockui should be above the closing popup
The z index of the closing popup div was changed to a higher index than
the blockui z index. This commit sets the z index of the closing popup
to a lower value then the blockui z index.

task-3471040

closes odoo/odoo#132310

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-19 05:11:15 +02:00
Laurent Smet fd910639da [FIX] account: Fix reconciliation with very tiny rate with one foreign currency
Suppose a very tiny rate 1:10000.
l1 is expressed in company currency and has an amount of -10.
l2 is expressed in foreign currency and has 1000000 in company currency for 100 in foreign currency.

The reconciliation is made in foreign currency but there is nothing left to reconcile after converting
-10 to the foreign currency because -10 / 10000 = 0.0001 ~= 0.0
So no partial is created.

After this fix, the reconciliation fallbacks to a reconciliation in company currency if there is nothing
left to reconcile after applying the rate.

closes odoo/odoo#132304

Issue: 128234
X-original-commit: 359710c7d51ee2b7510cae59cec5b728226a26c1
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-19 04:09:02 +02:00
Abdelouahab (abla) 6a3f65ff63 [FIX] web : export property fields
To Reproduce
============
- on project task add a property
- go back to list of tasks and try to export the modified task
an error is raised

Problem
=======
The property field is represented as dict (same for JSON fields)
Which is not expected in `write_cell`

Solution
========
handle `dict` type

opw-3431718

closes odoo/odoo#132303

X-original-commit: 1e9ed945c637e78b1003115dfd4042b3d87d8365
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-08-19 04:08:57 +02:00
Julien Carion (juca) cd26c31c59 [FIX] web: fix darkmode switch display
This commit simply corrects how the darkmode switch is displayed in the
user menu so that the switch won't overlap with its label.

task-3470052

closes odoo/odoo#132299

X-original-commit: 49176fe372dc09be65017013de8499b33d114045
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-08-19 04:08:53 +02:00
Loukas Wets (lowe) fd4ead60cc [FIX] point_of_sale: restore quantity buttons location
The quantity buttons of the mobile view product configurator where moved
during the boostrap refactoring of the pos. This task moves them to the
previous location.

task-3446503

closes odoo/odoo#132293

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-19 04:08:49 +02:00
baa d2ed1d7277 [FIX] l10n_eg_edi_eta: moved the ETA QR code in a place where it will always show
Starting v16, the invoice template changed and the ETA QR code would stop showing in some cases. This commit moves it next to the payment QR Code so that it displays in all cases

closes odoo/odoo#131938

X-original-commit: 28661fa7a14713c9d06b7faa505a54f53baf66d3
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-08-18 23:05:55 +02:00
tsm-odoo 01fa22e0c9 [FIX] mail, *: fix suggestions after search/fetch returned no result
*: im_livechat.

Before this commit, suggestions were not showing anymore after
search/fetch returned no results. This commit fixes the issue
by resetting the search state when nothing is found.

task-3459933/3455060

closes odoo/odoo#132264

X-original-commit: 13b3f36a0d71bb55e2ca56fd207c7dfaba23aa86
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-18 21:45:11 +02:00