Commit Graph
163215 Commits
Author SHA1 Message Date
Tiffany Chang (tic) 7a4c3a0bf8 [REM] base: remove unnecessary datamatrix code
Followup cleanup of https://github.com/odoo/odoo/pull/106620 where
Datamatrix of pylibdmtx was replaced with built-in reportlab
ECC200DataMatrix option. For stable compatibility, some parts could
only be deleted in master, so let's delete them now.

closes odoo/odoo#122704

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-05-30 08:41:01 +02:00
Thomas Lefebvre (thle) 2742b90238 [FIX] hr_holidays: correct the timezone for Public Time Off
When we create a public time off,
we save the start date and the end date in utc.
Unfortunately, to calculate the utc, we don't use
the calendar timezone linked to these public time off.

Issue:
For example, with the "timesheet_grid" module,
the timesheets created for these time offs
will not be correct for employees who have a calendar
in a different timezone than the user who creates the public time off.

Solution:
Convert the dates received in the calendar timezone.

opw-3302925

closes odoo/odoo#122755

X-original-commit: 63688d31c036a7d1421444134169681924f8a12a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-30 07:33:07 +02:00
Ali Alfie (alal) 2b9587aad6 [FIX] account delay draft opening entry
Before: in the accounting dashboard setup, an opening move was created in step 1 (accounting periods) and step 4 (chart of accounts)

Now: the opening move is only created in step 4 only when a first opening debit/credit is entered manually by our user.

Task-ID #3177315

closes odoo/odoo#122818

X-original-commit: c3793357d823273cb4297b0eb31308ad73a9dff8
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-05-29 14:51:55 +02:00
Habib (ayh) aa128cfd50 [FIX] account: bank transaction foreign currency compute
The foreign currency should not be computed if it has already been set.
In cases where the transactions were imported with a foreign currency amount, it should not be changed when the user modifies the date.

Fix for
Task-3338560

closes odoo/odoo#122780

X-original-commit: c31af99542493ca10604688dc2782a0aa41f5294
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-29 13:38:58 +02:00
Renilkumar Kajavadra 8d8478b49a [FIX] point_of_sale: fix expected singleton in pos sales details
If applied, this commit will solve the expected singleton error when the product
has multiple taxes, and the user tries to print sales details in point of sale.

To reproduce this error, follow the steps:
- Open point of sale.
- Products > Open any product > Add multiple customer taxes
- Open Session > make the order for that product with discount > Validate
  > Close Session
- Reporting > Sales details > Print

sentry - 4148645094

closes odoo/odoo#122182

X-original-commit: 2d58de7adcae9b035607ff6a2ca59fc46ce32506
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Renilkumar Kajavadra (reka) <reka@odoo.com>
2023-05-29 11:32:02 +02:00
Guillaume (gdi) df77914d27 [FIX] website: prevent traceback in pages kanban view
Since [this other commit], a traceback is displayed when the user wants
to see the pages of his site when he has only one site. Steps to
reproduce the bug fixed by this commit:
- Launch Odoo without any app installed and without demo data
- Connect to the DB
- Activate the Website module
- Skip the configurator
- Choose a theme
- Discard edit mode
- Go to Site > Pages
- Go to kanban view

=> An error is displayed because the record has no website_id.

[this other commit]: https://github.com/odoo/odoo/commit/f23399db1dfb816a68ecf1be4367234b6e9a28bc

task-3316267

closes odoo/odoo#122754

X-original-commit: 322f0882e9fc0b33c90a2e22fdffa01b5d4345e4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-05-26 22:23:41 +02:00
Benjamin Vray 3074c1c428 [FIX] website: fix map snippet saved
This commit fixes the issue of having duplicate iframes when dropping a
custom "s_map" snippet that has been saved by the user.

This issue was introduced by this commit [1].

Steps to reproduce the bug:
- Drag and drop a "s_map" snippet onto the page.
- Save this "s_map" snippet by clicking on the custom snippet "save"
button.
- Drag and drop the saved snippet onto the page.
- Observe that a duplicate iframe is created in the snippet.

