Commit Graph
168554 Commits
Author SHA1 Message Date
Loan (LSE) ce59fd6edb [FIX] hw_drivers: reconnect on server disconnection
To reproduce:
 1. Sync the IoT with a 17 database
 2. Once it is set up, force shut down the server by Ctrl+C 2 times
 3. Wait a few seconds:
=> crash of `WebsocketClient` thread with the following traceback:
```
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_i>
self.run()
  File "/home/pi/odoo/addons/hw_drivers/websocket_client.py", line 83>
self.ws.run_forever()
  File "/usr/local/lib/python3.11/dist-packages/websocket/_app.py", l>
raise WebSocketException("socket is already opened")
websocket._exceptions
WebSocketException
socket is already opened
```

The IoT synchronised servers can stop in 2 ways that we need to handle:
 A. Gracefully (Ctrl+C):
  In this case a disconnection signal is sent to the IoT-box
  The websocket is properly closed, but it needs to be established a new connection when
  the server will be back.
  Solution: `while True` loop as `run_forever` will return on close.
            `time.sleep` for the reconnection delay

 B. Forced/killed (Ctrl+C 2 times):
  In this case there is no disconnection signal received
  Solution: use `reconnect` that will automatically take care re-attempting a connection

  This will also happen with the graceful quit as `reconnect` will trigger if the server
  is offline while attempting the new connection

In both case, we perform a reconnection attempt with a delay of 10 seconds to avoid
spamming the database

After this commit:
 The websocket will reconnect itself automatically after 10 seconds
 if the connection is disrupted

opw-3612528

closes odoo/odoo#147858

Signed-off-by: Yaroslav Soroko (yaso) <yaso@odoo.com>
2024-01-03 16:59:17 +00:00
Hubert Van De Walle 38155143dc [FIX] website: prevent crash in FormEditorRegistry if key not found
Steps to reproduce
==================

Go to Maintenance > Studio > Website > New Form
Click on the website editor
Click on the name field

UncaughtPromiseError > KeyNotFoundError

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

Starting from 17, the FormEditorRegistry is not the legacy one.
If the key is not present in the registry, it will fail, unless we pass
a default value.
In this case, the key `website_form_key` is false.

Solution
========

Pass null as the default value.

opw-3652423

