Commit Graph
170502 Commits
Author SHA1 Message Date
lakhichand borse dccca8fe8d [FIX] project: fixes 'view task' is display once the task is saved in portal
Steps to reproduce:
- Open project share any project which has task.
- My account > project > open that project you can see task .
- Open any task and add new sub-task you can see once the sub-task is saved
  'task view' button is displayed.

Issue:
- Sub-tasks notebook > add a line > 'view task' is displayed at the creation but
  is then hidden once the task is saved.

Solution:
- Correct the attrs and change the condition in able to invisible 'view task'
  once the sub-task is saved

task-3602610

closes odoo/odoo#160117

X-original-commit: cd6ed7f9fd2e0654cfb0672d7a9536dca21035cf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-04-05 14:01:07 +00:00
Laurent Smet 89c9396cc3 [FIX] account,point_of_sale: Fix computation of GST group of taxes in india
Configure the group of taxes 5% GST to be price_included and apply it on 295.
Both children taxes must have the exact same amount.
However, this is not the case. In this example, we get 7.02 for one tax (correct) but 7.20 for the other.
This is because both taxes are "include_base_amount".

opw-3758458

closes odoo/odoo#160541

X-original-commit: ce28edbaae5a9af0a8c6e1f2addf4285ec56e9e1
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-04-05 12:18:18 +00:00
kcv-odoo b4985308b4 [FIX] project: fix milestone options issues in sub-task page
Steps:
- Install project app.
- Share a project which contains a task and
sub-task and project should have allow milestone
- Go to task form in project sharing.
- Go to milestone field of sub-task page.

Issue:
- Milestone field has can create and can open options
enable and because of that portal user able to create
edit or open milestone and which leads to tracebacks

Cause:
- There was no options added to prevent those attribute
from that field for project sharing views.

Fix:
- Added option to prevent those operation for project
sharing view.

Note: Add this options in blockby page in FW port.

task-3764782

closes odoo/odoo#160514

X-original-commit: 9b5da888af627e0d7efc8cdd49f41c023c79bb25
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-04-05 12:18:17 +00:00
Djamel Touati a0235d1e77 [FIX] delivery: update picking weight when product of the move changes
Steps to reproduce the bug:
- Create a storable product “P1” and "P2":
    - Weight "P1": 1kg
    - Weight "P2": 2kg

- Create a picking with the product “P1”
- Change the product of the move to “P2”

Problem:
The picking weight is not updated

opw-3754884

closes odoo/odoo#160215

X-original-commit: 849ece86a6cf49c0a9249ed910aa52add197f431
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2024-04-05 12:18:16 +00:00
Arnold Moyaux 180224ae1d [FIX] stock: don't use visibility days in reordering
This reverts commit 8a5541d16caa793c7549d78c082f7879d3aba233.

It's a too big change for stable. It breaks the flow for poeple
that want to be in just in time but want to consider the future
deliveries to order all at once. Due to reverted commit they see
their reorder in advance.

The fixed use case, could be achieve with the security days or the
global lead days system parameter.

opw-crl

closes odoo/odoo#158302

X-original-commit: 51833e4735fb0b761d3cd2867dfd166813469e70
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2024-04-05 12:18:14 +00:00
Maximilien (malb) 7e9a87388e [IMP] account: adding id
This pr will add an id on a div to be able to do a xpath on it.

closes odoo/odoo#157648

Task: 3756179
Related: odoo/enterprise#58640
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2024-04-05 12:18:13 +00:00
Loan (LSE) ccbfdea3dc [FIX] hw_drivers: get IoT log file instead of Internal Server Error
Before this commit:
 Using the "Download logs" button from the IoT box form view will
fail every time due to an Internal Server Error on the IoT side.
```py
File "/home/pi/odoo/odoo/tools/misc.py", line 189, in file_path
FileNotFoundError: File not found: /var/log/odoo/odoo-server.log
```
This happened due to changes introduced in:
https://github.com/odoo/odoo/pull/99658

The changes enforced to double check that the file path was in an
odoo addons (for security reasons).
However, it is generally not the case, thus the error

After this commit:
The log file is downloaded as intended