This commit adds a check to verify if an iframe already exists before
adding it when dropping a "s_map" snippet.

[1]: https://github.com/odoo/odoo/commit/88194dd94182ad1bbdcb9aa8f855f30f6369d148

task-3340644

closes odoo/odoo#122739

X-original-commit: 34b8c2e0578b56b87c50c222564582ed4fa7051f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-05-26 21:16:31 +02:00
Laurent Smet 6b51c8b6ed [FIX] account: Prevent exchange diff entry with full refund
- create an invoice with a CABA tax
- full refund it using 'add credit note', 'cancel' mode.
=> No CABA entry generated but an exchange difference journal entry
has been created.

This is because the CABA entry is not generated in case of full refund
thanks to the 'move_reverse_cancel' context key. However, this key is not
preventing the generation of the exchange journal entry for CABA.

opw-3321897

X-original-commit: 01799569bb3d450719968c77c1d4bb4c9ff31fdb

[FIX] account: Fix 'reverse_move_cancel' context key in reversal wizard

When reversing an invoice using the reversal wizard, the reverse_move_cancel is not passed to
the reconciliation and then, we are not able to prevent the generation of the cash basis entry.
This is because the reversal wizard 1) posts the credit note and 2) reconcile it with the invoice.
However, the reconciliation is done directly during the post but forcing the 'reverse_move_cancel'
key to 'False'. Then, at step 2), there is nothing left to reconcile.
So the reconciliation is never called using the 'reverse_move_cancel' context key set to true.

closes odoo/odoo#122732

X-original-commit: 42a8b091c4085c5caa97c838342a1ca0748c403c
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-05-26 21:16:28 +02:00
zel-odoo 15f1913225 [IMP] mail: visual update on avatar in member list
- rounded avatar in member list and invitation link
- improved color in selectable users in invitation link
- show "Add Users" action in DM chat window
- no border on panels in chat windows
- slight header style adjusments on emoji picker
- improved borders on chat window (shared between content and header)

closes odoo/odoo#122731

X-original-commit: 0f7f858514126a6898c01bb6a8389d0b066b8a3f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-26 20:12:28 +02:00
Chrysanthe (chgo) f062b8239e [FIX] website, hr_*: fix some squished buttons
=== ISSUE ===

With the new Milk design, we introduced `.border-radius` on buttons.
Most of the time the render looks great, but in some cases, it would break
the layout.

This is due to the fact that old design sometimes used two buttons
next to each other.

This worked fine because they did not have any radius but now it looks
like they are compressed and squished.

=== AFTER ===

This commit tracks some of these cases to improve the global render
of these buttons.

task-3329612
part of task-332626

closes odoo/odoo#122705

