Commit Graph
167653 Commits
Author SHA1 Message Date
Michele 217b500a94 [FIX] stock: get only package with available qty in least package removal strategy
closes odoo/odoo#141947

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-21 20:06:39 +00:00
Bastien PIERRE 4c3fde5412 [FIX] web: min width for many2many_tags
Before this commit, the width of the cells for many2many_tags was often
too small, so the tags were truncated. (e.g.: the tax_id column on the
sale order lines on the form view of the sale order)

After this commit, the column has a min-width of 150px

closes odoo/odoo#141415

Task-id: 3581756
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-21 20:06:37 +00:00
Khushi 68c3696cca [FIX] spreadsheet: modify includeTotal behaviour in ODOO.PIVOT.TABLE
This commit modifies the functioning of `ODOO.PIVOT.TABLE` formula when the
boolean `includeTotal` is set to 'false'.

Earlier, total values of both row and column were not displayed in this case.
But now, if a groupby is not applied on any of the two dimensions, it displays
total values of the dimension on which groupby has been applied.
Otherwise the formula serves no purpose since it doesn't display any
data.

For example, one row groupby and zero column groupbys are applied on pivot:
The formula `=ODOO.PIVOT.TABLE(1,,false)` would display all cells of pivot
(including the row totals), except the last row (i.e. the column total).

Task ID : 3580623

closes odoo/odoo#140970

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-11-21 20:06:36 +00:00
Malay Khamar 92ca8c59c6 [FIX] account: fix value assignment to wrong field in payment term lines.
closes odoo/odoo#142569

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-11-21 18:31:52 +00:00
Pedram (PEBR) 1ece1e780a [FIX] l10n_sa_pos: fix blank screen and receipt issues
Before this commit, validating an order with the l10n_sa_pos module
installed resulted in a blank screen. Additionally, there was an issue
with the display of receipts when no rounding was applied.

opw-3594564

closes odoo/odoo#142510

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-11-21 17:17:05 +00:00
guva-odoo d3bf03ff79 [FIX] account: delete bank statement
Manual fw port of https://github.com/odoo/odoo/pull/130914

When trying to delete a bank statement,
if there is no move with the same id,
we get an error "Record doesn't exist or
has been deleted".

The reason is we call the
account_move.check_move_sequence_chain()
method wih the id of the statement.
We avoid using account_move_service if
the model is not account_move as it make
no sense to call an account_move method
from a bank statement record.

Root cause: https://github.com/odoo/enterprise/blob/fd6586e8b098f018a54c715c53a2c12fe192bf7c/account_bank_statement_import/views/account_bank_statement_import_view.xml#L28

opw-3425826

closes odoo/odoo#142818

Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-11-21 12:57:00 +00:00
Antoine Guenet a466f0a5cb [FIX] web_editor: also check getComputedStyle in isBlock if other doc
There was a condition in the `isBlock` util meant to bypass
`getComputedStyle` in the case that a node was not in the DOM. Rather
than doing that however, it was bypassing it in every case where the
node was in a document that was different from that of the window.

closes odoo/odoo#142803

X-original-commit: 04a9e97603806cb21cd90d991c0f94a225c326c5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-21 12:56:58 +00:00
Antoine Guenet 7ccfeb9646 [FIX] web_editor: prevent link zws around blocks
Link zws should not be applied on links that contain blocks so as to
avoid unfortunate side effects of zws on the dimensions of the link.

task-3596919

X-original-commit: 656fc7ca4d19311c679f6f3d3df6a4ea7e57c15c
Part-of: odoo/odoo#142803
2023-11-21 12:56:58 +00:00
tsm-odoo 957d57dd7f [FIX] im_livechat, *: do not allow reactions on temporary threads
Before this commit, the "add reaction" button was available even when
the thread is not persisted. This is wrong since those messages are only
temporary thus not known by the server: a crash would occur when trying
to add a reaction to such messages.

This commit disables reactions for temporary messages.

Steps to reproduce the issue:
- Go to the `/contactus` page
- Open a chat with the welcome bot
- Try to add a reaction to its first message
- An error modal appears

task-3603577

