Commit Graph
170010 Commits
Author SHA1 Message Date
Martin Trigaux (mat) d0cd86bd14 [FIX] mail: harmonize computed field
Avoid accessing inconsistent data based on the user

closes odoo/odoo#157098

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2024-03-12 10:34:49 +00:00
aath-odoo 37507fbfc2 [FIX] various: domain picker rtl mode
Before this commit:
Switching to RTL mode would inadvertently revert the domain picker,
causing a disruption in the email format. The expected format is Alias@domain,
but it was displaying as domain@alias.

After this commit:
Now, the domain picker remains intact in RTL mode, ensuring that
the email format is correctly displayed as alias@domain.

Task-3624012

closes odoo/odoo#157091

X-original-commit: 26f67d4b4c5dbddd6d543949c4c6071e53c53515
Related: odoo/enterprise#58364
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-12 10:34:47 +00:00
Gaetan Vanden Bergh (gavb) 2a65f38641 [FIX] hr_holidays: past date_to preventing number_of_days compute
Steps:
- Create an accrual plan to give 1 day per month
- Create an allocation with this plan
- Update date_from and/or accrual_plan_id
    - number_of_days is updated
- Set date_to in the past (1)
- Update date_from and/or accrual_plan_id (1)
- Set date_to in the future (1)
- Update date_from and/or accrual plan
    - number_of_days is updated

Actual results:
- (1) number_of_days is not updated

Expected results:
- number_of_days updated on date_from/accrual_plan_id/date_to change

opw-3764865

closes odoo/odoo#157030

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2024-03-12 10:34:45 +00:00
lase@odoo.com 1767efd9be [FIX] sms: compute the body of the SMS template
Steps to reproduce:

- Go to Settings > Technical > Phone > SMS > SMS Templates
- Create a new SMS template that applies to contacts with any content
  and add context action to save the template (this will allow you to
  use this template from the contact form view).
- Go to Contacts, select any, click on the gear icon and send an SMS
  using your new SMS template.

-> Issue : the Body of the SMS template is not displayed.

Cause of the issue:

The send SMS action generates an `sms.composer wizzard that triggers a
call of the `onchange` method to compute the values of the form view of
the record from scratch.
The body of the message is computed during the snapshot1 of the onchange
of the `sms.composer`
https://github.com/odoo/odoo/blob/ad299c9325e0a0faf18ba8b2709d4be2829b7158/addons/web/models/models.py#L1076
by the `_compute_body` method:
https://github.com/odoo/odoo/blob/72c1a4f96a1219d98ce9b90ee54fd7297b9ab999/addons/sms/wizard/sms_composer.py#L167
To be processed correctly, this computation requires a `template_id`
(field of the sms.composer model). This `template_id` information is
present in the `self._context` of the onchange as a
'default_template_id'. However, since the template_id is not present in
the form view of the sms.composer, it is not part of the `fields_spec`
arguments of the onchange and this `default` value is not converted into
a value before the snapshot1 at this step:
https://github.com/odoo/odoo/blob/ad299c9325e0a0faf18ba8b2709d4be2829b7158/addons/web/models/models.py#L931-L938
Prior to Odoo 17.0, this was not a problem as the value was still
used from the context the snapshot1. However, this value is now cleaned
form the context during the snapshot1:
https://github.com/odoo/odoo/blob/ad299c9325e0a0faf18ba8b2709d4be2829b7158/odoo/api.py#L567
https://github.com/odoo/odoo/blob/ad299c9325e0a0faf18ba8b2709d4be2829b7158/odoo/tools/misc.py#L1010-L1014
As a result, there is no template_id during the call of the
`_compute_body` and the body of the message stays empty.

Fix:

In order to compute the body, correctly, we add the template_id as an
invisible field of the `sms.composer` form view so that it becomes part
of the `fields_spec` arguments of the onchange so that its default value
'default_template_id' is converted into a real value:
https://github.com/odoo/odoo/blob/ad299c9325e0a0faf18ba8b2709d4be2829b7158/addons/web/models/models.py#L931-L938
that will be used as an argument of the snapshot1.

opw-3733881

closes odoo/odoo#154549

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-03-12 10:34:44 +00:00
Arthur Pierrot 277645ab19 [FIX] hr_recruitment: fix the issue where the phone number is not copied
When an employee is created from a signed application, the phone number or the mobile number was not copied to the employee private information.

Now, the phone number is copied and if not present, the mobile number is copied.

closes odoo/odoo#157055

Task: 3659409
X-original-commit: cd1fc0bc7e3c8206e8e9e70f5f255f9c4f2b47eb
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-03-12 08:15:41 +00:00
fja-odoo 53d6d795dd [FIX] web: fix image cache in kanban/activity view
The way we cache the image is not right when that image is not on the
current record. For instance displaying a partner/user image. The unique
key used is not related to that record.

Introduced by https://github.com/odoo/odoo/pull/97544

closes odoo/odoo#157199

X-original-commit: d127ec26d8e8d42c0e25668797cbd0f37203dc52
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Signed-off-by: fja-odoo <fja@odoo.com>
2024-03-12 01:50:05 +00:00
Laurent Smet 65ce66d4ee [FIX] account: Fix opening balance account
Allow the user to set back the debit or credit to 0.
It's a bug introduced by https://github.com/odoo/odoo/commit/c3793357d823273cb4297b0eb31308ad73a9dff8

Allow to create an opening balance for an account having a foreign currency.

closes odoo/odoo#157307

Opw: 3665557
X-original-commit: e30bbdda5cd5dd8f0f5ff2cf8a1f564b6174a0d5
Related: odoo/enterprise#58462
Signed-off-by: William André (wan) <wan@odoo.com>
2024-03-11 20:41:11 +00:00
Jinjiu Liu f8be70f670 [FIX] create the font element inside the selected link element
Currently, when we color a list of links with more than three items in
the list, only the first and last links are colored.

Now when the li element is colored in a list, the font element is
created inside the link. We also make sure when the font size is defined
the font element is created inside so that the background color is
aligned with the font size

task-3677214

closes odoo/odoo#157280

X-original-commit: 4ffb15ab9d9bc7fe6d358264c1ee1ed4e48e5956
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
2024-03-11 20:41:09 +00:00
Mehdi Outagant (MOU) 0f988edc53 [IMP] website: improve the text highlights observer on resize
The goal of this commit is to only use one global `resizeObserver` to
adapt the text highlights on resize.

task-3285817

closes odoo/odoo#142968

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-03-11 19:06:07 +00:00
Mehdi Outagant (MOU) 87c727b622 [IMP] website, website_sale: open the highlight dropdown on click
Automatically open the dropdown to see the effects when the user selects
a highlight.

task-3285817

Part-of: odoo/odoo#142968
2024-03-11 19:06:07 +00:00
Mehdi Outagant (MOU) 0f629a6e7f [IMP] website: simplify the text highlight code
The goal of this commit is to improve the current text highlight code
by adding the following updates:

- The editor's code (`_handleTextOptions()`) will only set text
highlight classes and activate the snippet. Highlight DOM adaptations
(multi-line detection, setting SVGs...) are done by the public widget.

- The `o_text_highlight_item_dirty` class is no longer used to adapt
non-detected highlight items (the highlight mutation observer was
tweaked to detect and adapt the new highlight items added to the DOM
after editors commands. E.g. after the `oEnter()`).

task-3285817

Part-of: odoo/odoo#142968
2024-03-11 19:06:07 +00:00
Mehdi Outagant (MOU)andqsm-odoo 91172f9b2f [IMP] website: properly declare the stacking context of highlight SVGs
A `z-index: -1` is used on highlight SVG to make sure they appear behind
the text they highlight. However, it should still appear above
the background of the column/snippet behind that text. To make sure of
that, a new stacking context was created, using `z-index: 1`. While this
works... it also changes the z-index value, making it possible for
highlighted text to appear above other elements for no apparent reason.
This is replaced by a more appropriate `isolation: isolate;`.

task-3285817

Part-of: odoo/odoo#142968
Co-authored-by: qsm-odoo <qsm@odoo.com>
2024-03-11 19:06:07 +00:00
Mehdi Outagant (MOU) b5432e8d8f [IMP] web_editor, website: handle currentColor in selectStyle
The goal of this commit is to update the `selectStyle` options to handle
the default CSS `"currentColor"` value.

task-3285817

Part-of: odoo/odoo#142968
2024-03-11 19:06:07 +00:00
Mehdi Outagant (MOU) f3c06f743c [FIX] web_editor: force to hide the highlight options overlay on scroll
After introducing the text highlights feature in [1], the text overlay
opacity was reduced for more highlight visibility on small text, leading
to a visible text overlay even on scroll.

The goal of this commit is to fix this behaviour by forcing the opacity
to 0 when the overlay should be hidden.

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

task-3285817

Part-of: odoo/odoo#142968
2024-03-11 19:06:07 +00:00
Pedram (pebr) 74b6f0745d [FIX] pos_loyalty: enable free product for Next Order Coupon program
Before this commit, the free product reward feature in a Next Order
Coupon program was not functioning as expected. This commit fixes this
issue, ensuring that free product rewards are correctly applied in Next
Order Coupon programs.

opw-3703485

closes odoo/odoo#156008

X-original-commit: 8da5ea1a7cb26bffe7045b1dc325c24b6f9a2af7
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2024-03-11 17:53:36 +00:00
Ethan Vincent 2209021a3b [FIX] website_event_sale: enforce show tax inc/exc
**Current behavior:**
When enabling the option which specifies that products should
be displayed with their prices including tax, the dialog which
appears when a user is buying tickets for an event has a label
at the top of the window which lists the range of prices for
the available tickets. This price range does not include tax
irrespective of the status of the aforementioned option.

**Expected behavior:**
Displayed prices should adhere to the configuration which has
been selected in the db settings.

**Steps to reproduce:**
1. In the Settings app, give the `Display Product Prices`
     configuration setting the `Tax Included` selection

2. In the Event app, select an event and give at least one
     ticket type a nonzero cost

3. Go to the website, select the event which has the modified
     ticket prices, and click the Register button

4. The label atop the dialog window displays pretax prices

**Cause of the issue:**
The database setting does not affect anything in the XML which
is responsible for displaying this price range label.

**Fix:**
Set the all_prices value to be calculated respective to the
website setting that indicates whether to include or exclude
taxes when displaying prices.

opw-3734299

closes odoo/odoo#157253

X-original-commit: 4e0afec6beed75462eb86f044b968b4a7af7f45a
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
2024-03-11 16:37:37 +00:00
Thomas Lefebvre (thle) 55c77ae7d9 [FIX] hr_holidays: redirect to allocation record in report
Steps to reproduce:
-------------------
- go to time-off analysis (by type);
- group by "Requet Type" and use list view;
- click on an allocation;

Issue:
------
We don't have the record for this allocation.

Cause:
------
Commit [^1] removes the `allocation_id` field, so it is no
longer possible to retrieve a record from the
`hr.leave.allocation` model.

Solution:
---------
Place the allocation id in the `leave_id` field and use the
`leave_type` field to determine the model
(`hr.leave` or `hr.leave.allocation`).

opw-3748884

[^1]: a1949ca541

closes odoo/odoo#157204

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2024-03-11 16:37:36 +00:00
mano-odoo 5f11a12fd4 [FIX] account, *: unify alert margins above form sheets
*: account_edi, hr_work_entry_contract, l10n_ch, l10n_latam_check,
mail_bot_hr, sale, sms, survey, website_slides, pos_online_payment

This commit follows the margin variable introduced in the
`form_controller.scss` file. It removes the margin customizations
applied on the alerts which are rendered above a form sheet to let the
CSS rule handle the spacing.

task-3577058

closes odoo/odoo#156927

Related: odoo/enterprise#58282
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-03-11 16:37:34 +00:00
mano-odoo 6abd479dca [FIX] web: handle the alert margin in form_controller styling
Since Milk redesign the margin bottom on the alerts displayed above the
sheet in a form view should be mb-2 (equivalent of the margin-bottom of
the statusbar). Some alerts across Odoo were still inconsistent.

This commit introduces a custom property `--alert-margin-bottom` which
allows the customization of the alert's margin bottom depending on its
context.

This ensure that an alert rendered in the form view above the form_sheet
will receive the appropriate margin as long as there is no utility class
or override on the alert with this property.

There the last alert gets a margin of mb-2 and if multiple alerts are
displayed the ones above the last one get a margin equivalent to mb-1.

task-3577058

Part-of: odoo/odoo#156927
2024-03-11 16:37:34 +00:00
Luis Torres 6a255786ab [FIX] l10n_pe: Add domain 01 for export refunds
In commit 355250d, the domain was adjusted to automatically select the
invoice document type for customers with a RUC and limit others to the
"boleta" document type. This generally holds true, except for export
invoices requiring the 01 document type. This commit addresses the
current restriction, allowing the selection of document type 01 other
than "credit note boleta."

closes odoo/odoo#154511

Related: odoo/enterprise#56465
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-03-11 16:37:32 +00:00
Serge Bayet (seba) b2044a1196 [FIX] website: resolve mobile menu anchoring issue
This commit addresses the erratic behavior of the mobile menu when
clicking on menu items linked to anchors instead of navigating to
different pages. The issue occurs in mobile view and can be reproduced
by following these steps:

1. Create a page longer than the height of the screen with 3 blocks.
2. Add 3 links to target different sections on the page.
3. Create 3 menu items linked to the newly created anchors (/#...).
4. Save to apply the modifications.
5. Switch to mobile view.
6. Open the hamburger menu.
7. Click on the first menu item, then the second, then the third,
   and again on the first one.

Upon reproducing these steps, the scrolling event would pass through
all the anchors. This occurs since [1]. This commit introduces fixes to
ensure proper navigation when clicking on menu items in mobile view,
resolving the described issue.

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

opw-3652930

closes odoo/odoo#150810

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-03-11 16:37:31 +00:00
Paolo Gatti (pgi) e39aaef908 [FIX] l10n_it_stock_ddt: Translations
Some translations was unusable by the clients, who didn't find the
law-required labels on the DDT reason field.

Link: https://www.odoo.com/web#model=project.task&id=3604549

opw-3604549

closes odoo/odoo#157246

X-original-commit: d31cca022befafc02d26d393af91cb870ffbc6e9
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2024-03-11 15:03:07 +00:00
Julien Castiaux 822ab043f0 [FIX] base: concurrent cron worker and manual run
It is possible for a cron to be executed twice at a same moment if the
cron is currently being executed by a cron worker and that a user click
on the "run manually" button from its form view.

closes odoo/odoo#157203

X-original-commit: a45f171eabdb571465d6245bf2a6bccecab53fa0
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2024-03-11 15:03:06 +00:00
Julien Castiaux ca197d2a71 [FIX] base: log cron start/done also when running manually
The INFO "Starting job x" and "Job x done" logs are only logged for the
automatic executing of the cron by the cron worker. When running the
cron manually via its form view, no INFO was logged.

The technical support is reporting problems where a cron server action
is running twice at a same moment leading to problems such as
mass-mailing sending emails twice. There is a mutual exclusion mechanism
for cron workers but no exclusion mechanism seems in place for http
worker vs cron worker. Logging the "run manually" actions will help us
figuring out the problems.

X-original-commit: fcc2eabc671557e610688eac93bae333b0a2c119
Part-of: odoo/odoo#157203
2024-03-11 15:03:06 +00:00
Anh Thao Pham (pta) 3ab2d52b1f [FIX] account_edi_ubl_cii: allow to override Note format
In UBL 2.0, the Note node can contain the narration field of an invoice.
Its content can be some complex HTML.
Some localization (e.g. l10n_pe) doesn't support some special characters like
'\n' or '\u00A0'.
This fix allows the localization modules to format the value used by Note node.

opw-3744946

closes odoo/odoo#155081

Related: odoo/enterprise#57268
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-03-11 15:03:02 +00:00
nni-odoo 0db66b3835 [FIX] payment_xendit: public user email
When there's a payment that involves public user, an error will occur when they've input the email

3789416

closes odoo/odoo#157195

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-03-11 11:55:10 +00:00
qsm-odoo 80a6059b25 [FIX] web_editor: clean snippets branding & markers before saving them
Steps to reproduce the bug:
- Go to an event "Introduction" page
- Enter edit mode
- Click on the pre-existing "Introduction" title (note that it cannot
  be removed because of the way the page is built, we might want to
  improve that in master)
- Save it as a new custom snippet
- Go to your homepage
- Drop that new custom snippet that was saved
=> It cannot be removed, the rest of the content is kinda broken as
   wells, etc etc.

This is because the original branding was saved with the snippet.
Indeed the event pages are made in such a way those pre-defined titles
are snippets but which are "editable root elements", i.e. elements
whose ancestors cannot be edited since themselves or their neighbors
contain dynamic elements.

opw-3633326

closes odoo/odoo#157191

X-original-commit: 356b8ce1070243ce69b5ba75d4988fcee6bc6190
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-03-11 11:55:09 +00:00
Hubert Van De Walle bc326fa21e [FIX] web: prevent multiple updates when pressing enter
Steps to reproduce
==================

In 16.4:
- Go to Accounting > Reconcile 8 items
- Click on the first line on the right
- Edit the label and then press Enter
- Switch to another line

=> Odoo Server Error

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

When pressing Enter, two events are triggered: keydown and change.
In the useInputField hook, there is a listener for both of those events,
and they both end up calling `record.update` with the current value from
the input.

In the relational model, the update is locked inside a mutex.

So the first update (triggered by the keydown) does an onchange.
This onchange deletes the current records (Command.CLEAR) and returns
new records.

Once this is done, the mutex is released. The second update (triggered
by the change event) then tries the same update. Since the value was
obtained when queuing for the mutex, it uses the old (now deleted)
record.

Solution
========

This adds a test for https://github.com/odoo/odoo/pull/154991
as part of the fix got lost in a conflict resolution for previous versions.

opw-3726818

closes odoo/odoo#157155

X-original-commit: fbebffe446de9dd80db2dbe5ca7bd2746dc2a54f
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2024-03-11 11:55:08 +00:00
mebe-odoo c3a9173048 [FIX] l10n_sa_edi: fix discrepencies in invoice date checks
When trying to process invoices at a time close to Midnight, and the user is using the system from a location different from the hosting location of Odoo, the system tries to check that the date of the invoice is the same as the current date of the system. This creates problems when the hosting server's timezone is different than that of the user. For example: If the hosting location is in Middle East (India), and the user is using Odoo from Saudi Arabia,
there is a difference of 2.5 hours due to the timezone, so when the system creates the Invoice at 11 PM and tries to check the date, the date of the server is actually 29th of February, 11 PM while the date on the user's machine is 1st of March, 01:30 AM, which triggers a UserError from the _check_move_configuration function.

closes odoo/odoo#157144

X-original-commit: 601c8b8a0b4aff44811fd37f365cc62205cf96f0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2024-03-11 10:17:50 +00:00
Dang Van Loc b7e4e5b2aa [FIX] mrp: incorrect quantity_done
Step:
* Create Bom A: product A - qty 1, bom line: product = Component X, qty
= 20
* Create MO with Bom A and 1 produced_qty = 1:
	+ on components: To Consume = 20, Consumed = 15
+ Unbuild MO, check Unbuild, check Product Moves of Unbuild, check line
product Component X has Quantity = 20, in fact quantity must = 15

closes odoo/odoo#156952

X-original-commit: 18c45260f50663e042da3bbec13d02ef269e26b2
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2024-03-11 10:17:49 +00:00
Petar Najman 3242a8e513 [FIX] l10n_rs - Invalid serbian translation for Specific VAT rate 10%
closes odoo/odoo#155198

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2024-03-11 10:17:46 +00:00
Yannick Tivisse e365e22485 [FIX] hr_contract: Track some missing fields on contracts
closes odoo/odoo#157012

Related: odoo/enterprise#58326
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-03-11 08:35:07 +00:00
Gauthier Wala (gawa) 39c16212f2 [FIX] account: sorted on NewIds break
To reproduce:
- Install account_accountant
- Create an asset (monthly for example)
- Compute Depreciation
- Modify the date of the first entry to 2 months later
- Modify the date of the second entry to 1 month later (so same month)
=> Traceback

The problem is that sorted does not work with ids of NewId. We should
look at its _origin.
There is a PR that would try to fix it in general, but it's in master
(and is not sure to be merged https://github.com/odoo/odoo/pull/155850)

The problem only began to occur in 17.0 because of the changes of the
onchange function.

opw-3759153 (in chatter)

closes odoo/odoo#156874

Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2024-03-11 08:35:05 +00:00
Thomas Lefebvre (thle) 176f5ec4a2 [FIX] api: assert cr is a cursor when creating a new environment
`Environment.__new__` expects a Cursor.
Ensure developers pass a Cursor and not another kind of unexpected object.
Passing another object with the same attributes would work during
the creation of the new environment, but then would fail later,
when using the created environment with the wrong `cr` attribute,
with a less comprehensive error.

Task-3796479

closes odoo/odoo#80644

Signed-off-by: Raphael Collet <rco@odoo.com>
2024-02-13 09:07:38 +00:00
bram1000 a24f15d628 [FIX] website_slides, website_twitter: restrict keys from employees
Social users / managers shouldn't be able to access these keys,
only admin should.

For instance, in the user interface, it's only displayed in
settings, which is available to administrators only.

Task-3762961

Signed-off-by: Yannick Tivisse <yti@odoo.com>
2024-02-08 15:43:18 +00:00
duongnguyen-viindoo 8d1b0f6a7a [FIX] core: post_load default value should be same as *_init_hook
-Step to reproduce: add a post_load method in the init of any module,
specify in the manifest like : 'post_load': 'post_load'. in v16 or above
Run
test_manifests of the test_lint module and we will get warning

closes odoo/odoo#156593

X-original-commit: f87473e82af8372346320ca747c1b41d3d5cf3c5
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2024-03-11 05:23:10 +00:00
Odoo Translation Bot 1b9fd01d46 [I18N] Update translation terms from Transifex 2024-03-10 00:13:03 +01:00
David Monnom (moda) 3eb6ceb5c7 [FIX] pos_self_order, pos_online_payment_self_order: conf page behavior
The confirmation page wasn't displayed and the order wasn't sent to the
preparation display when confirming an order with a total of 0.

Now the confirmation page is displayed and the order is send to the
preparation display when the order is confirmed regardless of the total
amount.

closes odoo/odoo#157028

Related: odoo/enterprise#58348
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2024-03-09 18:37:56 +00:00
clesgow e2b26d4522 [FIX] product_expiry: use new dict for lot zpl labels
The previous fix ae3ec52 introduced a dict to display the values
required in the zpl label template.
This change didn't also update the template inheriting this one, hence
the need for this fix.

closes odoo/odoo#157160

X-original-commit: 416d29a59fb310071c2b7ed25e3032968b23d966
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2024-03-09 09:56:40 +00:00
rupa-odoo 0db96b6d27 [FIX] sale_project: fixed traceback on SO stat button in project update
Step to Reproduce :
-> Create product: Project & task
-> Create SO > Add product > Confirm it
-> Go to Newly created project > Project update > Sales order
-> Click on the project stat button > again go to project status > Sales Order
-> Crash it

Before these commit:
-> Clicking on so stat button in project update caused a traceback error that
null value is not defined.
-> When we are passing the context It was observed that create key
has null value in that context.
-> In sale_project if create_for_project_id has a null value then create key
also have null value.

After these commit:
-> So if we set False in the context, If we get null value of create key
it is set to False.

task- 3586341

closes odoo/odoo#157170

X-original-commit: 26d4c86ca1f8186811275cf6d001ef7105a07776
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-03-09 07:04:04 +00:00
adda-odoo 37d797f6d6 [FIX] point_of_sale: improve perf on saving res.partner edits
Issue -->

`saveChanges` at https://github.com/odoo/odoo/blob/saass-16.3/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js#L155
calls `load_new_partners` that calls `prepare_new_partners_domain` to compute
the domain on which the res.partner model is to be searched on, after the save has been
 commited. The search is done to update client side res.partner data.

Domain in question --> https://github.com/odoo/odoo/blob/5404f3367a611e527fcecc2dd49e683864ba4b81/addons/point_of_sale/static/src/js/models.js#L784

This domain has the potential to make `search_read` return every res.partner
record and compute fields such as 'total_due' on each one of them.
This presents the issue of overworking postgres when we only need to update one
res.partner record.

Solution -->

Use the `_loadPartners` method instead to only reload the current partner being edited + saved.

opw-3619941

closes odoo/odoo#157120

X-original-commit: 7477978482bc3c22338faab486d67085452b006d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Aditya Dasgupta (adda) <adda@odoo.com>
2024-03-09 00:24:57 +00:00
Anna Janiszewska 1032eacb6c [FIX] hr_timesheet: filter out ts for global time off
Fix to avoid considering TS lines for projects linked to global time off

closes odoo/odoo#157156

X-original-commit: 2e46a8e9179a83709638bdefc7e664837cbd8e92
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-03-08 22:55:43 +00:00
Robin Lejeune (role) 9cbc7a2dc7 [FIX] website: allow keyboard events on slideshow right away
When a slideshow opens, the keyboard events don't work right off the
bat. You first need to click on one of the arrows before being able to
interact with the keyboard, which defeats the purpose.

Steps to reproduce:
- Drop an Images Wall snippet and save.
- Click on an image: the slideshow appears.
=> Pressing left, right or escape doesn't work.
- Switch to the next image.
=> Pressing left, right or escape now works.

closes odoo/odoo#157126

X-original-commit: 32c6f7e7688eb3b05d569e1895e8fc102f71baf4
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2024-03-08 21:22:00 +00:00
sofiagvaladze 9b851eabe7 [FIX] hr_expense: fix action
In odoo/odoo#93802 some filters (including submitted) were removed from
hr.expense.sheet view in favor of the side panel.

Meanwhile, action_hr_expense_sheet_department_to_approve
was not adjusted and was still using the removed filter.

This commit changes the action to also use panel view.

task - 3578235

closes odoo/odoo#157109

X-original-commit: 664442e75787b9c61dcfbeea56c2bab071c2fa7a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2024-03-08 21:21:59 +00:00
luve-odoo a568411cc8 [FIX] project : project stage column portal
When creating a sub-task from a task form view in portal, the domain of
the stage should exclude personal stages and include only the one of the
project.

taskid:3551354

closes odoo/odoo#156776

X-original-commit: 3be073e73b5866d7b5da8cc549146be5efb5d7d0
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-03-08 21:21:58 +00:00
Lucas Lefèvre (lul) 5118f0d7e4 [FIX] spreadsheet_dashboard_purchase_stock: remove hardcoded domain date
Replace the hardcoded date "09-15-2022" in the list domain by
`context_today().strftime(\"%Y-%m-%d\")`

The domain is now stringified since it contains a dynamic value
which is not valid in a json file.

closes odoo/odoo#156550

Task: 3756934
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2024-03-08 21:21:58 +00:00
sesn-odoo 01ed3966a9 [FIX] l10n_it_edi: ensure receiving a bill produces the right sequence
Currently, if you have an empty MISC journal and receive a document,
that document will be assigned a MISC sequence, regardless of the actual
document's type.

Cause
-----
When a document is received, it is processed in two steps:
1. An empty account move is created and linked with the document.
2. The newly created move is populated with data extracted from the
   document.

At stage 1, when the move is created, it is temporarily placed in the
MISC journal. In the event that this journal is empty, a sequence is
assigned to the move. Consequently, even if the move's journal is
subsequently changed, the sequence remains unaltered.

Fix
---
Manually recompute the sequence when the move's type is set.

opw-3663873

closes odoo/odoo#155887

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2024-03-08 21:21:57 +00:00
Abdelouahab (abla) b389d2d792 [FIX] website_sale: fix selecting tag selects category
To reproduce:
=============
- create a `product.public.category` -> (id = 15 for example)
- create a `product.tag` with same id as the created category
- create two products, one with the category and the other with the tag
- go to the shop and make sure to have the categories positioned on left
(by default they are on top)
- select the tag (by clicking on the label not the checkbox)
-> the category is selected

Problem:
========
with this configuration the checkbox of the category has `id=15` attribute
and the tag has `id=15` attribute too.
so when we click on the tag label and thanks to the `for=15` attribute of the
label, we will trigger click event on `input#15` which is the category checkbox
because it's the first one in the DOM.

Solution:
=========
set id of the tag to `tag_15` and the for attribute of the label to `tag_15` to
avoid the conflict with the category checkbox.

opw-3759654

closes odoo/odoo#157095

X-original-commit: 15545301a05b538729da3c59e4d24063e9b02cb5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2024-03-08 19:48:01 +00:00
Julien (jula) 41676cd170 [FIX] website_hr_recruitment: redirect deprecated /jobs routes
__Current behavior before commit:__
`/jobs` routes have been modified in [this commit][1]. Old ones are
deprecated but are still working for backward compatibility.

When searching on this page, search params are now just added at the end
of the URL (instead of being part of the path like before).
If the URL of the page is a deprecated one, this can create a conflict
with the previous way the params were handled and produce an error.

__Description of the fix:__
Redirect the user to the new route any time he tries to reach the
deprecated ones. Any parameters included in the old URL will be carried
over to the new route to maintain expected behavior. If a parameter is
provided both in the path and as a kwarg, the kwarg value will take
precedence.

__Steps to reproduce the issue on runbot:__
1. Go to `/jobs/country/20`
2. Make a search using the search bar -> Crash

opw-3781374

[1]: https://github.com/odoo/odoo/commit/54f246f9c75b8f1ebdc637c6000f3e4773d702d5

closes odoo/odoo#157079

X-original-commit: 5a9ce2d7773222ac8989e3172f9363a7d6f71871
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
2024-03-08 19:48:00 +00:00
Jeremy Kersten 5f454dc140 [FIX] website_blog: redirect /blog/x/post/y simplify
Don't try to keep extra params and co. Keep it simple...

Else we should pop from request.params `blog` and `post` keys because
now they are converted as query param with the slug format:

/blog/name-1/post-1?blog=blog.blog(1,)&question=blog.post(1,)

closes odoo/odoo#156990

X-original-commit: 5b1eacba2e09687d627988c53910110bfb63ed1d
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2024-03-08 16:50:33 +00:00