X-original-commit: 90c2ba3eb0bf74d675c574b13cedb90235398773
Related: odoo/enterprise#41590
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-26 18:41:40 +02:00
Rmi Rahir (rar) 86eb916bf2 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/82328ad7 [REL] 16.4.0-alpha.2
https://github.com/odoo/o-spreadsheet/commit/fc9f6263 [FIX] index.ts: export `invalidateXCommand` sets
https://github.com/odoo/o-spreadsheet/commit/dca78e38 [IMP] Charts: improve side-pannel clarity
https://github.com/odoo/o-spreadsheet/commit/60e55d6c [REF] core: remove range plugin attribute
https://github.com/odoo/o-spreadsheet/commit/564c094f [REL] 16.4.0-alpha.1
https://github.com/odoo/o-spreadsheet/commit/d01251d0 [IMP] evaluation: lazy build dependency graph
https://github.com/odoo/o-spreadsheet/commit/0a6a786e [IMP] evaluation: introduce array formulas
https://github.com/odoo/o-spreadsheet/commit/54eea364 [MOV] evaluation: move file in its own folder
https://github.com/odoo/o-spreadsheet/commit/c11a642d [IMP] icons: add unfreeze icon
https://github.com/odoo/o-spreadsheet/commit/3632c629 [FIX] viewport: warning message on resized viewport size
https://github.com/odoo/o-spreadsheet/commit/3169b5c9 [REF] cells: use class instead of closure
https://github.com/odoo/o-spreadsheet/commit/0d6a3904 [FIX] ColorPicker: Fix style issue
https://github.com/odoo/o-spreadsheet/commit/6a12501a [FIX] SheetUIPlugin: set column height for multi line content
https://github.com/odoo/o-spreadsheet/commit/fffba67c [FIX] ColorPicker: modified add custom color icon Task: 3258627
https://github.com/odoo/o-spreadsheet/commit/2d158b55 [FIX] ContentEditableHelper: do not throw on missing node
https://github.com/odoo/o-spreadsheet/commit/40b37030 [IMP] components: use a hook to register/clean up event listeners
https://github.com/odoo/o-spreadsheet/commit/3a3aab7b [REL] 16.4.0.alpha
https://github.com/odoo/o-spreadsheet/commit/d70dcebe [FIX] ChartFigure: chart/image menu options in readonly mode Task: 3284659
https://github.com/odoo/o-spreadsheet/commit/fcc0d723 [IMP] commands: introduce reserved keywords Task: 3276541
https://github.com/odoo/o-spreadsheet/commit/da9f553e [IMP] commands: generic check for position Task: 3276541
https://github.com/odoo/o-spreadsheet/commit/930ac3a0 [IMP] model: core allowDispatch for local commands Task: 3276541
https://github.com/odoo/o-spreadsheet/commit/9f067cfe [FIX] Topbar: fix data menu items order
https://github.com/odoo/o-spreadsheet/commit/2ce92d3c [FIX] TopBar: fix icon's CSS
https://github.com/odoo/o-spreadsheet/commit/2be1518c [IMP] tests: add helper triggerTouchEvent Task: 3302326
https://github.com/odoo/o-spreadsheet/commit/e91b2b89 [IMP] tests: use keyUp/keyDown helper everywhere Task: 3302326
https://github.com/odoo/o-spreadsheet/commit/d63c2be2 [IMP] tests: add a triggerWheelEvent helper Task: 3302326

closes odoo/odoo#122677

Related: odoo/enterprise#41587
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-26 18:41:35 +02:00
sergio-teruel f9edfced9e [FIX] sale: Uom field readonly for new sale order lines
closes odoo/odoo#122683

X-original-commit: 2e5c8b4eb427e580ed22417ff49cf3cb994ba88d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-26 17:29:30 +02:00
niyasraphy efaeabaaa6 [FIX] mrp: clear product variant onchanging product in bom
before this commit, on changing the product from bom is
not clearing the product variant field, if the product
variant feature is not activated in the database.

* activate the product variant in the db
* create a product and variants
* open bill of material, and set the created
product as product and set any variant in product
variant field
* now go to settings and disable product variant feature
* come back to same bom and change the product
* the product variant field will still have the other
product

onchange_product_tmpl_id is written to clear the
product variant field value, but as the product
variant field has group the onchange value is
not getting updated.

after this commit, on changing the product the product
variant field will get cleared even if the product
variant feature is not activated.

closes odoo/odoo#122681

X-original-commit: 5808fc898ecbbf23d93693f7d957a6700de144c6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-26 17:29:27 +02:00
Mohit Beniwal 14baa53846 [FIX] uom: prevent set value of ratio as zero in uom
ZeroDivsionError: float division to Zero is generated because for assigning
value to 'factor' of uom in method '_set_ratio', it tries to divide value by
Zero for uom_type 'Bigger'.

Steps to reproduce:
1) Install 'Inventory' module.
2) Click on 'Configuration' > 'Settings'.
3) Activate 'Units of Measure' > click on 'Units of Measure' button under it.
4) Click on 'Create' button to create new uom category.
5) Give any name > in 'Units of Measure' page, click on 'Add a line'.
6) Enter name and select type as 'Reference unit of measure for this category'.
7) Now, add another line and select type as 'Bigger than the the Reference unit
   of measure' and set the 'ratio' value to Zero, Error will be generated.