closes odoo/odoo#142718

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-21 12:56:57 +00:00
Anita (anko) e87a17949f [FIX] sale_loyalty: specific product discount
If user tried to apply promotion that was targeting specific product
on a product that was 0 price, it would cause an error. Now discount
is no longer applied on free products.

opw-3562218

closes odoo/odoo#142724

X-original-commit: 2b8d580a8c081cdb57d6f08de106c4d7b1b4bb40
Signed-off-by: anko-odoo <anko@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-21 09:21:18 +00:00
Victor Feyens fe82085f22 [FIX] sale: do not track quantity change if product changed too
Customer should do it in two steps if that's really what they want to do.
This custom log was mainly intended to follow quantity changes on confirmed
orders, but it's plain wrong if the product is changed at the same time.

opw-3432715

closes odoo/odoo#142610

X-original-commit: dd526d049be27ac4852ac0eeaca04c3a2a36c39b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-21 09:21:16 +00:00
Dossogne Bertrand 1e27f665d4 [FIX] hr_holidays: fix nextcall on create
To reproduce the bug:
- create an accrual allocation with the seniority plan
- set the start date way in the past like in 2000
- validate the allocation
- go on the dashboard, the accrued amount should be broken
when setting the balance on a future date
- additional days accrued if the cron is run

Fix:
nextcall being unset upon creation by default, the allocation
would consider the start of the second level as the nextcall if
the allocation is created in the past. This commits sets nextcall
to a correct value if the lastcall is set in the past upon creation.

closes odoo/odoo#141006

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-11-21 09:21:13 +00:00
desh 58cd2cbfd0 [FIX] sale: fix the discount layout for the mobile screen
Steps to reproduce: (for small devices)

- install the sales app
- activate discounts in the sale setting
- create a sale order and add the product
- click on the discount button and check the pop-up

The full text cannot be displayed in one line due to the lack of space.
So, providing sufficient space for displaying the entire text
of the radio button in a single line.

task-3568058

closes odoo/odoo#140612

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-21 09:21:12 +00:00
ravb-odoo def16f3725 [FIX] project: fix timesheet mobile view alignment between name and a…
…vatar issue

Description of the issue/feature this PR addresses:
In project.task timesheet notebook mobile view, the alignment between employee
name and avatar is not proper. Name is display slightly down than to avatar.

Current behavior before PR:
Alignment is not proper between name and avatar.

Desired behavior after PR is merged:
Alignment is proper between name and avatar.

Fix:
add d-flex class in outer div of name and avatar so that both name and avatar
should display in same horizontal alignment.

task-32779779

closes odoo/odoo#142779

X-orignal-commit: d998f64a768cb0d00bb1df1543ae1bcb0cf273ff
X-original-commit: 967b2430308ce36d5e3de1fa22843d2665c8723a
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-21 07:56:14 +00:00
Anh Thao Pham (pta) 970c72fa17 [FIX] l10n_din5008: hide all header if not needed
Steps to reproduce:
- Install Accounting and l10n_ch
- Switch to a Swiss company
- Go to Settings and make sure that DIN5008 is selected as Document Layout
- Go to Accounting settings and activate "QR Codes" option
- Create an invoice for an Swiss contact
- Print the invoice
=> The DIN5008 header is appearing on the QR code page.

No header should appear on the QR code page with DIN5008.

opw-3529963

closes odoo/odoo#142778

X-original-commit: c0511e88cf71fb99c6b43d7a2646e6c291e4b062
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-11-21 07:56:13 +00:00
Xavier Bol (xbo) c862dff8be [FIX] event: adapts steps according to changes in framework js
This commit adapts some steps to correctly select the elements as
before because some selectors no longer work due to changes done
in Framework JS code (web module).

closes odoo/odoo#142746

X-original-commit: 02bf97b44c76bd22a813e184bc5c42ab9716280f
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-21 07:56:12 +00:00
Janvi Lakhore 07aa750194 [FIX] web: fix save button issue
Steps:
- Open Field Service
- Go to gantt view
- Create new task
- Leave the title and customer field empty
- Save the form dialog

Issue:
- The customer required notification show in the gantt view instead of form view
dialog.

Cause:
- When we save the form 'saveRecord' method triggered and this doesn't return
 anything.