opw-3827121

closes odoo/odoo#160576

X-original-commit: a7aa4c6e58d6448556c85c393f2910490a0519f5
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2024-04-05 10:30:40 +00:00
lejeune quentin 3da6cbfbea [FIX] pos_viva_wallet: Add possibility to copy webhook
Currently, when you copy the viva wallet webhook to
configure it in your account, you have to select it manually.
With this commit we add a “CopyClipboardChar” widget
which does this automatically.

closes odoo/odoo#160516

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2024-04-05 10:30:39 +00:00
Andrea Grazioso (agr-odoo) 3f14dfe63e [FIX] pos_loyalty: check expired promo code
Create an expired loyalty program with code
Open POS session
Add product
Apply code

Issue: code is applied even if expired

opw-3624670

closes odoo/odoo#145609

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-04-05 10:30:38 +00:00
Paolo Gatti (pgi) 58fefc94ca [FIX] account: Fix restrict_mode_hash_table's account.journal write
A partner found a bug, when this public method is called on a recordset
of more than one journal then the restriction will traceback, as the
`id` can only be called on one journal.

Simplest solution is to simply get `id` on the loop variable instead,
and let the code normally block the user with a UserError.

Credits to: https://github.com/juppe
Old PR: https://github.com/odoo/odoo/pull/150888

closes odoo/odoo#160585

X-original-commit: a0ca663b78741a82fcc8f4bea97779aa97087754
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2024-04-05 08:57:50 +00:00
Nguyễn Đại Dương e7187ec1c0 [IMP] website_blog: avoid redirect 301 for /blog/feed
-Before this commit the url is like /blog/1/feed then it will become a
redirect 301 url to /blog/travel-1/feed which is not good for SEO.
Therefore we change to slug(blog) to ensure no redirect occur

closes odoo/odoo#160583

X-original-commit: 3192d2d531e918a705aee2341881a80294f848dd
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2024-04-05 08:57:49 +00:00
Louis (loco) d234e26890 [FIX] portal, *: display avatar when read access right are fulfilled
*: test_mail_full, website_blog

Steps to reproduce the bug:
- Enable the comments on a blog.
- Add a comment.

-> Problem: The avatar of the comment is the default placeholder image.

The problem appears since [1]. This commit was created to bypass the
read access of an image if a correct `token` was provided in the dataset
of the `.o_portal_chatter` element. The problem is that since [1], if
the `.o_portal_chatter` element does not have a `token` (or a `hash` and
a `pid` since [2]) in its dataset, the avatar images are displayed as
the default placeholder image by default. The goal of this commit is to
correct this behavior; if there is no token provided, the previously
used `/web/image` route is used to show the avatar. Thanks to this
route, the avatar is displayed if the read access is fulfilled. If it is
not the case, the default placeholder image is displayed.

[1]: https://github.com/odoo/odoo/commit/d4eb996cd3caea3fbb822437057a6a5a8a722293
[2]: https://github.com/odoo/odoo/commit/7f69708bcce3b3c4b096d89cb0ec354998eac191

opw-3749422

closes odoo/odoo#160240

X-original-commit: https://github.com/odoo/odoo/commit/c65cffd6447afce65a45a38690c003e84afd63d9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
2024-04-05 08:57:48 +00:00
Arnold Moyaux 0c2b6fa7be [FIX] mrp: Handle kit with BoM having qty != 1
Use case:
- Create a Kit BoM with finished qty to 5 consuming 10 components
- Do a sale order for 3 units (3/5 of BoM)
- Update the sale order line to 4 units

Current behavior:
The delivery has a huge amount to deliver

Expected:
The delivery is for 8 units

It happens because the method `_compute_kit_quantities`
always expect a BoM for 1 units.
`bom_line_data['original_qty']` always contains the number of times the
BoM will be needed and not the quantity of finished products.
In order to have the number of component by unit of finished product we
have to introduce the BoM quantity in the formula