By applying this,it will check for the value of 'ratio' to prevent division by 0

sentry - 4174584503

closes odoo/odoo#122680

X-original-commit: b79e5afeba7f9517e0325a7a4f9b2373bf5317ed
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-26 17:29:24 +02:00
moerradi faaf07bbf6 [IMP] account: Reconciliation models UX
- Add group bys, columns, and filters to Bank Reconciliation models for better navigation and organization
- Trigger auto-validate cron on saving Reconciliation model with auto-validate enabled
- Restore pre-filled elements when creating Reconciliation model through bank reconciliation widget (V15.2 functionality)
- Remove text ellipsis from Reconciliation model buttons in bank reconciliation widget for better readability

closes odoo/odoo#122657

Task-id: 3253304
X-original-commit: 6d0ffce1390d9c73042e39ab637c4c88ccb0e711
Related: odoo/enterprise#41570
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
2023-05-26 16:16:12 +02:00
Arnold Moyaux 25e7fa44f8 [FIX] stock: performance with 2000 serial numbers
It takes 70s to generate a receipt with 2000 serial numbers.

It happens because during the first part of the loop
(model `stock.move.line` in the `create` method).
It will update the initial demand of the move based on the new
stock.move.line and their qty_done.
Writing the initial demand of the `stock.move` will try to reassign
it (useless in our case) and rewrite the same value on its state's field.
The consequence is the invalidation of the field on
the `stock.move.line` because it's a related to the `stock.move`.
In the second part of the loop, it check the sml state. Since it
was invalidate upper, it recompute it. That prevent a correct prefetch
and cause a performance issue.

We fix it by writing only once the information by move. And it
prevent the recompute later since the state is not write during the
loop.

closes odoo/odoo#122651

X-original-commit: 9dbc374fb89550444fc6f1c9445cb57067af214c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-26 16:16:07 +02:00
Saran440 e2533a85e8 [FIX] purchase_requisition: default representative from Agreement tto RFQ
closes odoo/odoo#122648

X-original-commit: 479a3354a119c36f5e02b2ab049c276cc2a60503
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-26 16:16:04 +02:00
Zelong Lin d6a2ecb93b [FIX] mail: done activity not updated
task-3331827

closes odoo/odoo#122633

X-original-commit: e27ce3ff448b05bbdf0785968a145f8aa952d1b5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-26 16:16:02 +02:00
Antoine Guenet 6861402746 [FIX] web_editor: save on more than just input
Since commit [1], the state of the editor in the html field is only set
to dirty when the user triggers an input event. This means that if the
user uses the mouse to change the content of the field (eg, drag and
dropping snippets), the editor is not marked as dirty so the save button
will not appear and autosave will not work.

This commit fixes this by checking the editor's dirty state whenever a
history step event is triggered. Since this reverts commit [1], we need
to ensure the bug it fixed does not reappear. This is done by ensuring
we don't check the saved value against the modified editing value when
it's empty (namely, the editor doesn't allow an empty string as a value
and replaces it with `<p><br></p>`, which we need to undo in
`_isDirty`).

task-3263653
task-3288416
opw-3274329

[1]: https://github.com/odoo/odoo/pull/113088/commits/095bbb93d6c3b9b0b099b7ed1a6a15e8ad914e9f

closes odoo/odoo#122628

X-original-commit: db0c092973f480f3336a44e5f6868dc5a79f0e3a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-05-26 16:15:59 +02:00
Antoine (ande) 5272cae62e [FIX] website_sale_stock_wishlist: add to cart
Current behaviour:
When activating "Prevent Sale of Zero Priced Product",
zero priced products could still be added to cart,
using the wishlist.

Expected behaviour:
Zero priced products should not be added to cart

Steps to reproduce:
1. Activate the setting "Prevent Sale of Zero Priced Product"
2. Create a product with a sales price of zero
3. Go on the product selling page, cannot be added to cart
4. Add the product to your wishlist
5. Go in the wishlist
6. The product can be added to the cart

Cause of the issue:
add_to_cart_button was overriden