Fix:
- Add the return statement in 'saveRecord' method.

task-3502839

closes odoo/odoo#142698

X-original-commit: e7d999429dcf91501b0803d32639a181277cb5f0
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-21 07:56:11 +00:00
AH-Yussef 9d9760bfb5 [FIX] website_event: change event date format based on language
Steps to reproduce:
- Install the Events module
- Go to the General Settings and add French translation and make sure to check the website 1 option
- Go to the Events module and select an event
- Click on Go To Website smart button on the right top corner
- On the event page, Change the language and notice the start and end date format

Investigation
- The bug is more present in version 16.0 and above. This version has just small issue with formatting since the day and the rest of the date were separate block.
- By Using the option format: ‘full’, the date can be formatted correctly depending on the language used

opw-3569167

closes odoo/odoo#142425

Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-11-21 07:56:10 +00:00
Juan Ignacio Carreras adee7487d9 [FIX] mrp : change in domain of method
closes odoo/odoo#142601

X-original-commit: ac30d88b37d929fde6cea18bcea5b7f63ea6c60f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-20 17:14:22 +00:00
Sébastien Theys 2120485e27 [FIX] mail: fix all known scroll issues
Completely rewrite the 3 scroll hooks into a unified version that
doesn't have conflicting and overriding conditions.

- re-apply scroll (bottom in particular) when images are loaded
- restore auto-scrolling to newly posted message
- don't do any scroll save/restore before the thread is loaded
- don't snapshot before the thread is loaded
- don't snapshot after patch
- fix condition for detecting when to restore snapshot
- don't apply scroll multiple times for highlight

Follow up of https://github.com/odoo/odoo/pull/141999/
Only breaking after https://github.com/odoo/odoo/pull/136539
Also follow-up fix of https://github.com/odoo/odoo/pull/127889/

runbot-39172

closes odoo/odoo#142308

Related: odoo/enterprise#50931
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-20 17:14:20 +00:00
Xavier Luyckx (xlu) 5a62dbfc73 [FIX] web: adapt dropdown-item checkmark position
Prior to this commit, the positioning of the checkmark in the project
task state dropdown was slightly off, not optimally aligned.

This commit solves this alignment.

task-3575446

closes odoo/odoo#142725

X-original-commit: 539f156d480473cfd8bf31ed10aea427248fa3fc
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-11-20 15:51:32 +00:00
Julien Van Roy 13e951c6a7 [FIX] account_edi_ubl_cii: update XRechnung version
Avoid getting the following warning when validating an XRechnung on
https://erechnungsvalidator.service-bw.de/ :

"[BR-DE-21] Das Element "Specification identifier" (BT-24) soll
syntaktisch der Kennung des Standards XRechnung entsprechen."

issue-142127

closes odoo/odoo#142716

X-original-commit: 82d05070d1199a035d93f155580fbef5786dc030
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-11-20 15:51:31 +00:00
Roy Le 4bed44a499 [FIX] sale_purchase: Sales user (no purchasing permissions) cannot
cancel their SO

Steps:
Sales user (no purchasing permissions) create SO and confirm it, then
cancel it

Issue:
Sales user cannot cancel their SO without permissions in the purchasing

Analyze:
Because the method `_compute_display_purchase_orders_alert` has a read
the SO's purchase_order_count, it causes an error

Fix:
Add a group on the field to not display it in the view instead. Anyway
if the user doesn't have the right to correct it, he will probably just
ignore the warning and another mechanism should exist to warn the
purchase representative.

closes odoo/odoo#142602

X-original-commit: 77a614d63c64a075db009d8c3acaf19db0fc7cd0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-20 15:51:24 +00:00
Simon Wydooghe d00d6bcb08 [FIX] mrp: handle unbuild/scrap/unscrap and production with same serial
When a product has been unbuilt and also (mistakenly) scrapped, it's
impossible to reuse the serial number in production again, even if the
product is unscrapped.

This fixes the sanity check in a similar way to the _check_sn_uniqueness
function, not just checking for removed stock move lines, but also unremoved
stock move lines. A test case is also added to check this scenario.

This is a similar fix to a previous commit we did
(4f07b260807053586ac6c01cf92ac3d5e37b1041) where we bumped into a
problem with the duplicate serial sanity check.

