Commit Graph
168113 Commits
Author SHA1 Message Date
Martin Maes fe9c1249d0 [FIX] purchase_stock: remove show vendor button
The show vendor button creates an orderpoint.
This commit removes it as it should not create one.
The wizard will be adapted in a future master pr.

task-3527727

Part-of: odoo/odoo#145384
2023-12-08 08:35:21 +00:00
Martin Maes ae7e503947 [FIX] stock,mrp,purchase_stock: replenish fix
In 16.4, this commit https://github.com/odoo/odoo/commit/c3b7a87462cd41654d0e2bd3beb2f0e065ddfb75
created a notification when replenishing a product.
However, it achieved it by modifying a stock.order_point which was
not the ideal solution as we don't want the order_point to change.

In this commit, we will revert to the previous behaviour,
but we'll keep the notification by delegating it to the wizard itself.

The way the record created were retreived (to display the notification)
was thanks to the orderpoint.
As we do not have access to orderpoints now, we are just retreive
the first record (of a certain type) created just after the start
of the function.

This method has a big problem : concurrencies.
If anyone creates a record on ``manufacturing.order``,
``purchase.order.line`` or ``stock.move`` between the start of
our timer and the creation of our record, a wrong record will be
selected.

task-3527727

Part-of: odoo/odoo#145384
2023-12-08 08:35:21 +00:00
Gauthier Wala (gawa) a00200a947 [FIX] account: test switch of days
If we begin to run the test at 23h59m59s, the move date could be put
at a day and the freeze for the cron on the following day, and so,
make the test fail.
Let's just define the day explicitely.

Linked to runbot error 36224

closes odoo/odoo#145444

X-original-commit: 9206e16c84038f08606c045dcf138f72ef78aa4a
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-12-08 07:27:14 +00:00
micheledic 0969c13237 [FIX] stock: fix for TypeError: value.toFixed is not a function on BomOverviewTable caused by False value on quantity
closes odoo/odoo#145449

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-12-08 01:45:39 +00:00
Mahdi Cheikh Rouhou (macr) 3341285652 [FIX] website_sale: not reset access point on payment method change
Similar to this: https://github.com/odoo/odoo/pull/124425

Issue:
======
The shiping and billing address are the same when choosing pick up
locations which is not true.

Steps to reproduce the error:
=============================
- install website_sale and delivery_sendcloud module;
- create a shipping method (use Sendcloud provider);
- configure the integration with
"Mondial Relay Point Relais International 1-2kg";
- configure option with shipping rule and use location;
- on website create a new quotation with the pubic user;
- process the checkout;

(Check in backend the shipping weight)

- fill City and Zip Code fields with correct value
(example: Paris | 75011)