Fix:
Added condition on override

opw-3283057

closes odoo/odoo#122618

X-original-commit: 37ae328e34a964e6daa31193e856322ccd59f597
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-05-26 16:15:56 +02:00
Ivan Rasputin 6a4d7107ac [FIX] snailmail_account: prevent error on computing warning message
Record `res.partner` may have empty name if it's an address record for a regular
partner [1]. This may lead to error `sequence item 0: expected str instance,
bool found` on computing `display_messages`.

Fix it by using `display_name` [2]

[1]: https://github.com/odoo/odoo/blob/c3209aec9741cda8597525add88b0a932fb7532a/odoo/addons/base/models/res_partner.py#L295
[2]: https://github.com/odoo/odoo/blob/b2f648fb3e3632e51123336850fd6ea1280925fe/odoo/addons/base/models/res_partner.py#L804-L833

https://online.sentry.io/issues/4183834755

closes odoo/odoo#122554

X-original-commit: 50ffa53147b496a0342cf3d8242a77a886034673
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-05-26 16:15:53 +02:00
tsm-odoo d10aab060f [FIX] mail: incomplete url regex
The discuss app uses an url regex in order to find links and
transform them to html before posting a message.

Before this commit, some unsafe url characters  were missing
from this regex, resulting in incorrectly parsed url.

This commit adds missing characters in order to match RFC1738
[1].

However the dot, comma and semicolon character won't be matched
if they are at the end of the url since those can be used as
punctuation.

[1]: https://www.ietf.org/rfc/rfc1738.txt

closes odoo/odoo#122621

Forward-port-of: 0dc68dc, 9302a23
X-original-commit: 80da20092b42d927ce8b09eb3b45de7216695263
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-05-26 14:28:46 +02:00
luvi acfb1977c7 [IMP] web: Auto tab is displayed by default in signature dialog
This commit improves the behavior of the signature dialog. Now, we don't
force the display of the dialog to the draw tab after a click has been
made on a field with the signature widget. The dialog has already supported
the management of the default tab when no defaultName props is given.

A test has been adapted to test this new behavior. This test used the full_name
attribute to verify the presence of the 'Auto' button. Now, this button is
selected by default.

task-3259468

closes odoo/odoo#122600

Signed-off-by: Georis François (fge) <fge@odoo.com>
2023-05-26 13:15:53 +02:00
niyasraphy 11d7f734a3 [IMP] stock: warehouse name field width
before this commit, in the warehouse form view
the  name field was short and name cannot be read
 fully without scrolling

after this commit, the field will utilize the full
available space and end users can read the name
easily.

closes odoo/odoo#121858

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-26 13:15:50 +02:00
Thanh Dodeur c9a7338cd0 [FIX] mail: fix the text color of rtc elements with dark backgrounds
Since MILK, the `bg-*` classes which used to set an appropriate
text color have turned into `text-bg-*`. Some were missed which resulted
in elements with low contrast between the text and the background.

This commit fixes this issue.

closes odoo/odoo#122606

X-original-commit: 15a2192c4fed0be7a62dbb6e0ab9eaadaecc10ce
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Thanh Dodeur (tso) <tso@odoo.com>
2023-05-26 11:40:56 +02:00
Thanh Dodeur 4e4e412b46 [FIX] mail: fix the filter video option in video calls
During the refactoring of discuss in 16.3, the setting to filter
the videos was wrongly observed on the settings instead of the channel.

This commit fixes this issue.

closes odoo/odoo#122605

X-original-commit: 00f55c6f925fa02cd292549498643f5415392a9f
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Thanh Dodeur (tso) <tso@odoo.com>
2023-05-26 11:40:54 +02:00
stcc-odoo c1690d3cd1 [FIX] fleet: select vehicle model on mobile
Steps to reproduce:

- Install fleet
- Switch to mobile view
- Create new vehicle
- Click on model field > Select a model

Issue:

Clicking on a car model does not perform any action.

Solution:

Add class `oe_kanban_global_click` to kanban items in order to capture user clicks.