closes odoo/odoo#160149

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2024-04-05 08:57:48 +00:00
adch-odoo 1d7b08184b [FIX] web_editor: resolved NaN issue in font-size dropdown in toolbar
Commit [1] resolved an issue related to the behavior of small font sizes, which
caused 'NaN' to appear in the font-size dropdown within the floating toolbar.
This occurred due to the removal of a variable definition, resulting in the
inability to compute the font size. This commit rectifies the problem by
reintroducing the variable in the SCSS file to ensure correct rendering.

[1]: 7931d1a14a

task-3801894

closes odoo/odoo#158811

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2024-04-05 08:57:47 +00:00
Julien Carion (juca) 42b760c8fa [FIX] board: make embedded views scrollable
This commit fixes an issue with the embedded views of "My dashboard"
view: the embedded could take as much height as they needed which could
result in excessive place taken by a single embedded view and this also
had issues with the virtual hook which is not adapted to embedded views
without scroll (this could result in completly blank space inside
embedded gantt views when they would take too much space). To solve
this issue, the commit adds a fixed maximum height to the embedded views
(80% of the window height) and also adds a minimum width to their content
so that it will be horizontally scrollable instead of being weirdly
squished. Also tweaks a bit the padding of the embedded view so that it
looks a bit better even with the added scroll bars.

task-3834795

closes odoo/odoo#160568

X-original-commit: 3df65df6a4ea027b14cc7d877de96db0987f688f
Related: odoo/enterprise#60117
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2024-04-05 07:20:50 +00:00
sesn-odoo fc0c5eead6 [FIX] l10n_es_edi_facturae: display error for EDI on refund w/o invoice
Currently, a traceback appears when you attempt to generate a Facturae
document for a credit note created manually.

Steps to reproduce
------------------
* install `l10n_es_edi_facturae`
* create a credit note manually (not from an invoice)
* confirm and attempt to generate the Facturae EDI file

You should be me with a traceback:
`ValueError: not enough values to unpack (expected 1, got 0)`

Cause
-----
To generate the EDI document, the system needs the credit note to have a
link to the refunded invoice. However, in this case, there's no invoice
since the credit note was created manual.

opw-3786219
opw-3772085

closes odoo/odoo#160565

X-original-commit: 202387e518118171051e0db0fe857f44d442fb95
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2024-04-05 07:20:48 +00:00
aath-odoo 3c17d2ef3b [FIX] website_event: submenu page not found
Before this commit:
When disabling the submenu for events, it would show a 404
Page Not Found error.

After this commit:
the current behavior is that when the
submenu is disabled, it redirects to the /register page of the event.

task-3658380

closes odoo/odoo#160544

X-original-commit: ea140d5cfea992caad7207ff6499a46a8f575729
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Aashish Thakur (aath) <aath@odoo.com>
2024-04-05 07:20:48 +00:00
Dawn Hwang 6cb886efc0 [FIX] hr_holidays_attendance: Fix time off overtime duration check
Currently when a time off using an overtime is written to for any
reason, it will compare the duration of the overtime with the
number_of_hours_display. However, the duration check will always be
triggered since overtime duration is number_of_hours_display * -1

This causes problems if an overtime time off is modified for any reason
and the employee does not have enough total_overtime

closes odoo/odoo#160381

X-original-commit: 1c477259d08995d1b0bfe8ebd551452073e0c03b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-04-05 07:20:47 +00:00
Ethan Vincent a11bca1810 [FIX] sale_loyalty: skip paid calc if ewallet type
**Current behavior:**
Creating an ewallet loyalty program and removing the default
value for `trigger_product_ids` without adding another in its
place will result in any ewallet created using that program to
not have its balance deducted after being used in a sale order.

**Expected behavior:**
The default product should not be required here, nor should any
product, seeing as there is no `required` constraint on this
field nor any related ones.

**Steps to reproduce:**
1. Create an ewallet loyalty program and remove the Top-up
     ewallet product

2. Create an ewallet, give it some balance, and use it in an
     order

3. Check the balance of the wallet to see the erroneous behavior

**Cause of the issue:**
In the _program_check_compute_points() method of `sale.order` in
`sale_loyalty`, the conditional block:

`if not products_per_rule.get(rule):
    continue`