closes odoo/odoo#142574

X-original-commit: 1761b95d9fda5d5355f35effd1f345a25ded1197
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-20 15:51:23 +00:00
Xavier Bol (xbo) 29a6abfba1 [FIX] {website_}event: fix event tour
Before this commit, the user got a traceback saying:
```txt
TypeError: Cannot read properties of undefined (reading 'apply')
    at EventAdditionalTourSteps._get_website_event_steps
```
the reason of that issue is because a [recent generic change reviews](#125716)
`patch` function and so `this._super` no longer exists and has to be
replace by `super` as we extend a method of a class extended.

This commit adapts the additional steps adding via `patch` function
to be able to add those steps and start the tour as expected.

closes odoo/odoo#142653

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-11-20 14:14:00 +00:00
Julien Van Roy 5af27ea4ac [ADD] l10n_jp_ubl_pint: Add PINT e-invoicing for Japan
OpenPeppol released a new extension of its BIS 3 format for
international use: PINT BIS Billing. It serves as a base for per-country
specialization, while keeping a standard core for data being used across
countries. This is not meant to be used directly, but rather to be
extended by country-specific modules.

Japan has implementated PINT and published its specific rules:
https://docs.peppol.eu/poac/jp/pint-jp. A new module is created to add
this format.

task-3469718

closes odoo/odoo#136025

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-11-20 14:13:59 +00:00
Adrien Dieudonné 6eea43a706 [REV] web: blockui when executing a target=self act_url action
Follow-up of https://github.com/odoo/odoo/pull/134277

This reverts commit 91b80fbb5c as it adds some unwanted visual
effect. In other words, the "block UI" is never unblocked when some
actions are triggered. this is specific to the mobile app when the
URL is outside of the webview scope ("/web" or "/pos"). Even if
the target is self, the mobile app forces a new tab because opening
something else that the backend in the webview could disturb users.

Steps to reproduce:
- Open "Field Service"
- Choose a task and start it
- Stop it and confirm time spent
- Sign report
=> A new tab is openened in the mobile app and the block UI is
never unblock in the app.

To fix this, we simply decided to avoid to use the block UI for
act_url actions. this is consistent with what we did previously:
See https://github.com/odoo/odoo/commit/ebe64aafacec8eaa69a5a1781fc159ff77bc884a
We will only use `BlockUI` when really necessary and not by default.

Note that this commit will also remove the block UI when you do
some operations on apps like installing it. For now, we consider
that is OK. This means that the user will be able to continue his
work during installation. Also note that if the user navigates to
another application during the process, the page will not be refreshed
at the end. He will have to do it himself by pressing "F5" to be able
to see the app in the home menu.
In the future, the idea should be to better notify the user at the end
of this king of background operations but we will see...

closes odoo/odoo#142656

Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-11-20 12:41:39 +00:00
Djamel Touati 6a03f69aa2 [FIX] mrp: clear move_raw_id when the product variant is changed
Steps to reproduce the bug:
- Create a storable product with two attribute “P1”:
    - Color: Red and Blue

- Create a BoM:
    - Product template: P1
    - BoM lines:
        - C1: 1 unit -> apply on variant P1 red
        - C2: 1 unit -> apply on variant P1 blue

- Create a MO:
    - 1 unit of P1 red

- Only the component C1 is added, which is correct.
- Change the product to P1 blue.

Problem:
The C1 component is not removed because to clear the move_raw_id,
we only check if the BoM is changed. However, in this case, it doesn't
change.

opw-3591800

closes odoo/odoo#142631

X-original-commit: 2a31cdb67338dd065b1aeb2d5e8c57724e8af236
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-11-20 12:41:37 +00:00
Adrien Widart (awt) d3b244914f [FIX] purchase_stock,stock_account: post pdiff SVL with locked journal
If the option "Lock Posted Entries with Hash" is enabled on the
inventory journal, it will be impossible to post a bill with a price
difference (a `UserError` error will be raised)

When there is a price difference, we create a SVL and validate its
accounting entires:
https://github.com/odoo/odoo/blob/724d88e3863b9e96069bc4a53bfd9081c30eb2b1/addons/purchase_stock/models/account_invoice.py#L167-L168
We will create and post a new AM and the SVL will be then linked to it.
Then, we post the bill. Thanks to that, the bill has now a correct
name, and we use it in the SVL description and in the label of the AML
linked the SVL:
https://github.com/odoo/odoo/blob/8b37cd2960f748fa502c6c216f9db41ae93827ed/addons/purchase_stock/models/account_invoice.py#L178
But here is the issue: the AML is posted and since the journal is
locked, we can't change its label:
https://github.com/odoo/odoo/blob/39b44dbfef0d533722ce2c96d375ada113d32b00/addons/account/models/account_move_line.py#L1455-L1461

We need the name of the bill before posting the SVL, so we have to
post the bill first. And here is a new issue: when posting the bill, it
leads to the override in `/stock_account` where we try to reconcile
the anglo saxon AMLS:
https://github.com/odoo/odoo/blob/8444f5aae8b83c113e1cd2864ec11e92d836780a/addons/stock_account/models/account_move.py#L54
But it's too soon as we haven't yet validated the SVL's accounting
entries. So we need to prevent this reconciliation, validate the SVL
entries, and only then reconcile all AMLs.

Note: This will actually fix another use case. In some cases, when
validating a p_diff SVL, it does not generate any new AM:
https://github.com/odoo/odoo/blob/8b37cd2960f748fa502c6c216f9db41ae93827ed/addons/purchase_stock/models/account_invoice.py#L167-L168
https://github.com/odoo/odoo/blob/eb022e388b62856020d95e063ec0dfd4b786c4a9/addons/stock_account/models/stock_valuation_layer.py#L53
https://github.com/odoo/odoo/blob/3e2421982c229af44aa0f46dfd91bcff3fd729a0/addons/stock_account/models/stock_move.py#L557-L560
In such case, the SVL is still linked to the bill. As a result, we
wrote the bill name on all lines of that bill, which was incorrect.
See `test_pdiff_and_aml_labels` for more details

OPW-3446950
OPW-3550013

closes odoo/odoo#142620

X-original-commit: f48dc9ca24ebb64a17d76699ff2d7f9db440fd80
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-11-20 12:41:34 +00:00
Mahdi Cheikh Rouhou (macr) f51f2d5674 [FIX] pos_self_order: compute price product variants in self order
Issue:
======
When choosing product with attributes that have attributes which have
variant creation mode never it will not take into account the extra
price.

Steps to reproduce the issue:
=============================
- Install pos , restaurant
- Create a product which have `Size` attribute and add some values in
  it, 'S' and 'M'  for example , then add extra prices in each one of
  them. Enable available in POS setting in Sales page of the product.

- Got to point of sala , click on 3 dots in restaurant and open mobile
  menu.
- Added the created product to cart and click review.
- The price shown is the original price of the product and not taking
  into account the extra price of the attribute.

Origin of the issue:
====================
This was not supported before

Solution:
=========
Using the attribute_value_ids value in the line we can calculate the
extra_price of those attributes and add it to the price_unit so we can
get taxed_amount and untaxed_amount correctly.

opw-3511374

closes odoo/odoo#142485

X-original-commit: a54fddd9270b3431a8cde0a6bf30349c5671b0ac
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-11-20 12:41:32 +00:00
Saiyed IrmiandPrakash Prajapati 5c8779338c [FIX] sale_project: readonly delivered quantity of the SOL
Steps:
 - Open Projects
 - Go to Tasks
 - Create a SOL on the fly
 - Create a new product on the fly (click on 'create', not on 'create and edit')
 - There is a field for delivered quantity which is editable

 Issue:
 -The 'delivered quantity' is editable when it shouldn't be. It should only be
  editable when Invoice policy is Based on Delivered quantity.

 Cause:
 - The readonly attribute was only given when delivered_quantity method is not manual.

 Fix:
 - By making delivered quantity field readonly for project task form view.

Task-3522113

closes odoo/odoo#142348

X-original-commit: 0b5d197e0690e49948b848b2addffeb0e57b5db7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
2023-11-20 12:41:31 +00:00
Dawn Hwang d7b34c9d72 [FIX] hr_contract: Sync only singular incoming contract calendars
In Odoo, incoming contracts are defined as having state == 'draft' and
kanban_state == 'done'.

Currently, the employee contract calendars are synced when incoming
contracts are created, and incoming contracts' calendars are changed.

However, in many cases the incoming contracts are made for the future
and do not reflect the current employee's working schedule. This causes
there to be a calendar mismatch whenever incoming contracts are
created/updated, despite being set only for the future.

This fix checks the contracts_count field on the employee before
syncing the calendar, since the only time an incoming contract should
reflect the *current* calendar is if it's the only contract for the
employee.

closes odoo/odoo#142142

X-original-commit: 885f554c80028539415c294120c379ded33cd9ae
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-11-20 12:41:30 +00:00
Thomas Lefebvre (thle) 802b4c547e [FIX] website_sale: remove category name
Steps to reproduce:
-------------------
- create several product categories on the ecommerce;
- do not add products to these categories
- go on a category;
- go on an other category;

Issue:
------
The message is the same for both categories:
```
No product defined in category "First Category".
```

Cause:
------
When we go to the first category, the template is cached
according to the existing `t-cache` key containing the products.
In this case, we have no products.

When we go to the second category, which has no products,
the current `t-cache` key doesn't detect changes and therefore
uses the cached template from the first category.

Solution:
---------
Remove the category name because adding `category` to existing
`t-cache` key to detect a difference between categories
that may have the same t-cache key would add
complexity to the key and have a cost in terms of performance.

opw-3572953

closes odoo/odoo#142595

X-original-commit: b1eba0972de2adbfcc0b6fe40252db5a7fcf74f9
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-11-20 11:13:28 +00:00
Julien Van Roy 35887ca4cf [FIX] account_edi_ubl_cii: use the VAT for the PartyTaxScheme/CompanyID
Node `/cac:Party/cac:PartyTaxScheme/cbc:CompanyID` should be filled with
the VAT rather than the Peppol Endpoint.

Otherwise, a Peppol Bis 3 validator will raise:

"[BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax
representative VAT identifier (BT-63) and the Buyer VAT identifier
(BT-48) shall have a prefix in accordance with ISO code ISO 3166-1
alpha-2 by which the country of issue may be identified. Nevertheless,
Greece may use the prefix ‘EL’."

opw-3589263

closes odoo/odoo#142487

X-original-commit: f06535e99f4735407c1b9808bb6acd9596726872
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-11-20 11:13:27 +00:00
FrancoisGe daab70796f [FIX] web: image/sign field doesn't correctly update its unique
Before this commit, if the value of an image/sign field is modified by an
onchange and the record is saved manually, the old image is displayed.

Why:
ImageField's rawCacheKey, which is used to know if the image has been updated,
is not updated. So we will reuse the old image.

Solution:
rawCacheKey becomes a getter that always returns the current value of __last_updated.

How to reproduce:
- Go to a form view with a char field and an image field
- Edit the char field
- An onchange is performed and modifies the value of the image field
- The new image is displayed
- Click on the save button

Before this commit:
    The old image is displayed

After this commit:
    The new image is displayed

closes odoo/odoo#142471

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-11-20 11:13:26 +00:00
Lucas Perais 0bc8d169f5 [FIX] web: popover validation target props
Using the OdooEditor, the following use case arises often:
- create an Element with document.createElement.
- append that node into the DOM tree of an iframe.
- spawn a popover with that node as target.

The spec (https://developer.mozilla.org/en-US/docs/Web/API/Document/importNode) considers this a malpractice:
`Before they can be inserted into the current document, nodes from external documents should either be:
cloned using document.importNode(); or
adopted using document.adoptNode().

Note: Although Firefox doesn't currently enforce this rule, we encourage you to follow this rule for improved future compatibility.`

Before this commit, in debug mode, there was a crash because the class of the new Element
did not match the class of the element's ownerDocument defaultView.

After this commit, we keep the check that says that the target should be an instance of
the iframe's document's Element class, but we fallback onto the main Window Element class as well.

closes odoo/odoo#142464

X-original-commit: 0cdd8cf9354e494c3e56d9eefe81c3fb6a59ac09
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-11-20 11:13:25 +00:00
Saiyed Irmi addfbb5a39 [FIX] web: button assign appear on mouse hover in Activity View
Steps:
 - Open Projects
 - Go to Tasks
 - Open Activity view
 - There is a button to assign a new user

 Issue:
 - The button to assign a new user should only be visible on hover

 Cause:
 - There was no css class added for button in activity record.

 Fix:
 - By making button visibility hidden by default and should be visible only on
   hover.

closes odoo/odoo#142381

Task: 3522113
X-original-commit: d60519ae4cb3c9c7d83e8143c3015c28b2a929ad
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-11-20 11:13:24 +00:00
alsh-odoo c05fe1e26d [FIX] stock: give correct field name to prepare stock return picking
This traceback arises when the user click on return button.

To reproduce this issue:

1) Install 'stock'
2) Activate 'Multi-Step Routes' from 'Inventory/configuration/settings'
3) Create a new product with quantity 100
4) Create a new record in 'Operations/Deliveries'
5) Select the created product in 'operations' with 'Demand' as 10
6) Click on 'Validate' button and then 'Return' button
7) Again click on 'Return' button