closes odoo/odoo#147840

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2024-01-03 16:59:16 +00:00
Tiffany Chang (tic) 7e6b875d1e [FIX] stock: ensure reception report always uses quantity field
Following quantitypocalypse (odoo/odoo#137864), a couple of
`reserved_uom_qty` and `reserved_qty` references were left over. This
was partially due to no tests for these tricky parts of the code,
therefore we both fix these references to use the newer
`quantity`/`quantity_product_uom` fields and add/update tests to ensure
we avoid breaking these 2 use cases again.

Also discovered during this fix, the remaining assigned qtys when
unassigning done incoming moves from already reserved outgoing moves
(i.e. the "1. batch reserved + individual picking unreserved" use case
in the code comments) was NOT being calculated correctly. This also
fixes that + adds a test for it.

closes odoo/odoo#147815

Related: odoo/enterprise#53536
Signed-off-by: Steve Van Essche <svs@odoo.com>
2024-01-03 16:59:15 +00:00
Tiffany Chang (tic) f34268b074 [FIX] stock: remove obsolete force_detailed_view context
Since odoo/odoo#140898 the pickings detailed operation view has been
moved to a smart button instead of showing in a picking tab. This
included the removal of the `force_detailed_view` context since there
was no longer a detailed view to force show. This commit removes some
leftover references to this context within tests.

Part-of: odoo/odoo#147815
2024-01-03 16:59:15 +00:00
Sébastien Theys 44dcc1a35f [FIX] mail: batch insert of fetched channel members
This reduces the time of the method from 400ms to 40ms on my machine.

closes odoo/odoo#147814

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-03 16:59:13 +00:00
Sébastien Theys f9bd7d4c6c [FIX] mail: avoid proxy when calling methods internally
Method lookup also go through the proxy, but these aren't necessary when
finding the method, only when actually calling it.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys 403a7c2eb7 [FIX] mail: remove reactive from Model/store internals
Internal code doesn't need to use reactive when reading store or Model,
especially not in `insert` that is not meant to access anything observed
except when actually writing records (in which case `_proxy` is used).

The `get` part of `preinsert` (and its full chain) must be kept with the
full proxy however, to ensure proper trigger of reactive callback when
returned record changes.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys de5c0b19ab [FIX] mail: improve performance of im status registration
Forward internal proxy for performance as onUpdate does not need
reactive (observe is called separately).

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys a4ce01fc0f [FIX] mail: assign localId directly on record
There is no need to go through the proxy to assign localId as nothing
should observe it at this step, and it shouldn't change anyway.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys ee09278c18 [FIX] mail: do not register lazy onChange for eager fields
This mechanism is only used for lazy fields to determine when they stop
being observed, there's no need to constantly observe eager fields like
that.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys f0928cda55 [FIX] mail: optimize onChange by accessing reactive only once
Access `proxy[key]` only once to avoid triggering reactive `get()` many
times, as this will be triggered in cascade to all elements in the chain
in internal code, saving possibly dozens of uncessary calls per
callback.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Sébastien Theys 5fa9a3bf36 [FIX] mail: improve performance and stack of js records
The internal reactive is only necessary to trigger outer reactives when
writing on it. As it has no callback, reading through it has no effect,
except slowing down performance and complexifying the stack.

This change removes reactive from the stack as soon as possible.

Part-of: odoo/odoo#147814
2024-01-03 16:59:13 +00:00
Zelong Lin 55748288e6 [FIX] mail, im_livechat: fix /help command outputing tags
Mismatch of str and Markup led to escaping everything. Now properly
Markup code and escape the rest.

closes odoo/odoo#146399

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-03 16:59:08 +00:00
Antoine Boonen 0e2b986c2c [FIX] l10n_xx: Fix spanish translation.
Spanish translation has been modified by commit
bf81596aa7

This behavior makes spanish variant (maxico, uruguay, columbia, etc.)
use the es_419.po instead of es.po.

This commit renames the po files for the LATAM localizations so that
translations work as expected.

Initiated by customer issue:
opw-3627465

closes odoo/odoo#146125

Related: odoo/enterprise#52694
Signed-off-by: Josse Colpaert <jco@odoo.com>
2024-01-03 16:59:08 +00:00
sabr 55a14c3874 [FIX] hr_attendance: generated unique kiosk key for every company
This issue occurs when a customer creates multiple companies. Then, after
installing the attendance module, after selecting the kiosk mode, an error
is generated. This is because, before installing the attendance module,
if the customer created a company, a single kiosk key is generated. This
key is different for each company, but it is the same.

step to reproduce-
- First created two company.
- Install the `Attendances` & Open it.
- Click on the Kiosk Mode from Menu.
- Error will be generated.

Error-ValueError
      Expected singleton: res.company(2, 1, 4, 3)

after this commit,Each attendance kiosk key generated during the company's
creation is unique.

sentry-4617967282

closes odoo/odoo#145382

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-01-03 16:59:06 +00:00
Achraf 428851c34c [FIX] website_hr_recruitment: Allow users to apply form
Steps:
	- Install `website_hr_recruitment`
	- Try to add a file in `Resume`
	- Click on Apply

A traceback is raised because we use `.val()` instead of `files.length`
to check if the user has uploaded

closes odoo/odoo#145008

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-01-03 16:59:05 +00:00
Alexandre Kühn dc18313d42 [FIX] l10n_ke_edi_tremol:tests: freeze test to 2023
These test rely on default generated name of account invoice
that contains the year, e.g. `INV2023`. These tests were passing
in 2023 but no longer on January 1 2024.

closes odoo/odoo#147873

X-original-commit: 94f093c9ae532eb12ef17dc0f37dc5da64a6d7ed
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-03 10:58:06 +00:00
rhe-odoo d598390d1c [IMP] point_of_sale: UI Enhancements
This commit presents UI improvements:

Renamed the back button to "Change Table."
Increased idle table closure time from 1 minute to 3 minutes.
Implemented a restriction preventing users from transferring orders to table already in use.
Displayed the attributes of an order line in the order widget.

closes odoo/odoo#147677

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2024-01-03 10:58:05 +00:00
Julien Castiaux 72ec839b67 [FIX] auth_totp: unbound request with xmlrpc
Enable TOTP on your account and create yourself an API key. Connect in
xmlrpc using that API key. Traceback `request` is not bound.

Fixes: odoo/documentation#6919
See also: #147475

closes odoo/odoo#146270

Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2024-01-03 10:58:04 +00:00
Hugo Carlier (Huca) e9127a9fdf [FIX] project: remove onchange on date/date_end for projects
Steps
=====
- Install module project
- Open the form view of a project
- Set a planned date
- Click anywhere on the page to remove the focus from the date picker

Issue
=====
The chosen date disappeared without any explanation to the user

Cause
=====
odoo#123268 introduced some changes related
to the planned dates of projects.
1. the write method is modified to avoid the write of only a start/end
date (both date should be set or none of them)
2. a required is added on the start date field in the form view of
project
3. an onchange is added to avoid to have one of both field set and not
the other

This last change is problematic as it overrides the required behavior of
the date fields.

On top of that, https://github.com/odoo/odoo/pull/143509 changed the
behavior of the datepicker widget that only display the full range by
default if both fields are required (which is not the case here if they
are empty).

The combination of those changes have the consequence that the planned
date field is unusable in the form view of projects.

Fix
===
The onchange being only useful in form view, it is deprecated as the
required attribute is sufficient for this usecase and provide the user
warnings if he forget a field. On top of that a required attribute is
also set on the end date field.

task-3628069

closes odoo/odoo#145167

Related: odoo/enterprise#52280
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2024-01-03 10:58:02 +00:00
Hugo Carlier (Huca) bc98aad620 [IMP] web: add always_range option to daterange widget
always_range option on the daterange widget allows to always display this
widget as a range (two inputs separated by an arrow) even if both
start/end date are empty and not required.

task-3628069

Part-of: odoo/odoo#145167
2024-01-03 10:58:02 +00:00
Chrysanthe (chgo) c04d667912 [FIX] web: allow radio fields to wrap horizontally
This commit adds the possibility for the `.o_horizontal` class to wrap,
which is especially interesting in mobile.

When using a `radio` widget, you can choose to use two options :

- `horizontal` which will add a `.o_horizontal` class to the radios
and allow them to display with a `flex-row`

- `vertical` which will add a `.o_vertical` class to the radios
and allow them to display with a `flex-column`

Prior to this commit, the `.o_horizontal` class was not allowing elements
to wrap, which would cause overflow issues on small devices.

To fix this issue, we add a `flex-wrap` property to the class, to ensure
that if the buttons are larger than the breakpoint, they will wrap
and stay inside the container.

task-3580082

closes odoo/odoo#140651

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2024-01-03 10:58:00 +00:00
Paolo Gatti (pgi) a0741f6427 [IMP] web: Settings default search context key
The Settings page lacks a default search context key, because it lacks
the `<search>` arch.
We add a context key to make actions target some settings.

closes odoo/odoo#147149

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2024-01-03 09:17:50 +00:00
Trinh Ngoc Hung db2c22f0d4 [FIX] l10n_vn: Account type
242: These future expenses must be deferred on the company’s balance
sheet until the moment in time they can be recognized, at once or over a
defined period, on the Profit and Loss statement.
6274, 6414, 6424: Fixed asset depreciation not expense

closes odoo/odoo#146802

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-03 09:17:49 +00:00
Theo VINCENT (thvi) 1479104495 [FIX] pos_online_payment: full flow test
- Replaces a randomly failing test by a simpler test.
As reported by XDO (https://github.com/odoo/odoo/pull/123237#discussion_r1410620206), executing web requests asynchronously during the execution of a tour which does an RPC is randomly failing.
The fix consists in not testing the full online payment flow with the cashier frontend interface, but instead simulate an order saved on the server and simulate real customer web requests for paying online for that order.

 - Simplifies the way payment portal URLs are build.

closes odoo/odoo#145595

closes odoo/odoo#146029

Task-id: 3632217
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Théo Vincent (thvi) <thvi@odoo.com>
2024-01-03 09:17:48 +00:00
Nicolas Martinelli 8239bfb226 [IMP] base: higher priority for vacuum
There are various cases where we observe crons which systematically
face a CPU / memory limit. In a setup where a single worker cron is
launched, a failing cron will prevent subsequent crons to run.

This happens because the limits are evaluated at the worker level: the
worker is killed, then starts over with the same job list order.

If the vacuum cron cannot be run anymore, it leads to tables not
garbage collected anymore (e.g. `bus_bus`), causing performance issues.
To avoid this, we give a higher priority to the vacuum cron.

closes odoo/odoo#144210

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2024-01-03 09:17:48 +00:00
Prakash Prajapati f1654683b6 [FIX] web: fix the test case related to the year
Before this commit, since we are no longer in 2023, the test failed
because there is no longer 2021 in the filters dynamically added in the
dropdown of the date filter. The reason is now we have the current year,
the previous one, and the one before, that is, 2024, 2023, 2022.

This commit adds a patchDate to be sure we will start the test in 2023,
to get the expected filters displayed (2023, 2022, 2021).

closes odoo/odoo#147809

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-02 16:09:51 +00:00
Prakash Prajapati 9a3d51c1e3 [FIX] spreadsheet: fix the test case related to the year
Part-of: odoo/odoo#147809
2024-01-02 16:09:51 +00:00
Xavier-Do 1b5d6893c6 [FIX] l10n_hk_hr_payroll: remove from standalone tests
This is breaking since 2024-01-01, disabling the test waiting for a
proper fix.

closes odoo/odoo#147846

X-original-commit: 56cdb8a4ad4a4650df2399305ed6210833b325b5
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2024-01-02 15:48:46 +00:00
Odoo Translation Bot ad35458e8b [I18N] Update translation terms from Transifex 2023-12-31 00:18:24 +01:00
Florian(flg) 1765637e5a [FIX] account: Don't show gap sequence warning for draft moves
When we have more than one draft move for the same journal,
it shows the gap sequence warning on the dashboard. Even if there
is no gap sequence.
It is caused by the fact that we used the sequence_prefix field
on account move to check if a sequence exists.
The aim of this commit is fixing the part of the sql
query modified in 61c9bd69bb0342d845608ad0671e36c70f64fbd3 by
verifying that the name != '/' like we did for the sql query
that computes the made_sequence_hole field.

task-3648745

closes odoo/odoo#147792

X-original-commit: 90ec2ed2043d90e5632d02416b9806c2c87e69c7
Signed-off-by: William André (wan) <wan@odoo.com>
2023-12-30 09:38:03 +00:00
Jigar Vaghela 9ff2d9f16a [IMP] account: add support of financial year in sequence
For countries where the financial year is not from January to December
so the sequence may contain two years like 2022-2023 where 2022 is the financial year start and 2023 is the financial year end and this sequence is reset when the financial year ends.

so in this commit, we add support for this type of sequence
* INV/2022-2023/00001
* INV/22-23/00001
* INV/2022-23/00001

closes odoo/odoo#147785

X-original-commit: 072085b32c435fa88d6765469cb0908b9b5c3074
Signed-off-by: William André (wan) <wan@odoo.com>
2023-12-29 19:47:34 +00:00
Killian Frappart bc0b090cd6 [FIX] bus, mail, im_livechat: open discuss from livechat history
The kanban view used to display message history of livechats sessions is
replaced by Discuss for a smooth and consistent user experience.

Minimum viable version for Task-3497801

closes odoo/odoo#146800

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-12-29 18:33:23 +00:00
Benjamin Vray 9351b2a5eb [FIX] sale: fix product configurator badge style
Since commit [1], we've applied a style to the badges (Bootstrap badge)
which display extra prices next to a product's variants.

However, this style unintentionally affected certain badges that should
not have been affected since this other commit [2].

Steps to reproduce the bug:

- Open the Website app.
- Go to "Configuration" in the main navbar.
- Select "Payment Providers" in the dropdown.
- Pick the "Demo" payment provider.
- Change the state to "Test Mode."
- Set "Bank" as the "Payment Journal".
- Go to the "/shop" page.
- Click on a product.
- Click on "Add to Cart" on the product page.
- Go to the cart and click on "Process Checkout".
- Bug: On the "/shop/payment" page, notice a slight text misalignment in
the badges next to the Payment Providers selector.

In this commit, we've adjusted the CSS rule to ensure that only product
configurator "extra price" badges receive this styling.

[1]: https://github.com/odoo/odoo/commit/3e03bd9a399d607d0f36c7e7652ee743a7cfe61a
[2]: https://github.com/odoo/odoo/commit/611e2f20f975c590eb75d64379be84dd4cc472ef

task-3626728

closes odoo/odoo#147755

X-original-commit: d30a081016d8547dd9bc7bff1d47d78ef2ceb2cb
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-12-29 16:10:47 +00:00
Djamel Touati 705b256b8c [REV] mrp: revert commit fe508c6
This reverts the following commits : https://github.com/odoo/odoo/commit/fe508c6b2cb1b92d7b063cc194a3dad37f4eb255

The behavior for tracked products is different; the quantity is modified
in a wizard by adding other `stock.move.line`, which does not trigger
the change of the 'picked' field to true and makes the behavior
different from non-tracked products.

We prefer to remove this fix and keep the same behavior for all types
of products. The user can manually select the checkbox for the 'picked'
field.

Update the optional show for the field “picked” in the MO form

closes odoo/odoo#147695

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-12-29 16:10:46 +00:00
nda 5054148633 [FIX] base_import_module: avoid warning when browsing industry modules
An ormcache has been added to a method that takes lists as parameters but
lists are not hashable.

steps to reproduce:
- go to apps and click on on 'Industries'

before this commit:
- a warning is raised in the logs:

WARNING industry odoo.tools.cache: cache lookup error on ('ir.module.module', <function IrModule._get_modules_from_apps at 0x7f99e842fc70>, ['icon', 'icon_flag', 'to_buy', 'name', 'state', 'summary', 'website', 'application', 'module_type', 'shortdesc'], 'industries', False, ['&', '!', ['name', '=like', 'theme_%'], '&', ['application', '=', True], ['module_type', '=', 'industries']], 80, 0)
Traceback (most recent call last):
  File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/cache.py", line 99, in lookup
    r = d[key]
  File "<decorator-gen-5>", line 2, in __getitem__
  File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
TypeError: unhashable type: 'list'

after this commit:
- ormcache is properly used

opw-3660052

closes odoo/odoo#147730

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-12-29 14:59:44 +00:00
Flotchet 0b5639c540 [FIX] hr_recruitment: limit job title size
step to reproduce:
- go to recruitment
- create a job with a title with a abnormally long title
-> the title is not limited & overflows

Bug explaination:
The parent has no defined width, so the title cannot be limited by
the original css rule.

Expected behavior:
The title size should be limited or be able to wrapped.

Bug resolution:
Remove the o_text_overflow class and thus permit the title to be
wrapped.

behavior after this commit:
The title is able to be wrapped.

task-3598895

closes odoo/odoo#142480

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-12-29 13:42:56 +00:00
Killian Frappart 6b78c08783 [FIX] mail, im_livechat: remove automatic thread pin when opened
Threads are automatically marked as pinned when they are opened but this
behavior is not always desirable. They are now implicitly pinned when it
makes sense to do so.

closes odoo/odoo#146841

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-12-29 12:27:45 +00:00
tsm-odoo a42e42ff15 [FIX] mail: fix non deterministic im status test
Before this PR the "Can handle im_status of unknown partner" test was
sometimes failing. This test is not related to im_status: it tests
that receiving a `mail.record/insert` notification properly inserts
the data in the store. This flow is already thoroughly tested as many
discuss functionalities rely on this mechanism. This PR removes this
test.

fixes runbot-52628

closes odoo/odoo#147705

X-original-commit: 39a368238f5fc9b8d8d4115f14a05499322e92e6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-12-29 11:06:59 +00:00
Antoine Dupuis (andu) c0450feaa3 [REF] l10n_ec: Refactor _l10n_ec_get_identification_type
_l10n_ec_get_identification_type will get called quite often in a loop
in the ATS report, so it's important that it gets orm-cached. This
reimplementation removes calls to ref() and replaces them with calls
to _xmlid_to_res_model_res_id() which is entirely orm-cached.

closes odoo/odoo#147723

X-original-commit: f95540bb8b92e795b1331910049d0d6de7da120c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-12-29 09:49:54 +00:00
nda 6be13ae31d [FIX] core: make properties fields work with inherits
Related fields created when using composition based inheritance are
created without the 'definition' attribute which leads to errors if
you try to read it.

steps to reproduce:
in an odoo 17 shell (it's easier to reproduce in 17 because there is
an example of a problematic field)

self.env["product.product"].search_read([], ["product_properties"])

before this commit:
an error is raised:
TypeError: tuple indices must be integers or slices, not NoneType

after this commit:
the field product_properties is read from product.template

opw-3618178

closes odoo/odoo#147729

X-original-commit: bd012785fe3081aa14a556a94702373cfce4f5db
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
2023-12-28 22:21:50 +00:00
Walid 2be5206720 [FIX] mrp_subcontracting_purchase: svl component unit price
Steps to reproduce:
- Create product FNS, storable, avco
- Create product CMP, storable, avco, cost=$100, add 10 unit in stock
- Set resply subcontractor route in inventory tab
- Create BoM for FNS: subcontracted, cmp=1 unit of CMP, vendor=Azure Interior
- Add "Azure Interior" to the vendor list of FNS (under Purchase tab) with a price of $20
- Create purchase for 1 unit of FNS to "Azure Interior"
- Confirm: Receipt should show subcontracted
- Validate Receipt: Valuation of FNS should be $120
- Create vendor Bill, Validate
=> Product Valuation is overwritten, cost become $-80.0

Bug:
when checking price difference unit component price is suvtracted but
since they are out moves their valuation is already negtaive

opw-3618767

closes odoo/odoo#146538

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-12-28 18:03:58 +00:00
Thomas Becquevort (thbe) 00435d2a3f [IMP] l10n_pl: Update of the polish accounts, groups and positions
Currently, the polish chart of account is not up to date and is therefore
underused by user since it is not relevant.

This PR aims to improve the polish chart of accounts, account groups and
fiscal position in order to make it usable by users.

This new chart of account and other elements linked to it that are modified
by the PR are based on the documents available on the gofin.pl website. The
chart of account is based on the one available at this link :
https://plankont.gofin.pl/ which was consulted on the 2nd of August 2023.

The polish chart of account should now be relevant and useable.

task-3332731

closes odoo/odoo#146452

Related: odoo/enterprise#52874
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-12-28 16:57:51 +00:00
Shaan Thakkar (THSH) 0080bff353 [FIX] portal_rating: fix review box border
Steps to Reproduce
===================
1. Go to website slides.
2. Open any Course.
3. Click on 'Add a review' or 'Edit your review'. 
-> Message box border is not visible.

After this commit
=================
The message box border will be visible
around the text area.

Task-3623765

closes odoo/odoo#146159

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-12-28 16:57:51 +00:00
Benoit Socias 55b818370f [FIX] website: request page name before duplicating pages
Since [1] page duplication was disabled because it caused an issue when
the same URL was used several times.

This commit runs through the `DuplicatePageDialog` to obtain a page name
when duplications are requested from the pages list.

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

task-3640878

closes odoo/odoo#147480

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-12-28 15:33:39 +00:00
tsm-odoo bb2a140a59 [FIX] bus, im_livechat: add guest channel instead of using context
In [1], a context object was added to websocket requests to subscribe
to guests channels on cors live chats. However, the common mechanism
to subscribe to record channels is to pass a string channel that will
then be validated by the `_subscribe` method of `ir_websocket`. This
approach works with OdooSH out of the box while the other one does
not.

This PR removes the mechanism introduce in [1] in favor of the string
approach.

[1]: https://github.com/odoo/odoo/pull/130052

closes odoo/odoo#147114

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-12-28 15:33:38 +00:00
Djamel Touati 40fb9ca18b [FIX] stock_account: update optional show fields for valuation report
Steps to reproduce the bug:
Go to inventory > reporting > valuation
The total value is hidden and the remaining is shown

Solution:
displaying total value as optional show and remaining_value as optional
hidden

opw-3644799

closes odoo/odoo#147661

Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-12-28 14:22:30 +00:00
sbel-odoo f83ce46fa2 [FIX] purchase, purchase_stock: add supplier discount on purchase order
Currently, when replenishing a product using a supplier that has a discount, the purchase order created didn't take the discount into account. It was set to zero.
Fix in `purchase` module, test in `purchase_stock` module.

Steps to reproduce:
-------------------
* Go to ´Inventory´ > ´Products´
* Select any product
* Configure the product:
* - Product type: storable
* - Enable ´can be purchased´
* - Under the ´Purchase´ tab, add a vendor with a discount price
* - Save
* Select ´Replenish´
* Select the vendor previously added
* Confirm
* Check the PO created

Why the fix:
------------
After debugging, I discovered that
```python
po_line_values.append(self.env['purchase.order.line']._prepare_purchase_order_line_from_procurement(
    procurement.product_id, procurement.product_qty,
    procurement.product_uom, procurement.company_id,
    procurement.values, po))
```
in `/home/odoo/odoo/addons/purchase_stock/models/stock_rule.py` would loose the discount value.

Discount can be found in `procurement.values.supplier.discount`.

Further investigation revealed that function `_prepare_purchase_order_line(self, product_id, product_qty, product_uom, company_id, supplier, po)` in `/home/odoo/odoo/addons/purchase/models/purchase_order_line.py` would not make use of the discount value.

In this function, we use the discount value from the seller instead of the supplier as the seller is computed in order to use the smallest discounted_price.

opw-3640396

closes odoo/odoo#147555

Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-12-28 14:22:29 +00:00
tsm-odoo be63841a6e [FIX] bus: fix non-deterministic channel managment test
This commit fixes a non-deterministic error in the bus module. Testing
the bus service is difficult because it relies heavily on async code.
Until now, `nextTick` was used but there is no guarantee that this is
enough. This commit introduces the `waitForChannels` method that
awaits the channel subscriptions to be done before resolving.

fixes runbot-21942,54467

closes odoo/odoo#147616

X-original-commit: 429a0668a4bed52eff1c7b8cd0c5c66261678699
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-12-28 13:09:29 +00:00
hapa-odoo 47852f79d2 [IMP] l10n_in_edi: made field Place of supply Selection only
In this commit,
- I have made the field  `Place Of Supply` Selection only.
- Now, the User will require to set the `Tin Number` on the
  `Place Of Supply(State)`. Otherwise, it will raise `UserError`.
- It is required to avoid errors given in the task description which isn't
  understandable for a user to understand.
- I have stopped the creation of a new state at the time of invoice creation.
  So, if the user wants to add a new state they can do so by
  `Contacts --> Fed. state`.

Task-id:- 3339099

closes odoo/odoo#147558

X-original-commit: b3a11e500a678f37f202d864a7726b1426f88d71
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-12-28 13:09:28 +00:00