(- configure the company's country)

Origin of the issue:
====================
Updating the payment method will trigger a cart update which will reset
the access_point_address.

Solution:
=========
Using the context variable `no_reset_access_point_address` introduced
in the commit mentioned above.

opw-3615829
opw-3596705

closes odoo/odoo#145425

X-original-commit: 7d43176d35faad025dd98c52cebb07a8f16e2270
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-12-08 00:09:00 +00:00
Guillaume-gdi d2fdecd7b3 [FIX] website: lower case industry name in configurator
This commit converts the industry name in the configurator to lowercase
it in order to optimize the IAP placeholder cache.

task-3626875

closes odoo/odoo#145231

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-12-08 00:08:50 +00:00
Benjamin Vray c0ce960582 [FIX] web_editor, website: fix highlight animated text icon
Steps to reproduce the bug:

- In Website edit mode, drag and drop a 'Text-Image' snippet onto the
page.
- Select the word "Subtitle" in the title of the snippet.
- Click on the 'Animate' button in the editor toolbar.
- Bug: The 'Highlight Animated Text' icon that appeared on the right of
the title ("Inline Text") of the editor toolbar is too big.

task-3597377

closes odoo/odoo#144892

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-12-08 00:08:48 +00:00
rkka-odoo 26de73f7c5 [FIX] product: prevent traceback when print preview report
qwhen user tries 'PRINT PREVIEW' product.report_producttemplatelabel_dymo report
in web_studio, A traceback will appear.

Step to produce:
- Install 'Sales' and 'web_studio'.
- Go to 'web_studio' and open 'Sales'.
- reports > product.report_producttemplatelabel_dymo
- Click PRINT PREVIEW

Error: QWebException: Error while render the template KeyError: 'pricelist'

https://github.com/odoo/odoo/blob/e4390c224c2f59afd6456bcf50910fbe3836b4ca/addons/product/report/product_label_report.py#L23-L26
Here 'pricelist' is not present in return.

sentry-4673780990

closes odoo/odoo#144475

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-12-08 00:08:47 +00:00
rhe-odoo 94d0addb8b [FIX] pos_sale: override order_line_field
In the _order_line_field function from the pos order line model,
the override doesn't set a default value for session_id in pos_sale.

Now we make sure the override is correct.

closes odoo/odoo#139973

X-original-commit: bb3742fcc82c032d85f6a547ba1ecb8a84819a25
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-08 00:08:45 +00:00
Kacper Gasior d36f23bbf3 [IMP] hr: add missing helpers
Change adds missing helpers and alters some of their messages
in differents parts of HR apps.

task-3522163

closes odoo/odoo#145268

X-original-commit: a2238763d4fad99da69a96104adf26b6d8eca938
Related: odoo/enterprise#52261
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-12-07 22:48:39 +00:00
Pedram (PEBR) 2659e98a36 [FIX] pos_restaurant, *: correct receipt printing for paid orders
Prior to this commit, attempting to print a receipt for a paid order in
the PoS restaurant resulted in an error. This issue was due to the
'getReceiptHeaderData' method in the PoS restaurant using
'this.get_order()' to retrieve the order, which is not applicable for
paid orders. Additionally, this problem exists in other modules that
override 'getReceiptHeaderData'.

To resolve this, the order is now passed as an argument to the
'getReceiptHeaderData' function.

opw-3616997

closes odoo/odoo#145252

Related: odoo/enterprise#52249
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-12-07 21:30:05 +00:00
Julien Carion (juca) a33028095f [FIX] sale_product_configurator, web: fix warning
This commit fixes an issue with the product configurator where if a
subproduct contains an on sale warning, the subproduct won't be added to
the quotation when the main product is added. In order to fix this issue,
it was needed to provide a way for the allowWarning option to be passed
from the addNew method of the basic_relational_model to the
_applyX2ManyChange method of the basic_model. This is done by propagating
the option through the command until it reaches the basic_model.

Since the issue is no longer present in 16.3, this forward port only
adds the test.

opw-3462462

closes odoo/odoo#145404

X-original-commit: 2204ced3e24773c34e9356fd5b1d658f8b330dd1
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-12-07 20:00:42 +00:00
Antoine Dupuis (andu) 68a6db4f96 [MOV] l10n_de: Move code for setting default tags on accounts to l10n_de
Previously, the code that sets default tags on bank accounts was in
l10n_de_reports, so was not yet loaded when the demo company is created
at module init of l10n_de.

As a result, the demo company was created without the necessary tags
on the 1001 Cash and 1201 Bank accounts, which meant that the Balance
Sheet would not be impacted by these accounts on the demo company.

This commit fixes this.

taskid:none

closes odoo/odoo#145357

X-original-commit: 70c3cf2fa31fca3fea93d8623dc38cad0d048450
Related: odoo/enterprise#52302
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-12-07 18:35:51 +00:00
Adrien Guilliams (adgu) 8f2810d125 [FIX] pos*: adapt overall mobile display to new size
A recent commit (odoo/odoo#139686) changed the size of the mobile view
in pos to <= 992px. This commit adapts the overall display
to this change.

closes odoo/odoo#144703

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-07 15:53:08 +00:00
abd-msyukyu-odoo b2c5f07391 [IMP] web_hierarchy: add padding on the last row
Prior to this commit, the last hierarchy row bottom was exactly at the viewport
bottom, which was a little cramped. This spacing will clean this up.

task-3562116

closes odoo/odoo#143941

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-07 15:53:07 +00:00
abd-msyukyu-odoo c477d21384 [FIX] web_hierarchy: update nodePerNodeId of the forest on drop
When dropping a node in a different tree, the `nodePerNodeId` of the forest was
not updated. The result was that `HierarchyNode.canShowChildNodes()` could be
wrong because `Forest.resIds` could contain the same id multiple time if the
original tree is unfolded again after the drop operation. Properly calling
`collapseChildNodes` on the root of the expanded tree will update
`nodePerNodeId` for the tree and the forest.

task-3562116

Part-of: odoo/odoo#143941
2023-12-07 15:53:07 +00:00
abd-msyukyu-odoo 99f40907f6 [FIX] web_hierarchy: drop a child as a sibling
When dropping a child with an opened sub-hierarchy as a sibling of the original
parent, the original parent should be closed.

task-3562116

Part-of: odoo/odoo#143941
2023-12-07 15:53:07 +00:00
abd-msyukyu-odoo 8087b7cb0e [FIX] web_hierarchy: remove children nodes when dropping a parent
When removing a child node, its descendants were removed from the tree, but its
nodes were not reset, meaning that ghost nodes remained displayed in the
hierarchy view while not referenced in the model anymore.

Calling `removeChildNodes` on the removed child node will remove its descendant
from the tree and reset its nodes.

This commit forces the update of every descendant of a dropped node since some
values could have been updated because of their new ancestor (i.e. access rights
in Knowledge).

This allows to keep an opened hierarchy open after the drop, while avoiding the
"ghost" situation.

task-3562116

Part-of: odoo/odoo#143941
2023-12-07 15:53:07 +00:00
abd-msyukyu-odoo ab944b2450 [IMP] web_hierarchy: scroll to a dropped card
When dragging a card at an intermediary position, the view is scrolling to
the bottom, so the user looses track of the card that was just dropped. The view
should instead be scrolled to the dropped card, and only if necessary.

"Smooth" scrolling is handled by the browser rendering engine and is separate
from the JavaScript execution context. Therefore no test is introduced for the
"auto-scroll" feature.

task-3562116

Part-of: odoo/odoo#143941
2023-12-07 15:53:07 +00:00
abd-msyukyu-odoo 6772252c99 [FIX] web, web_hierarchy: ensure proper scroll speed/behavior
In [1], an automatic scroll feature was introduced in order to always scroll to
the bottom of the hierarchy view after each patch.

The `isAnchor` option is removed, because in `Knowledge` it has the side effect
of completely scrolling the article down to the last card of the Hierarchy
view, hiding the rest of the view. Also, that option was not useful in the
standard configuration since there is only one scrollable parent.

Another issue is that the `scroll-behavior: smooth` css property also affects
the scroll speed of the `draggable_hook_builder`, which means that drag scroll
speed is extremely slow and does not follow the speed computed in that file.
This style is therefore removed, and `scrollTo` is refactored:
  - Make use of the native `Element.scrollTo` method, which has a `behavior:
    "smooth"` option.
  - Move and rename methods to compute the closest scrollable from the
    `draggable_hook_builder.js` to `scrolling.js`.
    - They check if a scrollable has a client[Dimension] greater than 0 for
      eligibility.
    - They check the proper `overflow-[axis]` from the computed style (`auto`
      and `scroll` are eligible).
    - A test of `scroller_service_tests` was updated because even if an element
      has `max-height: 0`, its children still can have a height and make their
      scrollable ancestor have a `scrollHeight` greater than its own height.
  - If the `scrollable` option is given to the function and the provided
    element is not actually scrollable, compute a `scrollable` ancestor instead
    of doing nothing.
    - This is more flexible in a situation where a supposedly "scrollable" is
      computed with a selector and ends up not "scrollable" in some custom
      configuration (i.e. embedded view in Knowledge).

The `scrollable` option is removed, since `scrollTo` is already able to compute
the correct closest scrollable element, no need to hardcode a selector for that.

Finally, the draggable speed and threshold for the Hierarchy view are set to
the same values as a Kanban view for user experience consistency.

[1]: https://github.com/odoo/odoo/commit/3489a0d28fdbaf607d18b00d144bb00bae2727c3

task-3562116

Part-of: odoo/odoo#143941
2023-12-07 15:53:07 +00:00
abd-msyukyu-odoo fbac26be7c [FIX] web: get next config for model loaded with values
In `web_hierarchy`, the model is always loaded with values.
However, when a record (component) props are updated, its resId can change (i.e.
if the ordering in the hierarchy view changes), therefore not only the `root` of
the model should be updated with the provided values, but the config should be
reevaluated as well since some record (datapoint) getters use it.

task-3562116

Part-of: odoo/odoo#143941
2023-12-07 15:53:07 +00:00
abd-msyukyu-odoo 8e72a2f4b4 [FIX] web_hierarchy: fix misnamed rendering context expression
`dataPointIdExpr` was misnamed as `dataPointId` in the hierarchy compiler
`compileField`.

task-3562116

Part-of: odoo/odoo#143941
2023-12-07 15:53:07 +00:00
tsm-odoo f818e50527 [FIX] mail: show message unread counter on tab
Since 16.0, the number of unread messages is not shown anymore on the
tab title. This is due to the `set_title_part` event being sent on the
wrong bus. The title service is the new preferred way to change the
document title. This PR makes use of this service to restore the
previous behavior.

closes odoo/odoo#145329

X-original-commit: 5c4c5d2076d9dd4b767b01a88a0ab95127bb4f6b
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-12-07 11:57:11 +00:00
Pedram (PEBR) 19df0d9ba0 [FIX] pos_restaurant: exclude archived floors in get_tables_order_count
Before this commit, archiving a restaurant floor caused an error when
opening a PoS restaurant session. This issue originated from the
`get_tables_order_count` function, which executed a search based on
`restaurant.table`. Since archiving a floor does not automatically
archive its tables, the function returned information for archived
floors, leading to errors.

With this commit, we introduce an additional search to first identify
active floors in a PoS config. This refined search is then used to
filter tables, ensuring that only tables from active floors are
considered.

opw-3619830

closes odoo/odoo#145052

X-original-commit: b3ec68c4091276566db32f13346d4440128e42a9
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-12-07 11:57:08 +00:00
Mathieu Walravens d1ba6acfcf [FIX] stock: allow writing recordsets on move lines
Before this commit:
Calling `env["stock.move.line"].write({"lot_id": lot_id})` with `lot_id`
as a recordset instead of an id does not work.
However, this is supported by the base model `write` method.

Steps to reproduce:
1. Create a product A without tracking
2. Set product A's quantity to 10
3. Create an internal transfer to move 10 quantities of product A from Stock to Production
4. Change product A's tracking method to track by lot
5. Create a BoM for A with component B
6. Set product B quantity to 10
7. Produce 10 quantities of product A by creating a manufacturing
8. A traceback prevent marking the MO as done

opw-3620539

closes odoo/odoo#145346

X-original-commit: 2fa53e84fadc79a03d5d6b7134496a16b1edaf2a
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Walravens Mathieu (wama) <wama@odoo.com>
2023-12-07 10:08:02 +00:00
Djamel Touati f0c9377662 [FIX] stock: only resupply from a warehouse in the same company
Steps to reproduce the bug:
- Enable “multi steps routes” in inventory settings
- Have two company “A” and “B”
- Create another warehouse in company A
- refresh the page

Problem:
You should not select a warehouse in another company, as it will lead
to several errors later on. If the user wishes to use this option,
they can activate 'Inter-Company Transactions' in the settings and
then utilize this feature.

opw-3604302

closes odoo/odoo#145332

X-original-commit: 7514234959774c0b5e64c4a76d9c4cb776e26746
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-12-07 10:08:01 +00:00
mano-odoo 998e40cf07 [FIX] web, project: list renderer alignment top
Prior to this commit some td in the list renderer were vertically align
on the middle while other are aligned on top. This comes from commit[1]

This commit removes the vertical-align: middle to rely on the inherited
alignment from the `<td>` which is inherited until the `<table>` el
which set the alignment on `top`.

To visually center the icons previously centered by vertical-align,
a new variable: `$o-line-size` is created.

This variable accounts for the total size of a line which is the font
size multiplied by the line height.

In our case this ensure that the icons line height in the list view is
the same as the <td> that are containing text.

[1]: odoo/odoo@53f6053997

task-3557566

closes odoo/odoo#145290

X-original-commit: cce036d03ccd7c12f34ed930b8964e26464732ba
Related: odoo/enterprise#52275
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-12-07 10:07:59 +00:00
Julien (jula) ad702c20b1 [FIX] base: call dedicated method for regenerating assets bundles
__Current behavior before commit:__
The logic to regenerate assets bundles is located in the frontend (i.e.
the JS is making the calls to retrieve and unlink them) which is not
very clean.

Furthermore, when doing so, the old assets might still be included on
cached views that called them with `t-call-assets`.

Therefore, regenerating assets bundles can break the CSS or the JS as
long as the view cache is not cleared.

__Description of the fix:__
A new backend method is implemented for regenerating asset bundles.
This provides a dedicated and maintainable approach. Additionally, the
cache is explicitly cleared during the regeneration process.

__Example of steps to reproduce the issue on runbot:__
1. Check `Disable cache` in chrome dev tools.
1. Little bug icon > Regenerate Assets Bundles

closes odoo/odoo#145279

X-original-commit: b8e1f9f880e4723ddbe595043d22b565ad735832
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
2023-12-07 10:07:58 +00:00
Pedram (PEBR) c569a0d41b [FIX] product_expiry: handle missing lot in FEFO removal strategy
Before this commit, using the First Expiry First Out (FEFO) removal
strategy led to a traceback error during stock move confirmation if a
stock quant of a product was missing its lot. This issue arose because
the removal strategy's sort key was based on `removal_date`, which is a
field related to `lot_id`.

To address this problem, the sorting logic has been modified. Now, it
uses `removal_date` or `fields.datetime.max` as the sort key.

opw-3625784

closes odoo/odoo#145274

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-12-07 10:07:57 +00:00
Deependra Solanki 4ef05755bb [FIX] web_editor: fix selection on table creation
Before this commit:

When a table is created the selection is set to the first `TD` of the table.

After this commit:

When a table is created the selection is set to the `P` tag inside of first `TD`
of the table.

task-3610536

closes odoo/odoo#144932

X-original-commit: 07d00347822f2d4b9fd0d315a52892030fd41693
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
2023-12-07 10:07:56 +00:00
Loukas Wets (lowe) ef59f6d448 [IMP] pos_restaurant: archive shop when restaurant
When restaurant is installed the demo shop is archived if no session has been
made.

closes odoo/odoo#144135

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-07 10:07:55 +00:00
Benjamin Hanquin (beha) fbd9de0232 [FIX] base: Enforce IrAttachment usage
Issue:
A few internal developers (check related task) used file operations on
IrAsset instead of IrAttachment.

Analyze:
Nothing is done in order to prevent this and it should be clearer for
everyone.

Fix:
Assert that the instance is an IrAttachment in order to avoid a bad
practice.

Related task:
task-3594813

closes odoo/odoo#145337

X-original-commit: afdc094aa3a5eb3cbbe0c482164032b2befa168f
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Benjamin Hanquin (beha) <beha@odoo.com>
2023-12-07 08:30:20 +00:00
visp-odoo ff8ee482b8 [FIX] web_editor: tab outside link hides linkpopover
Before this commit:

Tab on link moves link table but the link popover stucks.

After this commit:

Tab outsided the link hides the linkpopover.

task-3389015

closes odoo/odoo#145297

X-original-commit: e9ada60cb1f6986a578e17ddce1f5ae6a6fe95dc
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-12-07 08:30:19 +00:00
Thomas Becquevort (thbe) 405483cb06 [IMP] hr_expense:warn user on expense category price update
Description of the issue/feature this commit addresses:

Currently, if the price of an expense category which has expenses posted is
modified, the total amount of those expenses is modified too. This is a wanted
behavior but this might surprise the user and so it would be preferable
to tell him that those amount will be modified when he is editing the
category's price.

Desired behavior after the commit is merged:

Adding this commit, when a user modifies the standard_price on a expense
category, if this category has posted or draft expenses linked, a warning
message will appear to tell the tell the user of what is going to happen.

task-3506770

closes odoo/odoo#144983

X-original-commit: 5aabb58
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Thomas Becquevort (thbe) <thbe@odoo.com>
2023-12-07 08:30:17 +00:00
Rodolpho Lima 84285942f4 [FIX] mass_mailing: multiple toolbar instances
Before this commit, multiple toolbar instances would be created when
switching between records via the form view pager.

This commit fixes the issue by using and properly setting up the
existing Toolbar child component, without the need to instantiate a new
one. It also removes this module's dependency on the legacy
ComponentWrapper.

task-3495685

closes odoo/odoo#144802

Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
2023-12-07 08:30:16 +00:00
aliya 5d00b4146a [FIX] l10n_lu: fix the migration script
The migration script for taxes was forward-ported without changes from 15.0 to master. However, it should be done differently since saas-16.2.

closes odoo/odoo#145338

X-original-commit: d5179bf65294bced57877579c56deb9e72ecb177
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-12-06 21:48:56 +00:00
Denis Ledoux 6e8e3e6333 [IMP] core: allow to override model/field manual name rule
At Odoo, we want custom models and fields to start with `x_`.
However, other developers and companies might want to customize
that behavior and be able to change the rule.

This revision targets to factorize the rule `startswith('x_')`
in a dedicated method on `ir.model` and `ir.model.fields`
so they can be overridden to allow the customization
of custom model and fields name in custom modules.

closes odoo/odoo#145270

X-original-commit: edf979c7fddbf05b915393923ed57680b9ba5399
Related: odoo/enterprise#52263
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
2023-12-06 20:39:42 +00:00
Renilkumar Kajavadra b389016cd3 [FIX] l10n_cl: prevent IndexError when creating customer
When the user creates a new customer and enters "." in Identification Number,
a traceback will appear.

Steps to reproduce the error:
- Install "l10n_cl" module
- Switch to Chile Company
- Go to Invoicing > Customers > Create New Customer > Enter Name >
  Select 'Chile' in Country > Enter "." in Identification Number > Save

Error: A traceback appears:
"IndexError: string index out of range"

code reference:
https://github.com/odoo/odoo/blob/276972f96d2eb1a65686e7319f601ed435b57b88/addons/l10n_cl/models/res_partner.py#L40
Here, when user enters "." in Identification Number
then values['vat'] will be ".",
So when it will try to .format(),
It will lead to above traceback.

sentry-4593791704

closes odoo/odoo#145262

X-original-commit: 1ca7ad1489154754a23086e1b0d47386bfb7c7e4
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-12-06 19:30:05 +00:00
Andrea Grazioso (agr-odoo) fcc698c8ed [FIX] account: payment reference blanking propagation
Create a vendor bill
Input any value in the "payment reference field" > save
Payment line name will be set to the payment reference
Remove the value > save

Issue:
Payment line name will be unchanged
Register payment
In the payment wizard, the "memo" field will be filled with the old payment reference.

opw-3596003

closes odoo/odoo#145213

X-original-commit: eae97ce895e3cae713463eef2c11bcd64f3fd003
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-12-06 17:27:44 +00:00
dhda-odoo 0629e34715 [FIX] sale_timesheet: project task invoice wizard daterange
saas-16.3

Steps To reproduce:
 - install project, sales, and timesheets
 -  open the project module and select any project created from SO
 - click on any task
 - click on the Sales Order smart button
 - to set the end date hover beside the start date

Issue:
 - end date should not be optional to select.

Cause:
 - the unification of datetime, daterange, and date happened in task 3121497
   where daterange widget has the end date by default optional.

Solution:
 - I have added attrs and Timesheets Period label to have the same behavior as it was in saas-16.2.

task-3506482

closes odoo/odoo#145115

X-original-commit: 1525c426b47c01a950da7f5d1e15d2839bdc8c93
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-06 17:27:43 +00:00
Loan (LSE) 962d4324fb [FIX] hw_drivers: add cron for HTTPS certificate update
Context:
When an HTTPS certificate is delivered, it is valid for ~1 month.
To avoid missing the certificate, a script is automatically ran daily
to check if a new HTTPS certificate is necessary.

On the IoT box, it is added in the native Unix system with this file:
https://github.com/odoo/odoo/blob/16.0/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/cron.daily/odoo

However, prior to this commit, there is nothing equivalent for windows

Note: the HTTPS certificate check is also done automatically when
accessing the homepage.

Before this commit:
After an HTTPS certificate delivery, if we let the IoT server
running non-stop (and without accessing the homepage).
The HTTPS will expire without any automatic renew.

After this commit:
The cron process is handled by the handler Manager

Other note:
- Using native Windows "Scheduled Task" have been proposed at:
https://github.com/odoo/odoo/pull/144584
But, was judged too risky from a security point of view
- `sched` library have been discarded as the code is too verbose
- This is unstable for the iot-box. This is the reason for the
initial Windows check on the import. The iot-box does not need
this fix anyway as explained in the context

opw-3617687

closes odoo/odoo#145114

X-original-commit: b9bd36056fbd3c27148da82cc49039669b8f8563
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-12-06 17:27:42 +00:00
ravb-odoo e3ddf17bef [FIX] hr_expense: correct domain to compute expense report
Steps to reproduce:
- open kanban view of department in employee module.
- click on 'Expense Report'.

Issue:
- When viewing the department's expense in the employee  module, all
  department data is displayed, regardless of the department selection.

Solution:
- The issue is resolved by correcting the domain, ensuring that only data
  related to the selected department is displayed. This adjustment results in
  accurate department-specific request information.

Task-3541358

closes odoo/odoo#145042

X-original-commit: 89b04551465ff323eed08afb6e0bbcb944724254
Related: odoo/enterprise#52156
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-12-06 16:12:26 +00:00
Leonardo Pavan Rocha f8c2efc012 [FIX] hr_homeworking: show correct colors in homeworking icons
Since the early versions of the homeworking modules, we were showing incorrect
colors for the homeworking icons if the partner_id was too large. This comes
from the fact that we were not using the getColor helper from calendar
to decide which color to render. Since we have a limited amount of colors,
we should not use the partner id to define the color, but actually cycle
through all the possible colors, which is done by the getColor method.

Also, when getting the homeworking data, it was possible to get partner_id as
false when the employee had no related user. This commit also changes this to
fallback on the work_contact_id if no user is set.

task-3561678

closes odoo/odoo#139167

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-12-06 16:12:24 +00:00
AH-Yussef 7d58fe2c16 [FIX] web: align progress bar to end of table cell
Steps to reproduce:
- intall Employee app
- install HR Gamification module (not an app)
- Go to Employees app
- Go to Configuration > Challenges > Challenges
- Create a new challenge with goals and participants
- Go to Configuration > Challenges > Goals History
- Open up a group
- The word "Completeness" and the progress bar is not aligned correctly, the bar is supposed to be directly underneath the label.

Investigation
- The styling of the progress bar inside table cells https://github.com/odoo/odoo/blob/1f12670a8061a4eb3fd57abca238d8daf7ef574d/addons/web/static/src/views/fields/progress_bar/progress_bar_field.scss#L27-L32 was missing to align the progress bar to the end of the containing flex box

opw-3599052

closes odoo/odoo#145190

X-original-commit: 9a02e535882bf6844fffdb7c6a71053645e3af68
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-06 14:07:57 +00:00
Djamel Touati fe508c6b2c [FIX] mrp: validate a MO with manual consumption
Steps to reproduce the bug:
- Create a storable produce P1 with BoM:
    - select any component, qty: 1 unit

- Create a MO to produce one unit of P1
- Confirm the MO
- Update the qty of the component to 2
- Validate the MO

Problem:
The quantity of the component is overwritten and reset to 1
Because, when the new qty of the component is set, only the
“manual_consumption” field is updated to “True” thanks to their compute:

https://github.com/odoo/odoo/blob/17.0/addons/mrp/models/stock_move.py#L138-L145

But the field ‘picked’, is not updated
So when we check if we have to set a quantity, the condition is false
and the quantity is reset to the original value:

https://github.com/odoo/odoo/blob/26193fdb707a631d498cbc37d68c08497e32a31d/addons/mrp/models/mrp_production.py#L1201-L1202

opw-3616628

closes odoo/odoo#145157

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-12-06 14:07:56 +00:00
Thomas Becquevort (thbe) 392e6d2369 [FIX] account: non responding view button on coa
Description of the issue/behavior this commit fixes:

When accessing the chart of accounts from the button in the starting banner
on the accounting dashboard, the "View" button on the right does nothing while
it should open the form view of the account of the row which's
button is clicked.

Steps to reproduce:

1 - Install account_accountant (or else the coa is not reachable from the dash)
2 - Open the Accounting app
3 - Click on "Chart of Accounts" in the onboarding banner
4 - Click on the View buton of any row
5 - Nothing happens

Desired behavior after this commit is merged:

This commit adds the form view in the view that is returned when clicking on
"Chart of Accounts". Thanks to that, the open_form_view is able to return a
form view when the button is clicked.

With this commit, the view button is operational.

task-3624209

closes odoo/odoo#145053

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-12-06 14:07:53 +00:00
Elisabeth Dickinson 8e1906724c [FIX] web: quick fix to remove ButtonBox overflow on mobile and tablet
Because the number of buttons in the `ButtonBox` isn't dependent on 
the size of each button, sometimes the bar overflows on smaller screens. 

This should probably be redone to calculate the size of each button 
depending on its contents (which can be translatable).
In the meantime, this fixes the overflow issue.

task-3573807

closes odoo/odoo#141163

Related: odoo/enterprise#50256
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-12-06 14:07:49 +00:00
Elisabeth Dickinson a01a6822dd [FIX] web: fix oe_stat_button dropdown width and button alignment
In the stat buttons' dropdown under "More", if the text is too long
a horizontal scroll appears.

Fixed by removing the fixed `width` and the `w-100` class on the
dropdown box.

Because of `height: 100%` which is needed for the button to be aligned
with the other buttons, the contents of the dropdown button are not
centered.

Fixed with a `d-flex` and `align-items-center`.

task-3573807

Part-of: odoo/odoo#141163
2023-12-06 14:07:49 +00:00
Elisabeth Dickinson 2172001cc9 [FIX] point_of_sale, hr_org_chart: fix status button's font-size
The structure of the stat button which is not generated by a field
has been changed to match the buttons which are generated by a field.

task-3573807

Part-of: odoo/odoo#141163
2023-12-06 14:07:49 +00:00
Anita (anko) 1d3d587edd [IMP] payment : delete sepa direct debit from mollie
Sepa Direct Debit is deleted from Mollie data as it seems
to not support one time transactions and currently Odoo
doesn't support tokenization in Mollie.

closes odoo/odoo#145166

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-12-06 12:42:24 +00:00