Error: 'KeyError: 'reserved_qty''

See: https://github.com/odoo/odoo/blob/c2b160fe50c24e9f01d0d5b350f2422cfdbc72d4/addons/stock/wizard/stock_picking_return.py#L86

Because the 'reserved_qty' field is removed from this pr:- https://github.com/odoo/odoo/pull/137864

sentry-4621794958

closes odoo/odoo#142312

Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-11-20 11:13:23 +00:00
kdeb@odoo.com 881e9c42ff [FIX] sale: translate product description
Issue:
In a multi-language environment, the product description in sales
orders defaults to English, regardless of the user's language
preference. This issue occurs when the language of the partner
is not set, leading to a mismatch between the user's expected language
and the displayed language for product descriptions.

Steps to Reproduce:
1. Ensure the database supports multiple languages.
2. Set the user's preferred language to a non-English language.
3. Create a new sale order for a partner whose language is not set.
4. Add a product and observe that its description is displayed in
    English instead of the user's preferred language.

Solution:
Modified the logic to default the product description to the user's
language preference when the partner's language is not specified.

opw-3586451

closes odoo/odoo#142227

X-original-commit: 29ace2569b24cbcf2ae15ca2f25e33fd1f1cd289
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <kdeb@odoo.com>
2023-11-20 11:13:22 +00:00
william-andre 430f51fbd2 [IMP] account: unify reconciliation of import
Purpose
-------