opw-3188104

closes odoo/odoo#122567

X-original-commit: 7b56586f256461d19a4c8999d7dab05a6e33b1e2
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2023-05-26 11:40:49 +02:00
Julien Mougenot 7d1b8e5187 [IMP] web: Enhance date selection highlights
This commit introduces better visual indicators in the datetime picker
to highlight the previous selected value(s) and the new one(s).

closes odoo/odoo#122564

X-original-commit: 0fb302e748ffbdc3b8ee79bc6f1be62e8f11a2aa
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-05-26 11:40:46 +02:00
Julien Mougenot 9d8c93ee67 [FIX] web: Open datetime picker on click
Before this commit, the datetime picker would open on date/datetime/
daterange fields when their input was focused.

The intended behavior was for the picker to open on click instead. This
commit does that, as well as re-positionning the picker when switching
between single date and range values.

Task 3323594

X-original-commit: 39443638de8b50263b07d82b2d34aeb62c5ebb5b
Part-of: odoo/odoo#122564
2023-05-26 11:40:46 +02:00
Julien Mougenot a563edc696 [REM] web: Remove local fast date comparison in date utils
This commit removes a function from the `@web/core/l10n/dates` file
which was designed to save some time when comparing 2 dates.

The existence of this function was justified by the fact that Luxon
would allegedly perform expensive and needless transformations to
convert a date to a number (which is the case when comparing date
objects).

However it appeared that it was a mistake on my part, as I actually
inspected the wrong class method: I checked the `valueOf` implementation
of the `Duration` class, not the `DateTime` class.

X-original-commit: 995a1ab49bdd9e63b4f1027bbd723037c5045d21
Part-of: odoo/odoo#122564
2023-05-26 11:40:46 +02:00
Julien Mougenot ddc98a8cd8 [REM] web: Remove keynav from datetime picker
Removed the keyboard navigation in the datetime picker since it was
poorly designed and less useful than directly type the date in the input.

X-original-commit: 029334a305ddfa645244b67d4228861ca867d8ee
Part-of: odoo/odoo#122564
2023-05-26 11:40:45 +02:00
Julien Mougenot 772e7367fd [FIX] web,*: Set dropdown button tags to span
This commit changes the arrow icon tags of autocomplete dropdowns to be
spans instead of an anchors.

This is because these elements are inert icons without href or handlers
attached, and they tricked the list keyboard navigation into considering
them as valid focusable elements.

X-original-commit: d253e41c44accd43cbd6478717e3978772076974
Part-of: odoo/odoo#122564
2023-05-26 11:40:45 +02:00
David Monnom (moda) c997ac8e11 [IMP] pos_*: order btn is always primary
closes odoo/odoo#119032

Related: odoo/enterprise#39981
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
2023-05-26 11:40:33 +02:00
Habib (ayh) 1ce9dece80 [IMP] account: compute foreign amount on bank transactions
With this commit, we improve the usability of foreign bank transactions.
When capturing a new bank transaction (account.bank.statement.line)
- when capturing a new transaction we compute the amount currency based on the transaction date, amount in journal/company currency, and foreign currency
- when the foreign currency is removed, the amount_currency is cleared

Task-3338560
Task-3338532

closes odoo/odoo#122595

X-original-commit: 737c7d26c415b5a136635ef3e4d33d086961c4da
Related: odoo/enterprise#41532
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-26 10:29:30 +02:00
Pierre Masereel 74c14ac2f0 [FIX] base: count attachment correctly
Since _search return a query object, we cannot slice it. So we listify
it.

Thanks to XMO and RYV for their very valuable input.

closes odoo/odoo#122589

X-original-commit: 2e51b638232aff90405f318abb849f8b8db38496
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-26 10:29:24 +02:00
Christophe Monniez 428b78e9bd [FIX] tests: move enter test_mode in setUpClass
Before this commit, the registry was entering test_mode in setUp,
leading to a hole during the setUpClass with a registry not in test mode
at this moment.

closes odoo/odoo#122585