will normally prevent rules belonging to ewallet program types
from going further in the method because they have the default
ewallet top-up product in their domain. When the continue is not
reached, they will reach this line:

`amount_paid = sum(max(0, line.price_total) for
    line in order_lines if line.product_id in rule_products)`

which will end up offsetting the actual subtraction of a SOLs
`points_cost` from an ewallet `loyalty.card`'s balance.

**Fix:**
Add another check prior to the calculation of order points which
prevents ewallet coupons without any top-up products from
reaching the problematic code. If an ewallet program doesn't
have any `trigger_product_ids`, it shouldn't ever need to
perform such calculations.

opw-3756134

closes odoo/odoo#159957

X-original-commit: 695b3a687a3d160451339a675aab8986682389eb
Signed-off-by: Vincent Ethan <etvi@odoo.com>
2024-04-05 07:20:46 +00:00
lakhichand borse 9e0e04eeaf [FIX] project: fix name alignment when grouping by task stages
Steps to reproduce:
- Open the project in mobile view
- go to the kanban view enable task stages
- add one new staged with large name you can see name is
  misaligned

Issue:
- In mobile view task stage name is misaligned

Solution:
- Adding class in able to not overflow name in kanban view

task-3602610

closes odoo/odoo#160540

X-original-commit: 7403bd65fd50c51d3a114a50f812a6f3740faa87
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-04-05 06:03:46 +00:00
Rocío Vega d37ac62d75 [IMP] account: add Reversed payment filter to invoice search view
Moves with a reversed payment_state are not included in the domain of the
"Paid", "Unpaid" or "Overdue" filters. This means that it is not possible to
display reversed invoices when using any combination of these filters.