Allow to reconcile entries during import easily.
* Have one uniform way of doing it
  - fix bugs only once
  - reduce number of fields
  - make it generic and not only for some imports
* avoid the need to post during imports
  - faster to import, can import bigger batches, because we do neither
    post or reconcile, both are among the most time consuming steps.
  - still allows to check the data before posting if needed
* make splitting import into smaller batches easier because the
  reconciliation is not cut/dependent on the batches anymore
* allow to reconcile entries in the future by using the same mechanism
  (i.e. cut-off)

Implementation
--------------

Allow setting the matching number to `I*` manually, where `*` can be
anything. When posting the last item with the same manually set number,
we will reconcile all the lines with the same number.

task-3593885

closes odoo/odoo#142017

Related: odoo/enterprise#50627
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-11-20 11:13:19 +00:00
william-andre afb33cb56e [FIX] account: max recursion while creating taxes
How to reproduce:
* create a lot of taxes in batch

The SQL query builder will throw a max recursion depth when building the
`OR(domains)`.

The solution is simply to reduce the size of the batches to avoid that
error.

Part-of: odoo/odoo#142017
2023-11-20 11:13:19 +00:00
Deependra Solanki 11242d8886 [FIX] web_editor: close powerbox when keyup outside its block node
Before this commit:

The Patience diff algorithm uses the text added in the `closestBlock` node to
the node where the powerbox is opened. If the user switched to a different block
using `ArrowLeft` or `ArrowRight` keys, it would result in the algorithm not
searching for the typed text in the other block.