X-original-commit: 993e4d2f98b9982eb64123d6cd0de8cc3b2056f4
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-05-26 10:29:22 +02:00
Christophe Monniez ba5087cc6d [FIX] link_tracker: changes test of render mixin to Httpcase
As this test navigates to some routes, it clearly should be an HttpCase.

X-original-commit: 8fa339a9c75be6055b1537402eca3060a4c9f701
Part-of: odoo/odoo#122585
2023-05-26 10:29:22 +02:00
Csaba Tóth 50a4adab56 [CLA] OdooTech Zrt signs Odoo CCLA v1.0
closes odoo/odoo#122584

X-original-commit: 3e757c5973df1f5a97170832a4355cbae195e5d6
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-26 10:29:18 +02:00
Alexandre Kühn 42a2a6b74a [FIX] mail: correct responsive UI for attachment cards
Before this commit, attachment cards overflow in chat window
when attachment name is very long.

Text is properly flagged for truncate, but the container had neither
`overflow-auto` or `min-width: 0` to allow flex to shrink below
its content size.

Also add some horizontal spacing in attachment list so the
attachment cards do not have any contact with composer border.

closes odoo/odoo#122583

X-original-commit: 0d0ab2543d8c6a944fb091fa4ac30a19e1924e71
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-26 10:29:16 +02:00
Pierre Masereel b5854af2b6 [FIX] base,web: get correct mimetype for menu item icon
Since changes made in https://github.com/odoo/enterprise/pull/41117 we
cannot provide icons for menus in an other format than png. As it was
allowed before to use SVG, we don't want to restrict to only one format.

Before, it was trying to gess the mimetype based on the image content
which is not also the best case.

So as the icon is a binary field store=True, we can just take the
mimetype from the attachment.

closes odoo/odoo#122580

X-original-commit: 044e6b680bc988708a9bbcc3c93dabf787c4a190
Related: odoo/enterprise#41529
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-26 10:29:10 +02:00
Saurabh Mishra 69f335ff2f [FIX] website_sale: preventing list index out of range
When user enters empty space in name field instead of entering an
actual name and confirm their billing, shipping address then when
they click on paynow to confirm order they will face the issue
'list index out of range'.

Note : Do the paypal configuration before following below steps.

Steps to produce:
1) Vist the website as a public user.
2) Create a sale order by adding some products to the cart.
3) While entering shipping and billing address, in the name field enter
some space.
4) Click on next button.
5) Now a sale order is created.
6) Go to orders through 'website' module.
7) Open the order created and generate a payment link.
8) Paste that payment link in another tab or browser .
9) Click on pay
10) By following above steps you will encounter the error.

This commit will prevent the above error.

sentry - 4177783431

closes odoo/odoo#122572

X-original-commit: bce2c37770ec43548f0cb9f35e87820e74254d09
Signed-off-by: Saurabh Mishra (sami) <sami@odoo.com>
2023-05-26 10:29:08 +02:00
Yolann Sabaux 12fc813b58 [FIX] account: display qr_code
Steps to reproduce:
- activate qr-code
- create a contact with a valid account and activate "send money"
- create a bill for this customer
- register the payment
- view the payment

Issue:
The QR-code is displayed as plain text

Cause:
The commit 688986f deleted the use of markup and the field qr_code is still as char and cannot be Markup'ed by the ORM

opw-3293289

closes odoo/odoo#122553

X-original-commit: 61a519aa5d62891fd8bda232ae09b48381786cf8
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-05-26 10:29:05 +02:00
David (dafr) 5bfae344c8 [FIX] purchase: recompute qty_received_method
qty_received_method is not recomputed if the product type change, and can lead to issues on existing purchases when trying to generate a Vendor Bill.

# HOW TO REPRODUCE:
- Create product P, type: Service, Control Policy: 'On Received Qty'
- Create PO for 1 unit of P (do not confirm)
- Update type of P to Storable
- Confirm PO, Receive Products
=> Qty Received is 0, not able to generate Bill

closes odoo/odoo#122409