In this case, it is preferable to be able to encompass the entire range of
possible states with a combination of filters. so rather than adding the
reversed payment state to the domain of the "Paid" filter (since reversed
payments aren't strictly "Paid"), this commit instead adds a new filter
"Reversed" with its domain set to include reversed payment invoices only.

closes odoo/odoo#160581

X-original-commit: 43a9b7afe4418fda10083fe7ced7744f0d93f79a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2024-04-05 04:49:17 +00:00
tsm-odoo 561cb2da84 [FIX] im_livechat: clean live chat template
Before this PR, the external live chat templates contained useless
parts, residus of the old live chat implementation. This makes the
live chat code harder to understand and to maintain. This PR removes
those outdated parts.

task-3852092

closes odoo/odoo#137574

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-29 10:46:24 +00:00
Mylyna Hy ccfd48f3b4 [FIX] sale: hide product warning
Problem: When the user sets a warning message for a product,
the message will always display even if the warning type is
no-message.

Purpose: The product's warning message should not display
if the warning type is no message.

Steps to Reproduce on Runbot17:
1.Install Sales
2.Enable Sale Warnings in Setting > Sales
3.Modify the sale warnings for a product
4.Create a quotation
5.Click on the catalog and look for the modified product
6.Observe the warning

Bug from commit: https://github.com/odoo/odoo/commit/a60cced44810d708beaf8ea5a166aa554a7c852b
opw-3806520

closes odoo/odoo#159795

Signed-off-by: Mylyna Hy (myhy) <myhy@odoo.com>
2024-04-04 18:39:19 +00:00
aliya 10363b3ae1 [FIX] account_peppol: fix peppol ready state
- Create a Partner who is a valid Peppol participant
- Clear their UBL format - they are still displayed as valid (Bug 1)
- Create an invoice for that partner and confirm it. The Peppol state changes to 'ready'
- Erase eas or endpoint on that partner and verify - the partner is now not a valid Peppol participant
- Reset the invoice to draft, confirm again: the peppol move state is still `ready`

1. Do not set a participant as valid if a peppol-incompatible edi format has been selected
2. Only save Peppol move state if it's processing/done already. Otherwise, let users clear it by resetting to draft.
(until we implement giving them control over this field)

opw-3784945

closes odoo/odoo#159852

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-04-04 17:02:58 +00:00
Chrysanthe (chgo) cef76872f8 [FIX] base: fix password edition modal weird design
This commit removes an unwanted `bg-primary` class applied to the change
password modal, making it weird and unconsistent regarding others modals
across Odoo.

=========
Steps to reproduce
=========

> Open a database
> Click on your avatar in the top right corner
> Click on `Preferences`
> Go to `Account Security`
> Click on `Change password`

>> The modal has a `bg-primary` class, making it look purple.

task-3836699

closes odoo/odoo#160462

X-original-commit: 2813540aba7556b915185e482cbb6d9500db7af1
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2024-04-04 13:26:32 +00:00
ahmad(alah) f31174e021 [FIX] google_calendar: updating recurrent events on google side
Before this commit when accepting a recurrent event from google calendar with option "this event", it didn't reflect on odoo calendar.
This happened due to the write_date check which applies google update only if their write_date is after odoo write_date,
but multiple updates from google might change some events write_date to now, which causes other google updates to get discarded.

This commit aims to fix this issue by keeping the write_date of the affected events before applying any google updates, and considering these dates instead of the live odoo write_date.

closes odoo/odoo#160357

Task: 3731552
X-original-commit: 3bcf6c458a4b483af6467d1c027b60771d1ce08d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-04-04 11:48:12 +00:00
Anita (anko) e2c6b088f0 [FIX] payment: express checkout removed for free carts
If user changed quantity of products to amount that would create free
cart, without refreshing the page, they were still able to use express
checkout which was causing an error.
If user has free cart now, it will make express checkout button dissapear.

task-3568644

closes odoo/odoo#160386

X-original-commit: 0b47abaa6d682fb5c243d1b36dbed263343ce586
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: anko-odoo <anko@odoo.com>
2024-04-04 09:52:50 +00:00
Hubert Van De Walle c6640ddafd [FIX] web: keep group order when restoring empty kanban group
Steps to reproduce
==================

- Go to Field Service
- Group by "start date: week"
- Archive every record in a column until there is only one left
- Go back to the kanban view
- Click on the single record from the column
- Archive it
- Using the breadcrumbs, go back to the kanban view

=> The group order is not preserverd and the empty one is the last one

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

Before archiving the record, we have the following data:
`{group1: [1], group2: [2, 3]}`

After archiving the record, we have `{group2: [2, 3], group1: []}`

A new group is recreated from the old one, but it is always added at the
end.

Solution
========

We can insert the old group at his previous index.
The same solution was used in previous versions

opw-3816409

closes odoo/odoo#160121

X-original-commit: 0d44e931c40fbca005b8d1864cf2d07485ed84f8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-04-04 09:52:49 +00:00
Dylan Kiss (dyki) 1ff30496f9 [FIX] base_vat: make VAT examples translatable
Currently some VAT examples that contain other terms than only the
number are always displayed in English. This commit makes sure they can
be translated.

closes odoo/odoo#159724

X-original-commit: 504240b8633aac91eee421f3268550a1c04142a2
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2024-04-04 09:52:48 +00:00
amdi-odoo 52fd063a0d [IMP] survey: improve results page
Add a bunch of QOL improvements in the results page design:
NB: In order to stay stable-compatible, using "d-none" to
hide elements and using the "fs-x" class to resize the texts
instead of changing the header tags.

- Display the survey results page in half page size to prevent having too
much blank space between the tables columns
- The filter buttons are now displayed under the survey title
- Set the print button as always visible even on smaller screen sizes
- Show the leaderboard bar on the print preview
- Changing the eye dropdown icon to a caret for fold/unfold
- Align questions to the left to be on the same level as the sections
- Add an horizontal scroll to the matrix and simple/multiple choices tables
when the screen is not wide enough to display all the data
- Reduce vertical spacing between elements to gain space
- Reduce simple/multiple choices tables line height
- Reduce survey title, section title and KPIs font size
- Display the "Correct", "Partial", "Responded" and "Skipped" badges on a
single line under the question and set a rounded border around each badges.
- Fix the "Correct" and "Partial" display conditions
- Removing the "Result Overview" title
- Removing survey description, section description and question description
- Rename the "Maximum", "Minimum" and "Average" badges to "Max", "Min" and "Avg"
- When collapsed, hide the whole question on print preview
- When collapsed, only show the question title and hide the KPIs

Task-3707687

closes odoo/odoo#152263

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-04-04 09:52:46 +00:00
Chrysanthe (chgo) 2bb1e1eae9 [FIX] website_sale: fix eCommerce categories form view mobile
This commit fixes a layout issue inside the eCommerce categories form
view on mobile devices.

Prior to this commit, a `.oe_left` class was applied to the content of
the sheet, moving it "out of the flow", resulting in a wrong sized
`form_sheet`.

To fix the issue, we remove the `.oe_left` class, we apply a `.col-md-4`
`col-lg-6` to handle the width on large devices, and add a `.pe-3` to ensure that
the labels are not placed right next to the image in mobile.

task-3847917

closes odoo/odoo#160422

X-original-commit: 6aca24b14330b7681f8307f818135bd2bf71ab08
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2024-04-04 08:18:56 +00:00
rolandojduartem f7f2c93eb7 [REF] l10n_pe_pos: remove inheritance to handle errors in partner editions
Now, point_of_sale handles errors in partner editions, so it is not
required inheriting the method to add the functionality.

closes odoo/odoo#160389

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2024-04-04 08:18:55 +00:00
Julien Banken b1b836856c [FIX] web: prevent crash when closing the emoji picker
Currently, the emoji picker uses the `onWillUnmount` hook to detect when
the popover element is closed. The code defined in this hook accesses the
component's DOM and retrieves the scroll offset of the emoji picker's
scroll view. The scroll offset will then be saved and restored the next
time the emoji picker is opened by the user.

Unfortunately, it happens that the emoji picker's scroll view is no longer
in the DOM when the popover is closed and when the callback function
passed to the `onWillUnmount` hook is called. When this happens, the
system will log an error to the console (`TypeError: this.gridRef.el
is null`) and the user will not be able to reopen the emoji picker.

To fix this, we simply check that the emoji picker's scroll view exists
before retrieving the scroll offset of the element in the `onWillUnmount`
hook. This fix will prevent the error while keeping the code simple.

Steps to reproduce the issue:
1. Click on the article emoji
2. Click out of the dropdown to close it
3. Click on the article emoji again

=> The emoji picker no longer appear.

TO BE: The emoji picker should reappear when the user clicks on the emoji.

task-3818728

closes odoo/odoo#160353

X-original-commit: 6ae04b576a3f3b74febf029383c0f6d9ca5744cf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Julien Banken (jbn) <jbn@odoo.com>
2024-04-04 08:18:54 +00:00
Sarah Bellefroid e5b4674d94 [FIX] mrp: compute manufacture workorder duration
Currently, when making a manufacture order, the duration for operations is not computed when time was not tracked.

Steps to reproduce:
-------------------
* Go to the **Manufacturing** App
* Under **Products**, select **Bill of Materials**
* Create a new bill of materials
  * Add any product
  * Add any component
  * Add an operation
    * Select any work center
    * For `Duration Computation`, select `Set duration manually`, set any amount
* Save everything
* Under **Operations**, select **Manufacturing Orders**
* Create a new order
* Select the product for which the bill of meterial was created
* Save > Confirm > Mark as done
> Observation: Real duration is showing 0, instead of the manual amount.

Why the fix:
------------
As of now, the duration only depends on the time tracked on each operation.
https://github.com/odoo/odoo/blob/7a9b05e5e7ccc54fe673a00167a261c2c6181d0a/addons/mrp/models/mrp_workorder.py#L318-L321

The issue was solved in upper versions with this fix: https://github.com/odoo/odoo/commit/5e2b97b47f3cf14616c24631acf2cd08f0295a43

I'm backporting this fix for consistency even though the issue it was originally for does not exist in 16.0 but it still solves the fact that the duration isn't computed if time was not tracked.

opw-3800477

closes odoo/odoo#160372

X-original-commit: 20cc428f6a0459587ba241086040626a5818f53b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Sarah Bellefroid (sbel) <sbel@odoo.com>
2024-04-04 06:52:39 +00:00
Tran Truong Son e721ed146d [FIX] account: fix error when delete the SO on form view
Reproduction steps:

- disable any debugger parameter that would on in the url
- create a new sale order
- add a sale order line with a tax
- save (and don't leave the record!)
- delete the sale order

Regarding the bug, there are several issues happening at the same time:

- Business code issue:
	- Our code wasn't defensive and we were assuming the computed value
would always be set to the computed value.
- Framework JS issue: (not OWL itself but its integration into Odoo)
	- When the record is deleted, a re-rendering gets triggered.
	- As we deleted the record in the back, the browsed record in the
front-end gets its data reset to the default values a field could have.
Because the default value of a binary field is False, tax_totals gets
set to false for the reset record.

Now, we have a bunch of race conditions going on.

In the invoicing view, it doesn't happen because the rendering is slower
and it gets cancelled before being done. Thus the field tax_totals
hasn't the chance to re-render itself and thus, to call
TaxTotalsComponent.formatData through the call of onWillRender.
In the case of the sale order view, the field has the time to gets
rendered, the method gets called and the traceback happens.

closes odoo/odoo#159018

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-04-03 22:17:53 +00:00
Tanguy Quéguineur 13dd9c827e [FIX] account_margin: display correct tooltip in report
Issue
-----
The tooltip help text doesn't match the actual calculation made in the product margins report.

opw-3792181

closes odoo/odoo#160375

X-original-commit: aa8a769d5bc15e01ae1f37271d16c42e4d18df40
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-04-03 20:38:21 +00:00
Antoine Dupuis (andu) 294e0d7e2e [FIX] l10n_es: Fix equity account types
Accounts 10x -> 13x should be of 'equity' type.
(In the Balance Sheet, they are referenced under the Equity section.)

opw-3743637

closes odoo/odoo#160324

X-original-commit: cfb474a7081f5b123bf27a5234d2d11819f19011
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2024-04-03 20:38:20 +00:00
Lina (liew) affcba7ea7 [IMP] website_sale: improve checkout UX
- replace order summary by a dropdown like mobile view
- remove 'Pay With' title
- match 'Choose delivery method' style with 'Choose payment method'
- make order summary sticky so that 'Pay now' is always accessible
task-3741412

closes odoo/odoo#154035

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-04-03 17:48:47 +00:00
Akshat Trivedi a54e64d720 [IMP] web: allow to give a maximum of file to upload in m2m binary
People may have used a m2m where we don't really want a m2m relationship.

Task-3605612 (WhatsApp: Fix header / upload / reporting usage)

closes odoo/odoo#160332

X-original-commit: 910e41baf0d6ab558c53d41e511b3f10bf9860ad
Related: odoo/enterprise#59987
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-04-03 16:27:12 +00:00
Pierre Masereel 1b0dbb3645 [FIX] *: add indexes
Deleting a partner may take a long time because odoo has to check an
entire table to find few records or no records at all that reference the
partner and set it to null.

So we are adding an index btree not null to speed up the deletion of
partners.

closes odoo/odoo#160184

Task-id: 3759406
Related: odoo/enterprise#59932
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-04-03 16:27:10 +00:00
Wolfgang Taferner f62d35e3de [FIX] base_vat: properly display in context
Having the VAT VIES Check valid field directly next to the VAT number
as an inline element becomes unreadable, so we wrap it add padding and text-nowrap

closes odoo/odoo#159332

Signed-off-by: William André (wan) <wan@odoo.com>
2024-04-03 16:27:08 +00:00
Gabriel (gdpf) a08e32d2b5 [FIX] calendar: events privacy for uninvited admins
This commit reverts odoo/odoo#133504, as it was deliberating access to private
event information to uninvited administrators in the calendar view. Only the
event organizer and its attendees must be able to fetch private events information.

In addition, two tests have been added to: 1. ensure the confidentiality of
private events from uninvited administrators and 2. prohibit uninvited
administrators from edit the information of any event, private or not.

task-3837646

closes odoo/odoo#160308

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2024-04-03 14:29:14 +00:00
tsm-odoo 06b7e8c29f [FIX] im_livechat: fix chat bot redirect tour
The `website_livechat.chatbot_redirect` tour checks that the chat bot
still works after redirection. The tour waits for the chat bot message
that indicates the redireciton was made. Since the tour restarts the
bot to test two differents flows, this message is already present
before the second redirection occurs. The tour should instead wait for
two occurences of this message the second time.

closes odoo/odoo#160296

X-original-commit: cfdcdc405751e2d8d81dbbec34894d3da9c005ef
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-04-03 14:29:13 +00:00
Benjamin Vray fb63a42a17 [IMP] web: update the colorpicker on hex color input's input event
This commit improves the UX of the color picker's hex input in two ways:

- If the user enters a hex color without the "#" symbol, it's
automatically added.
- As soon as a valid hexadecimal color is entered in the input, the
colorpicker updates, and the color is applied to the target element.

task-3747408

closes odoo/odoo#157034

Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2024-04-03 14:29:08 +00:00
Benjamin Vray d890ea8b8a [IMP] web_editor: prevent the colorpicker from closing on inner click
Before this commit, clicking in the area below the "Hex color" input
would close the color picker. This was annoying when entering a value in
the "Hex color" input and then clicking below to confirm it.

After this commit, the color picker no longer closes when clicking on
its background.

task-3747408

Part-of: odoo/odoo#157034
2024-04-03 14:29:08 +00:00
Mahdi Cheikh Rouhou (macr) 4a05740bd3 [FIX] web_editor: apply color unremovable
Steps to reproduce the issue:
=============================
- Go to website and open editor
- Click on the 'Contact Us' button
- Change the color of the text
- error

Origin of the issue:
====================
`HistoryReverCurrentStep` will call `observerFlush` which will mark
`_toRollback = true` and in `_observeOdooFieldChanges` we will update
the html with `withoutRollback` but this only works only if
`_toRollback` is `false`.

Solution:
=========
We need to rever  the step without rollback too.

task-3770287

closes odoo/odoo#156461

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2024-04-03 14:29:07 +00:00
Sébastien Theys 1154556a0e [FIX] im_livechat, website_livechat: remove load template
This route is no longer used in our code and it tries to read templates
that are no longer existing, leading to a crash if called manually.

closes odoo/odoo#160277

X-original-commit: 130ac07ccf14cca3d9dd4e0cd897e00d1c0b6055
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2024-04-03 12:35:25 +00:00
jepbarasgarov 50262db4b2 [FIX] tools: ensure spliting xmlid 2 parts in translations
In `ir.model.data` model, there is no SQL constraint which is
ensuring that the `name` field can not contain `.` (dot)
So when loading the translations to database if the xmlid's `name`
contains dot then `xmlid.split('.')` will split it more than 2 parts.
Which will cause issue during saving it to database as it is expecting
2 parts `[<module>, <name>]`. I ensured the splitting to 2 parts
with `maxsplit=1`

closes odoo/odoo#160228

X-original-commit: a1ae06f499b183db69b7e763a2803a079f540a77
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
2024-04-03 12:35:24 +00:00
Benoit Socias 14c82e343d [FIX] web_editor: restore save error display
If an error happens when a website page is being saved, the error
message was displayed as a popup on the edited block.
Since [1] that error was not displayed anymore because the call to
`ir.ui.view`.`save` from `this._rpc`, which wrapped errors into a
message, was changed to `this.orm.call`, which raises errors in their
original form.

This commit adapts the error handling to expect an actual error instead
of a message.

[1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997

task-3599890

closes odoo/odoo#155071

X-original-commit: 7d5aeabebbc56ac22d06e8291e1cf58b62d4defe
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2024-04-03 12:35:22 +00:00
Jorge Pinna Puissant 740fb9ac8c [FIX] web: add more details when an error dialog is detected
Before this commit, when the clickbot detected an error dialog, it
stopped the test and throw an error saying that an error dialog was
detected. This information is not enough to check why, and how, the
error dialog was produced.

Now, we also log the content of the error dialog as well as all the
information of the last rpc that was in error.

closes odoo/odoo#160103

closes odoo/odoo#160272

X-original-commit: 4f26b324a30c5120ea60b6b42fef6cd6000d2859
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2024-04-03 10:48:18 +00:00