After this commit:

The powerbox will be closed if the keyup event occurs in a different block than
the one in which the powerbox was initially opened.

task-3212128

closes odoo/odoo#141785

X-original-commit: 272614a7b668d361d6ea4177602b249608af34bb
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-11-20 11:13:17 +00:00
Deependra Solanki 1f4bb22d8e [FIX] web_editor: power box disappears in collaborative fix
Before this commit:

Power box uses Patience diff algorithm to check the text added by the user for
search, it previously used the entire editable for differences, which caused
the issue in collaborative. When one user type something on a different node,
the change would affect the editable and be considered in diff, causing updates
in other users powerbox.

After this commit:

Instead of checking the entire editable for the diff, we now check the current
block node where the power box was opened. This prevents scenarios where other
users powerbox would update when one user would type on same block node.

task-3212128

X-original-commit: 976c10b749e59963c8a27ac4764f1746d46d5e09
Part-of: odoo/odoo#141785
2023-11-20 11:13:17 +00:00
Morgane (morm) 01ad9b9213 [IMP] web: kanban header priority star alignment
Prior to this commit, the alignment of the `priority` field star inside
the header of the `kanban card` was not perfect.
Adding `margin: auto` fixes this issue.

task-3586924

closes odoo/odoo#141506

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-11-20 11:13:15 +00:00
Ahmed Khalaf 5a69ef6e04 [IMP] stock: move detailed operation view to smart button
After this commit, detailed operations is no longer a tab in the picking
but under a smart button in the form.