X-original-commit: fcc1e8e325e6d9f4782b2f82769e1200b7b9a0c3
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Fesquet David (dafr) <dafr@odoo.com>
2023-05-26 10:28:57 +02:00
Alexandre Kühn a06ffa954a [FIX] mail: improve emoji picker style
- (rounded) buttons in header
- header buttons keep grayscale filter regardless of active
- search bar is rounded
- section in emoji content show the icon and the name of category
- less dark color in dark mode

closes odoo/odoo#122565

X-original-commit: 2c53cb5b07f3f940cd27b242949ff2ff4bae7672
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-26 09:13:31 +02:00
Dylan Kiss (dyki) 7bc50e848c [FIX] account: payment terms balance line
After the removal of the `balance` line in payment terms in 16.2, the
behavior was not the same as it was before when using a fixed line.

Example: $ 1000

| Amount | Type    | Example Value |
| ------ | ------- | ------------- |
| 50     | Percent | $ 475         |
| 50     | Fixed   | $ 50          |
| 50     | Percent | $ 475         |

We used to remove the fixed lines, then split the remaining amount
according to the percentages, and finally insert the fixed lines again.

Since this behavior is both different than before (where we had a
balance line) and not clear to the user, we changed it so that the last
line in a payment term (no matter the type) is behaving as a balance
line. After this fix, our example looks as follows.

Example: $ 1000

| Amount | Type    | Example Value |
| ------ | ------- | ------------- |
| 50     | Percent | $ 500         |
| 50     | Fixed   | $ 50          |
| 50     | Percent | $ 450         |

task-3270971

closes odoo/odoo#122552

X-original-commit: 1bc73bc9daff4fa9d88739ba49382971f2077e3f
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-05-26 04:15:56 +02:00
Robin Lejeune (role) 70aa5abf20 [IMP] website_links: modify UTM placeholders
With the current placeholders, the marketing team always confuses
Campaign, medium & source. This commit rewords the placeholders.

task-3329960

closes odoo/odoo#121672

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-05-26 04:15:53 +02:00
Alexandre Kühn 123c9b3b47 [FIX] mail: show more options in chat window header
Before this commit, chat window header showed all actions,
which made it quite bloated. The name of conversation was
sometimes completely truncated by available actions.

This commit fixes the issue by showing at most 2 actions
immediately in the chat window header. When there are more
actions, it shows an expandable more menu.

As a consequence of this change, when a panel is open, it
was harder to see the button to close the active panel
(toggling off the button).
To solve this issue, when a panel is open in chat window,
there's a floating button in the top-right corner of content
to close the panel.

Task-3334793

closes odoo/odoo#122419

X-original-commit: eef4ef86e66709eef5b34ebce37cda3aab037bf9
Related: odoo/enterprise#41466
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-25 22:33:42 +02:00
Laurent Smet 43f89e1fea [FIX] account: Allow copying reco model lines
When duplicating the reco model, we want to counterpart entry lines to be copied as well.

closes odoo/odoo#122418

X-original-commit: c5d5f4db3e30b1d4d9dea8d7ca6991c37c91f9a9
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-25 22:33:40 +02:00
Claire Bretton (clbr) 1f7dce5908 [FIX] account: add more testing for taxes update script
Adds more tests to the update of taxes.

closes odoo/odoo#122413

Task: 3178775
X-original-commit: 7c1e20602ae4d23c7a6174877766fbe86e717e08
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
2023-05-25 21:28:53 +02:00
aliya dd7df8122f [FIX] account_edi_ubl_cii: fix partner creation during import
If a partner in the imported invoice does not exist, we create one on the fly. However, the partner is created without a country and `_run_vat_test` doesn't check it properly in 15.0, and fails in later versions, where we try to get the country code from the country we pass from `_import_retrieve_and_fill_partner`, which is `False`.

This commit retrieves the country from the imported invoice to create the partner and passes the object instead of the `country_code` string to `_run_vat_test`

closes odoo/odoo#122410

X-original-commit: fc1f9b15e54794b1029daffa3719b2f30873ee0a
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-05-25 21:28:51 +02:00