The field `show_operations` on picking type is no longer useful and will
be removed in a later PR targeting master

closes odoo/odoo#140898

Taskid: 3486636
Related: odoo/enterprise#50805
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-20 11:13:13 +00:00
nda 083cd011a1 [FIX] portal,website_sale: smaller pager
pager does not need to be language dependant

steps to reproduce:
- have a lot of products on your e-commerce (more than 7 pages)
- open mobile e-commerce

before this commit:
- pager is wider than the allowed space and width depends on the
language (ex: "Siguiente" is longer than "Next")

after this commit:
- pager is always smaller and is language independent

opw-3522688

closes odoo/odoo#142623

X-original-commit: bd3c2cec314c3710c2294319a8e7605749d7fa83
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
2023-11-20 09:40:02 +00:00
gera-odoo 86ff641284 [FIX] account_edi: Correction of KMT uom
closes odoo/odoo#140027

X-original-commit: ab3c5cb7f5ff4a4484675fa501a432d643bd4f10
Signed-off-by: Gerardo Rafael Soto Maldonado (gera) <gera@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-11-20 06:45:48 +00:00
Maruan Aguerdouh (magm) 4a7d93d089 [FIX] web: incomplete record reload in x2many form view context
Steps to reproduce:

- Install eLearning
- Create or go to an existing course.
- Add Content
- Fill the name and use Save & Close
- Click again in the same content we have just created.
- Click on website preview.

Issue:

Saving a record from a form view that is part of an x2many field would
only reload the fields present in the list view. This led to incomplete
data being loaded into the model.

Solution:

- Pass the `viewType` option to `_fetchRecord` to ensure that the record
is reloaded in the context of the form view, thereby including all
fields.
- Add `viewType` to the `saveOptions` in the `basic_relational_model.js`
to ensure the correct view context is used during the save operation.

This ensures that all fields are reloaded into the model, providing a
complete view of the data.

opw-3330010

closes odoo/odoo#139968

X-original-commit: 3cec34e659222073b0fba36983eaec9f7bf5514f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-20 06:45:47 +00:00
Martin Trigaux c838944646 [CLA] remove duplicated file
Was already signed in pallavisrivastavaa.md

closes odoo/odoo#142426

X-original-commit: d586acc0d08e8fc2f2221c4e8b6ff6fc2577e81b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-11-20 04:58:31 +00:00
hupo-odoo 10cf39e139 [FIX] account: Dashboard kanban style on groupby
When using a 'Group by' on the Accounting Dashboard, the Kanban cards representing the Journals are placed in columns. However, the columns were too narrow, causing text overflow.

task-3530756

closes odoo/odoo#142371

X-original-commit: 5463a4d34e2d6aea59e96786fe6451a39b319162
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-11-20 04:58:30 +00:00