Commit Graph
168848 Commits
Author SHA1 Message Date
Soukéina Bojabza 30ec9ffa2d [FIX] web_editor, website: improve grid image code
Commit [1] added the support for images with a link set on them in grid
mode.

As a follow up, this commit does the following:
- Removes the `!important` from the grid image anchor CSS rules, as they
were not really needed.
- Checks if the image has a closest `o_grid_item_image` column instead
of checking the parent in the `GridImage` options. Indeed, this class
already guarantees that the image is well a grid image; we can therefore
simplify the code.

It also removes a comment that was forgotten in commit [2].

[1]: https://github.com/odoo/odoo/commit/085d70cea571ea80c141ac6005e8bd8333bd269f
[2]: https://github.com/odoo/odoo/commit/d8c374e3e6b31bf88aa42952aadf3379936f7600

related to opw-3580128

closes odoo/odoo#149681

X-original-commit: 9244e85ebb9e1605292698fe31ad94da7709ab86
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-01-17 13:04:01 +00:00
Yolann Sabaux 0412f1006f [FIX] l10n_nl: display rubriek 5 with no total
Steps to reproduce:
- Open Tax report
- Define "current fiscal year"

Issue:
Dutch tax report should not display the totaal of `Rubriek 5: Voorbelasting, kleineondernemersregeling en totaal (BTW)`

opw-3446056

closes odoo/odoo#149671

X-original-commit: 1985a0564a527d4c4ae7c40212b5b799cbfad753
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2024-01-17 13:04:00 +00:00
sbel-odoo 0b705202dd [FIX] project_timesheet_holidays: enable selection of project in time off type
Curently when trying to select an existing/newly created project in the timesheet section of time off types, it will not recognise that the project exists and will suggest to create it.

Steps to reproduce:
-------------------
* Go to **Setting** -> Enable timesheets
* Go to **Time Off** App -> Configuration -> Time off types
* Create new type
* Go to **Project** App
* Create a new project
* Go back to the configuration of the new time off type
* Enable **developer mode**
* Under timesheet section, select project
* Try selection the new project created
* It suggests to create the project/does not recognise it is already created.

Why the fix:
------------
In multi-company this issue can be handled by going into the settings of the project and selecting the same company as the one in the time off type.

This issue is more problematic in case of single company because the field `company_id` is not available in neither the project form nor the time of type. As of currently, the `company_id` on time off type is by default the current company, while it is `False` by default for the project.

This PR introduced that behavior: https://github.com/odoo/odoo/commit/16a07ed1bfd33a193b363f3e87aab3f9bd6f8bd0

Since the `company_id` can now also be `False`, it makes sense to enlarge the filter domain on the time off type form. With that in place, the field `timesheet_task_id` also requires changes because a task created in a project with no `company_id` will not have a `company_id`.

opw-3644265

closes odoo/odoo#149620

X-original-commit: 57d5cf36e5a77ff249cf107dca41dfad89c1ed10
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Sarah Bellefroid (sbel) <sbel@odoo.com>
2024-01-17 13:03:59 +00:00
mano-odoo ac398e42cd [IMP] website_sale: categories scrollbar hover
Issue:

The eCommerce categories scrollbar is too small/ not easy to grab with
your mouse.

Fix:

The scrollbar height is increased on hover to increase the grabbing area

task-3371760

closes odoo/odoo#126502

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-01-17 11:38:02 +00:00
Benjamin Vray 18263b6805 [FIX] website: fix video in Image Gallery and Images Wall
Steps to reproduce:

    bug 1:
    - Enter edit mode.
    - Drag and drop an "Image Gallery" snippet onto the page.
    - Double-click on an image within the snippet.
    - In the media dialog, click the "Video" tab.
    - Copy-paste a YouTube video URL into the URL input.
    - Save the media dialog by clicking on the "Add" button.
    - Bug: The video is very small.

    bug 2:
    - Drag and drop an "Images Wall" snippet onto the page.
    - Double-click on an image within the snippet.
    - In the media dialog, click the "Video" tab.
    - Copy-paste a YouTube video URL into the URL input.
    - Save the media dialog by clicking on the "Add" button.
    - Bug: the spacing around the video is not correct and the "spacing"
    option does not work for the video.

Note that the "image gallery" snippet (also the "image wall" snippet)
was not initially designed to handle anything other than images. When
you click on the "Add" button of the snippet, you can only add images.

However, by following the steps described above, it's possible to work
around this limitation and add a video to the snippet. Since this was
not part of the original plan, several options do not function correctly
with a video.

Instead of preventing the addition of videos, we have chosen to allow it
and focus on fixing the main issues (the small size of the video and the
"spacing" option which does not work with videos). So, if someone
specifically wants to add a video, it's currently possible, though some
features may not work as intended.

task-3597156

closes odoo/odoo#149679

X-original-commit: 73f60e97a1b534b5f8dd3759bd631f9aac095426
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2024-01-17 09:15:34 +00:00
Andrea Grazioso (agr-odoo) e00c7a4359 [FIX] sale_coupon: no fixed tax discount
Have a product with percent tax and fixed tax
Have a promo program applying 50% on the order
Create a sale order
- Add the product
- Add the promo

Issue: The fixed tax is discounted
We should ignore fixed taxes when applying promotions.

opw-3580170

closes odoo/odoo#149165

X-original-commit: 2acce1c84586a0f91ac3a83570d574d0ec96f1f6
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2024-01-17 09:15:29 +00:00
kdeb@odoo.com 5e9918f845 [FIX] google_calendar: prevent google meet links when location is set
Issue
    When a location is set on an event, the google meet link is also
    generated, leading to confusion about the meeting format.

Steps to reproduce
    - Create an event with a location
    - Sync the Calendar with Google.
    - Observe that a Google Meet link is sent with the email.

Solution
    check if the loacation is set before generating a google meet link.

opw-3589379

closes odoo/odoo#149654

X-original-commit: 6aabe1b30598a8a616db01ae46dffece8f3f876c
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <kdeb@odoo.com>
2024-01-17 07:54:45 +00:00
OmarAbosamaha 72e123e8db [FIX] l10n_ar: add missing translations
Issue: spanish_ar translation is missing for some menu items and template names in the accounting app

Steps to reproduce:
1- install l10n_ar
2- switch language to Spanish(AR)
3- Open accounting app
4- check menu items

Solution:
Issue was that the translation file was called es.po and for spanish (AR) language it should fallback to es_419
As per the translation code found here in in 'translate.py' in odoo tools

https://github.com/odoo/odoo/blob/20a3998c3073af8a5d95f8303283107363caed85/odoo/tools/translate.py#L1565-L1574

opw-3601556

closes odoo/odoo#146742

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2024-01-17 07:54:44 +00:00
Khushi Vakil 574d95283f [IMP] l10n_in_pos: error on order from POS
Before commit:
If state is not set in the company,it gives error on order confirmation.

After commit:
If state is not set in the company, now it gives error when opening POS session.

task id: 3360161

closes odoo/odoo#149594

X-original-commit: 803b122585d93bf226edd40c3f184a0108e8d40a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Khushi Vakil (khva) <khva@odoo.com>
2024-01-17 06:25:12 +00:00
ilru-odoo 86accecf96 [FIX] project_account, project_hr_expense: prevent double counting in project upgrade report
Issue Description:
There is an issue in the project upgrade report where an expense with a related analytic account appears twice. This occurs once as "Expenses" and again as "Vendor Bills". This problem does not manifest on runbot with all apps installed, indicating a specific configuration issue.

The installation of the 'project_purchase' module resolves the issue, as the method "_get_already_included_profitability_invoice_line_ids" within both the "project_purchase" and "project_hr_expense" modules performs a check for an 'expense_sheet_id' in account moves. This check helps to exclude these entries from the profitability items, thereby preventing duplication. However, while this solution is effective, it leads to an undesirable addition of the Purchase app to the client's database, which is not acceptable for the client.
Relevant code sections: [project_hr_expense](https://github.com/odoo/odoo/blob/1fbcfdf69b503e77e1a931d23dd47df0daf8b2fe/addons/project_hr_expense/models/project_project.py#L70), [project_purchase](https://github.com/odoo/odoo/blob/1fbcfdf69b503e77e1a931d23dd47df0daf8b2fe/addons/project_purchase/models/project_project.py#L138C15-L138C15).

Steps to Reproduce:
1. Install Expense, Accounting, Project, Sales, Employees, Contacts apps on base runbot.
2. Create a service product with 'Prepaid/Fixed Price' and ensure 'Create an Order: Project & Task' is selected.
3. Create and confirm a sales order for the service product created in step 2.
4. In the Expenses app, create an employee-paid expense linked to the sales order's analytic account (e.g., Analytic Distribution: Departments > S00074).
5. Follow the process in the Expenses app by clicking on 'Create Report' > 'Submit to Manager' > 'Approve' > 'Post Journal Entries'.
6. Access Project Updates in the Projects app.
7. Observe that in the project profitability cost section, the same expense is listed twice under different labels: once as "Expenses" and once as "Vendor Bills".

Proposed Solution:
The proposed solution involves modifying the domain of the `_add_purchase_items` function within the `project_account` module, specifically at [this code section](https://github.com/odoo/odoo/blob/763f88e2d45cb7ba107db135eecd0365ba2b8c8b/addons/project_account/models/project_project.py#L14). The enhancement would entail adding a condition to the function's domain to exclude any IDs that are already present in the profitability report. This approach will efficiently prevent the double counting of expenses, ensuring that each expense is represented only once in the project profitability report, thereby maintaining accuracy and consistency in financial tracking. This solution focuses on enhancing the existing functionality with a targeted and efficient modification, ensuring minimal impact on other system components while effectively addressing the issue.

opw-3522293

closes odoo/odoo#149623

X-original-commit: 0902d57dd1653018d6ae72554b39e4e01fa4d6d7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Ilya Rudy (ilru) <ilru@odoo.com>
2024-01-17 00:00:48 +00:00
Wolfgang Taferner 5065f52392 [FIX] stock: add dedicated owner to move to avoid wrong quantity at date
As _compute_quantities_dict does use stock.move as a source of calculation
we need to make sure that the dedicated owner is set also on inventory
moves which was forgotten and resulted in wrongly computed quantities
in the past in case of such an use case.

closes odoo/odoo#149596

X-original-commit: 02d5c04e85e0bc1b9c0edf66969066ba4f2d769c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
2024-01-16 22:40:03 +00:00
Mathieu Walravens 5593159828 [IMP] base: neutralize webhooks
The user can define automated actions for sending data to a remote
server using a webhook.
To prevent this feature from sending unwanted data from a test database,
this commit neutralizes the field `webhook_url` to an invalid URL.
When the action is run, a warning is logged.

closes odoo/odoo#149592

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2024-01-16 22:40:02 +00:00
Alexandre Kühn 52d34b69d6 [REV] mail: revert fix line break in customer rating feedback
This reverts commit 185adf6fb487fa260bb6dfe985638bc545de7fa2.

The change was made to "fix" line breaks with rating feedback in
helpdesk. However, it's not ok to apply `inline` display layout
for all non-user made message body, as usual block display is
expected for html tags like `<div>` or `<p>`.

The correct fix should be to remove these unwanted `<br>` in the
feedback rating messages. We don't know how they appeared, but
this is a specific minor issue in helpdesk rating, so reverting
the fix is a higher priority.

closes odoo/odoo#149570

X-original-commit: 1ba04da76f391cd4543a8d3b1e6dbecf6a2cb558
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-16 22:40:02 +00:00
mano-odoo e0491c1a62 [FIX] web, mail: increase form view width
Currently the form sheet have a flex-grow-1, the chatter could use less
horizontal space to leave more space for the form sheet's content.

This commit widen the form_sheet by applying a flex-grow-2 and
reduces the chatter's top bar total width by removing the icons and
applying a sup tag on the micro information displayed aside the icons.

Since the icons are removed there is no need to test if the icon is
rendered with it's appropriate text anymore thus we can remove these
two lines. Additionally the `text-warning` on the span was unnecessary
since it's already applied on the button parent. 

task-3641988

closes odoo/odoo#147136

Related: odoo/enterprise#53208
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2024-01-16 22:39:58 +00:00
Antoine Boonen d0ed8cd287 [FIX] hr_expense: Fix auto-extraction of attachments.
Problem
---------
In the commit 24345812cb015e86f362f8c35176646239bfb803 (odoo), we
modified the extraction of attachment in such a way that mails coming in
a journal from aliases with several attachments create several invoices.
Due to the urgency of the task, the computation of whether an attachment
needs auto-extraction or not, has been skipped which failing some tests
that had been silenced. Linked PR #49816 (enterprise) fixes it. However,
as a comment on the said PR suggested, we should add a context key that
disable the auto-extraction.

Objective
---------
Add a context key that disable the auto-extraction and update commit
2bfe69be5c64743d0bf35793a427878170d0b3c6 (enterprise) to use the said
context key.

Solution
---------
1. Remove the override of the `_needs_auto_extract`
2. Manually set the main attachment of the created moves so that
`register_as_main_attachment` is not called when accessing the move.
This removes the auto-extraction without the need to use the key (we
still keep the context key as suggested by the OCR team).

closes odoo/odoo#149525

Related: odoo/enterprise#49816
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2024-01-16 22:39:56 +00:00
Shubham Patel 5b284d4176 [FIX] project: project name is overflowing on the project kanban card
Steps:
- Install project.
- Go to the project.
- Create or edit the project name to excessively long.
- Then go to Kanban view.
- The project name would overflow.

Issue:
-Before this commit, in the project's kanban view, if the project's name was
 excessively long, it would overflow.

Cause:
-When the name is excessively long it would overflow out of the div element.

Fix:
-After this commit the name is now shortened by applying the 'me-5' Bootstrap
 class.

task-3676094

closes odoo/odoo#149007

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-16 20:17:52 +00:00
sesn-odoo 5afc1af40e [FIX] l10n_es_pos: handle missing partner in the ReceiptHeader template
Currently, if you have Spanish POS installed and create a Cash In/Out,
you are met with an error.

Steps to reproduce
------------------
* install `l10n_es_pos`
* start a POS session
* click on the hamburger button in the top-right corner > Cash In/Out
* add any amount and confirm

You should be met with an error.

Fix
---
At first glance, the original condition:
```
partner?.id !== props.data.simplified_partner_id
```

and the revised condition:
```
partner && partner.id !== props.data.simplified_partner_id
```

might seem equivalent. However, they behave differently when `partner`
is `null` or `undefined`.

In the original condition, the optional chaining operator evaluates
to `undefined`, leading to the following `undefined !==
props.data.simplified_partner_id` (which is most likely true).

The revised condition will shorcircuit when `partner` is falsy, ensuring
that the code only executes when `partner` is a truthy object.

opw-3667287

closes odoo/odoo#148688

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2024-01-16 18:00:21 +00:00
Julien Castiaux 6597672736 [REV] base: use of PyOpenSSLContext in mail server
This reverts commit 6c59eea421.

smtplib is expecting the Context of ssl found in the stdlib and the
Context object of the pyOpenSSL lib isn't a drop in replacement. The
various `TLS_METHOD` constants are not the same and the Context object
of pyOpenSSL lack a `wrap_socket`-like method.

opw-3640374

closes odoo/odoo#149566

X-original-commit: 028277129897c7d49942a148a0ac295386cd2d89
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2024-01-16 16:42:06 +00:00
Louis (wil) aa523cf060 [I18N] stock: properly escape apostrophe in FR translation
Fix done directly on Github to not have to wait for the weekly sync.
Already corrected on Transifex.

closes odoo/odoo#149544

X-original-commit: 1a0bee8af2b28987a631c84311227ebd55ec632a
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2024-01-16 16:42:05 +00:00
Odoo's Mergebot 4bf781fcca [FW][IMP] web: update owl to 2.2.9
Update the OWL lib and adapt some tests/helpers.

Release notes:
https://github.com/odoo/owl/releases/tag/v2.2.8
https://github.com/odoo/owl/releases/tag/v2.2.9

These releases contain small improvements
2.2.8:
- [IMP] template set config: getTemplate function
- [IMP] parser: .trim modifier implies .lazy modifier
- [REF] parser, template_set: factor out parseXML function

2.2.9:
- [IMP] reactivity: replace sets with small arrays for performance

closes odoo/odoo#149507

Forward-port-of: odoo/odoo#149379
Forward-port-of: odoo/odoo#149170
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2024-01-16 13:15:22 +00:00
Mathieu Duckerts-Antoine 3abba287f7 [FIX] web: adapt editFavoriteName helper
With the last realease of owl, .trim now implies .lazy. This means that
if t-model.trim is used, the value will be updated in the state only when
the change event is triggered. Here we adapt the helper editFavoriteName
which was supposed to update the state value.

X-original-commit: 7a16b75a35a5bd60190ee5b437b925a2fa99fb70
Part-of: odoo/odoo#149507
2024-01-16 13:15:22 +00:00
Mathieu Duckerts-Antoine 2f934bc91f [IMP] web: update owl to 2.2.9
We update owl to 2.2.9. Our version was 2.2.7.

Release notes:
https://github.com/odoo/owl/releases/tag/v2.2.8
https://github.com/odoo/owl/releases/tag/v2.2.9

These releases contain small improvements
2.2.8:
    - [IMP] template set config: getTemplate function
    - [IMP] parser: .trim modifier implies .lazy modifier
    - [REF] parser, template_set: factor out parseXML function
2.2.9:
    - [IMP] reactivity: replace sets with small arrays for performance

X-original-commit: 91a1f495b260ab23df80d74faeae25a5883deda0
Part-of: odoo/odoo#149507
2024-01-16 13:15:22 +00:00
Florent de Labarre 05be66a416 [FIX] mail: time to unlink record is so long
In large database, the time to unlink a sale.order (or any record with mail.thread) can be take 1 seconde.

After it is so fast.

closes odoo/odoo#149296

X-original-commit: 6bd9f408a18c019416b5bd981de50b54432f5690
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-16 13:15:21 +00:00
Yannick Tivisse f18faee970 [FIX] hr_contract: Improve list view loading time
Hidden message_needaction fields was taking 2.1 over 2.2 seconds on odoo.com
(+- 5000 contracts in running state)

closes odoo/odoo#148581

X-original-commit: de983bdd038e19703f461d5e529455f957ff842a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2024-01-16 13:15:20 +00:00
Adrien Guilliams (adgu) 6cd9185b05 [IMP] pos*: book/release table in pos_restaurant
pos*: point_of_sale, pos_restaurant

The current approach to book/release a table isn't so intuitive,
knowing that when selecting an empty table from the floor plan:
- an empty order is created on that table, displaying it as booked
on the floor plan
- as long as the order remains empty, we display a "Release table"
button in order to delete the related empty order and display
the table as free on the floor plan

Here is the change brought by this commit:
- Change the "Release table" button to "Book table"
- Don't create an empty order on the table until User either:
  - hits "Book table"
  - starts adding products to the cart
- Table can be released by deleting the order
- Deleting the last order on the table, redirects User to the floor
- Control Buttons are not accessible with unbooked tables
plan

closes odoo/odoo#145896

Task-id: 3624323
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-16 13:15:19 +00:00
miad-odoo 2d5d178403 [FIX] web: fix invoice preview
Before this commit, the `report_invoice_wizard_preview` was rendered well in
html and in the preview (settings page) but not when downloading it ; the
"total" table was pushed all the way to the right.

opw-3648586

closes odoo/odoo#149509

X-original-commit: 232c257c1554f2f47b589a971cdf9f98227ef53c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
2024-01-16 11:40:03 +00:00
Pierre Paridans 763511d09d [FIX] iap_mail: enrichment tags illegible in dark mode
In the lead's enrichment, the fields containing tags have an hardcoded
background for some reason... which, in dark mode, makes the tags' label
illegible (as it is a light text on light background).

This commit fixes it by forcing a darker gray when rendered in dark mode
(where the dark mode's bundle is applied, like in the backend).

Steps to reproduce:
- Open CRM
- Create an opportunity using a well-known domain in the email address
  (for example)
- Click "Enrich"
- A card appears in the chatter containing the matching company's
  information
- Switch to dark mode
=> Sectors, Technologies Used... tags keep the light background

opw-3678598

closes odoo/odoo#149409

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2024-01-16 11:40:01 +00:00
Arthur Detroux (ard) 94cae965a4 [FIX] website: properly check if all snippets have their data-snippet
Commit [1] changed the class from .ui-draggable to .o_draggable in the
`snippet_version` test, specifically in the run function that checks
if all snippets have their `[data-snippet]` properly set.

Indeed, `.o_draggable` is set on the parents of draggable elements and
not on the elements which are draggable themselves. This lead to a
`.every` on an empty array which returns `true`, and therefore avoids
the `console.error` but did not properly check the snippets.

This commit changes the selector to all snippets which do not have
a [data-module-id] which should be all snippets that are draggable.

[1]: https://github.com/odoo/odoo/commit/7594d71ca8610d5947e80f325ccb57abc23c2c76

Related to task-3079246

closes odoo/odoo#148824

Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2024-01-16 11:39:59 +00:00
Vivek Pathak 5b42a16a13 [FIX] mass_mailing: prevent mailing stage change in kanban view
Before this commit:
Users could change the mailing stage from the Kanban view, which was
inappropriate since stage changes should occur within the defined workflow.

Reason:
The state field in the Kanban view was not marked as readonly, allowing
unintended stage changes.

After this commit:
Users can no longer modify the mailing stage directly from the Kanban view.
Instead, stage changes should occur through the workflow.

Task-3555209

closes odoo/odoo#140081

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-16 11:39:57 +00:00
William Henrotin 05fcc84734 [FIX] stock: allow multicompany push flow
This commit ensure a multi company flow made of push rules can be
triggered by a stock user having access to the first company only

      manual     push
Stock1 -> interco -> Stock2
(comp1)              (comp2)

Let a user working in company 1 confirming and validating a transfer
from Stock1 to the intercompany location. The push rule (defined in
company 2) will create and confirm the stock move to resupply Stock2

closes odoo/odoo#149492

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2024-01-16 09:55:29 +00:00
Travis Waelbroeck 6ae751e808 [FIX] website_sale: error during shipping address creation
closes #149428

**Impacted versions:** master, 17.0

This appears to have been introduced by
24c8ff9b28 on #139474.

**Steps to reproduce:**

1. Log in as admin user
    * _The error also happens while logged in as portal user, but they
      do not see the traceback._
2. Go to website, add item to cart, and click "Checkout"
3. Under the "shipping' section, click "Add address"
4. Click save and an error is raised (see traceback below and in task
   comments)
    * _The error also occurs if you just leave one required field as
      blank, rather than all fields._

**Current behavior:** If logged in as an internal user, a traceback
error (below) is raised. If logged in as a portal user, a 500 error page
is shown.

```
Traceback (most recent call last):
  File "/opt/odoo/core/odoo/http.py", line 1722, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/core/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo/core/odoo/http.py", line 1749, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/core/odoo/http.py", line 1866, in dispatch
    return self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/core/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/opt/odoo/core/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/core/odoo/http.py", line 722, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/core/addons/website_sale/controllers/main.py", line 1346, in address
    'use_same': is_public_user or ('use_same' in kw and str2bool(kw.get('use_same'))),
  File "/opt/odoo/core/odoo/tools/misc.py", line 468, in str2bool
    raise ValueError('Use 0/1/yes/no/true/false/on/off')
ValueError: Use 0/1/yes/no/true/false/on/off
```

Note: Based on a quick check, the value of `kw.get('use_same')` is
`None`, which causes the `str2bool` check to fail. The value of
`use_same` appears to be set within the `website_sale.address` template,
but it seems that the value should always be `True` or `False`, not
`None`.

**Expected behavior:** The "add address" page is shown with a red
highlight around any required fields that are missing a value.

**Video link:**
https://github.com/odoo/odoo/assets/7907616/4e103c73-417f-4d1a-93e3-8c1d7beeb918

Support ticket number submitted via odoo.com/help: 3,685,876

closes odoo/odoo#149432

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2024-01-16 09:55:28 +00:00
Travis Waelbroeck 0d2adece49 [CLA] Blue Stingray CLA
Part-of: odoo/odoo#149432
2024-01-16 09:55:28 +00:00
Andrea Grazioso (agr-odoo) 048d7e8718 [FIX] point_of_sale: force company of pos order in controller
Have company 1 (main company) and company 2
Activate Website for company 1
Switch to company 2
Setup a POS
In Settings > Point of Sale, activate 'Use QR code on ticket'
Open POS session
Make an order, save qr link from receipt, close session
Open the saved link without being logged in
Complete form and request invoice

Issue:
Error will block the operation
```
Incompatible companies on records:
- '/ (Reversal of POS closing entry POSS/2024/01/0004 for order Shop/0004 from session POS/00002) 16%' belongs to company False and 'Account' (account_id: '209.01.01 VAT carried forward not collected') belongs to another company.
- '/ (Reversal of POS closing entry POSS/2024/01/0004 for order Shop/0004 from session POS/00002) 16%' belongs to company False and 'Originator Tax Distribution Line' (tax_repartition_line_id: 'account.tax.repartition.line,54') belongs to another company.
- '/ (Reversal of POS closing entry POSS/2024/01/0004 for order Shop/0004 from session POS/00002) Acoustic Bloc Screens' belongs to company False and 'Account' (account_id: '401.01.01 Sales and/or services taxed at the general rate') belongs to another company.
- '/ (Reversal of POS closing entry POSS/2024/01/0004 for order Shop/0004 from session POS/00002) Acoustic Bloc Screens' belongs to company False and 'Taxes' (tax_ids: '16% (MX)') belongs to another company.
- '/ (Reversal of POS closing entry POSS/2024/01/0004 for order Shop/0004 from session POS/00002) 105.01.02 105.01.02' belongs to company False and 'Account' (account_id: '105.01.02 National customers (PoS)') belongs to another company.
```
This occurs because when Website is installed, requests from public user
will keep in context the id of the company associated to the website,
company 1 in this case.

opw-3629683

closes odoo/odoo#149410

X-original-commit: 6fce2e5bf34468099a0c62669687847ed36621bf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2024-01-16 09:55:27 +00:00
Ruben Gomes (rugo) 7c05beaa89 [FIX] l10n_*: anglo saxon accounting
The anglo saxon accounting was set in the wrong field.

It should be set in the field 'anglo_saxon_accounting' on the company
and not 'use_anglo_saxon' on the configs.

task-3642826

closes odoo/odoo#149190

X-original-commit: 3160749a173b01e93f91dea72d1dcc5370ea44f7
Signed-off-by: William André (wan) <wan@odoo.com>
2024-01-16 09:55:24 +00:00
Brieuc-brd 0ef9d5b272 [FIX] web, *: adapt oi-close and corner arrow icons
*: mail, pos_sale, pos_self_order, website_sale

=== `oi-close` adaptation ===
Prior to this commit, `oi-close` icon was based on the default
sans-serif font. Depending on this, there could be alignment and size
inconsistencies with the Odoo UI icon library.

This commit adapts `oi-close` to use a custom icon from the UI icon
library to make it more robust and maintain consistency with this
library.

=== corner arrow icons adaptation ===
Prior to this commit, directional icons related to the four corners were
misaligned.

This commit adapts these four icons so that they are properly aligned.

task-3618046

closes odoo/odoo#144598

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-01-16 09:55:22 +00:00
Thomas Josse (thjo) 85a5d76728 [IMP] web_editor: adding dirtyness check when in collab mode
This commit adds a new event listener on the odooEditor which listens for
external history steps (if collab mode is enabled), and changes the state of
the record's dirtyness when a user receives external steps.

This way a user will see that the record has been modified when he is editing
a collaborative html field.

task-3609594

closes odoo/odoo#145928

Related: odoo/enterprise#51579
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
2024-01-16 09:55:20 +00:00
Lucas Lefèvre (lul) 90ccffcc7d [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/cadb8174b [REL] 17.0.7
https://github.com/odoo/o-spreadsheet/commit/548c779ba [FIX] dates: use UTC to represent naive date times Task: 3666703
https://github.com/odoo/o-spreadsheet/commit/49f05a71c [REF] dates: introduce DateTime to wrap Date object Task: 3666703
https://github.com/odoo/o-spreadsheet/commit/9676b76b7 [FIX] date: properly type reference dates Task: 3666703
https://github.com/odoo/o-spreadsheet/commit/653a0900f [FIX] tests: enables type checking for binded functions
https://github.com/odoo/o-spreadsheet/commit/61780b4e4 [FIX] functions: name MID args

closes odoo/odoo#149240

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2024-01-16 08:23:11 +00:00
Kartik Chavda (kcv) 82c962c665 [FIX] web: set max width on filter and groupby menu
Steps:
- Install planning app.
- Open Planning.
- Click on search bar menu.

Issue:
- The groupBy column width is more than expected.

Cause:
- groupBy and filter menu size changes depending on their
groupBys and filters names so giving bigger name to filters
and groupBy increase their size and there was no max-width
set on then and because of setting name and giving bigger
string on field makes that column unexpectly big.

Fix:
- set max-width on `o_filter_menu` and `o_group_by_menu` to
avoid unexpected bigger size for filter and groupby columns.

task-3607270

closes odoo/odoo#140412

Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2024-01-16 08:23:10 +00:00
william-andre 6b70028eac [FIX] stock_account: performance of unlinking account_move_line
The index is needed to be able to unlink/delete lines because of the
check of foreign keys.

closes odoo/odoo#149417

Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2024-01-15 19:58:57 +00:00
Pierre-Yves Dufays d10d0ca242 [FIX] portal_rating: fix invisible rating modal title
How to reproduce:
1. Go to website slides.
2. Open any course.
3. Add review or Edit the review.

The title of the modal should be visible but it is not because the text has the
same color as the background (white).

Technical note: the modal is defined in a dark zone where the text color is
white. The modal title uses the h5 tags that automatically inherit its color
from its parent, so the title is white as well. To solve the problem we add the
class "bg-white" on the modal-content div to indicate that the background of
the modal is white so that the color of the h5 has a good contrast on a white
background (here black). We also removed the CSS rule for
"o_rating_popup_composer_label" as it was not being applied.

Task-3640496

closes odoo/odoo#149405

X-original-commit: 0f158f4c3b51a4caa20dda337d13e905c99540fd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-15 16:07:53 +00:00
Anita (anko) 60fba16f87 [FIX] payment_adyen: ignore missing street numbers
Commit ceb8b78 introduced a mechanism to throw an error if some address
fields were empty. The mechanism was introduced to prevent us from
sending False as an address detail to Adyen when it was not set since it
might negatively affect the fraud check score.
It however caused some payments not to go through because it relied on
Odoo's utils to extract the house number from the address, which would
fail in some circumstances (e.g., when the number is placed before the
street name). In some other cases, empty address details that were
previously accepted by Adyen caused the error to be thrown.
With this commit, we now pass Unknown instead of False or empty string
for the address details that are not set and that are not required by
Adyen in practice, unlike what is stated in AVS documentation. This
delegates the responsibility to block the payment to Adyen as the address
check and the related error are removed from Odoo.

closes odoo/odoo#149365

X-original-commit: 771b7ebd55646d8c96938e562802b47cb92d18fb
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: anko-odoo <anko@odoo.com>
2024-01-15 16:07:51 +00:00
Rémi Rahir (rar) 3d55b04ff8 [FIX] spreadsheet: Empty value in date filter should bypass filter
A date filter with an empty value would still create a domain filtered
on the current year instead of being bypassed.

closes odoo/odoo#148984

Task: 3668916
X-original-commit: 763f88e2d45cb7ba107db135eecd0365ba2b8c8b
Related: odoo/enterprise#54095
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2024-01-15 16:07:48 +00:00
shiyam kumar ec75467cae [FIX] project: prevent editing status field in kanban view
Step:
- Navigate to the project module.
- Select any project.
- Click the status button on the Kanban view's top left.
- This action redirects to the project update Kanban view.
- Notice that the status field is unexpectedly editable.

Issue:
- In the project module, accessing the project update Kanban view allows
unintended editing of the status field.

Cause:
- Due to the new modifications made in the kanban view where the user is allowed
to perform selection from the view itself, the status field also resonates the
similar behavior.

Fix:
- By adding the 'read-only' attribute in the Kanban view specifically for the
status field, we can restrict the unintended modifications to this field.
This implementation ensures that users cannot edit the status field directly
from the Kanban view.

Task-3610481

closes odoo/odoo#144336

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-01-15 16:07:44 +00:00
François Honoré 8f7985a6e8 [FIX] point_of_sale: account.tax write permission.
When a user try to import (to edit) some account.tax, some verification are done on pos.order.line.
The search is done in sudo but the read is executed with the current logged user.
So pos.order.line from others companies are check with a user who don't have access to these companies.
And the AccessError exception is triggered.
This PR aims to fix the permission issue by adding a sudo() for the read on pos.order.line

closes odoo/odoo#149288

X-original-commit: 1c22f6bd36ffcade3d84d0f76bbb3b9d1dc8c4c1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-15 14:48:40 +00:00
Gabriel de Paula Felix (gdpf) 03d7ce049a [FIX] microsoft_calendar: recurrent event deletion from list view
Before this commit, deleting recurrent events from Odoo in list view mode was allowed with the synchronization active, which could trigger to spamming emails on Microsoft side. Additionaly, deleting events with the synchronization off was also deleting events on Microsoft, which should not happen.

After this commit, the deletion of recurrent events is not allowed anymore when the synchronization is active by triggering an UserError message. Also, when the synchronization is off, deleting events in Odoo don't also delete events on Microsoft side.

closes odoo/odoo#149278

Task-id: 3563501
X-original-commit: a932aee25b2ae5f6a3c0e50154c5db6ba6ea06bf
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2024-01-15 11:11:28 +00:00
vava-odoo aa2fa69065 [FIX] base_import_module: import module in sudo to bypass ACLs
closes odoo/odoo#149243

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-01-15 11:11:27 +00:00
Loukas Wets (lowe) 7692edf4e8 [FIX] l10n_in_pos: demo data post installation
To reproduce:
- Install POS with demo data
- Install Indian localization(l10n_in)
- Open POS terminal
- Click on the load demo data
- Traceback thrown

Fix:
The issue occurs when the demo data executes the closing of the sessions.
The l10n_in _post method checks for a company state that is not yet set
at that point. It is important to note that this issue only arises
when loading demo data on a DB that doesn't contain demo data. The solution
is to extract the part of the method that executes the demo data linked to
the main config and to override it to not perform that part in the l10n_in_pos.

closes odoo/odoo#149011

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-15 11:11:25 +00:00
roen-odoo 179475a54e [FIX] point_of_sale,pos_sale: correctly set analytic_distribution
Current behavior:
When you create a sale order with an analytic account, and settle it in
the POS, the analytic account is not set on the POS order invoice lines.

Steps to reproduce:
- Create a sale order with an analytic account (in other info tab)
- Confirm the sale order
- Go to the POS and settle the order
- Pay and invoice the order
- Go to the invoice and check the analytic account on the invoice lines

Note:
I based my fix on what was already done in the sale_order creation to
set the analytic distribution correctly on the invoice lines.

opw-3635140

closes odoo/odoo#147737

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-15 11:11:24 +00:00
Iván Todorovich 9eaecfa062 [FIX] base: skip pdf rendering tests if pdfminer is not installed
The unit tests introduced in 4820be3c only work if pdfminer is installed.
As it's an optional dependency, it may not be installed in some environments.

This commit skips the tests if pdfminer is not installed.

See also: 6fa4dbf2

closes odoo/odoo#147720

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2024-01-15 11:11:23 +00:00
William Henrotin 875e15e1aa [FIX] mrp_subcontracting_purchase: verify ressuply + mto flow
This commit adds a test on the following flow:
A subcontracted product has its component having the three route
 - ressuply on order
 - buy
 - MTO

Receiving the subcontracted product will create a delivery for the
component to the subcontractor, then a purchase order to buy it.
Confirming this very PO should create a receipt stock move linked to
this delivery.

closes odoo/odoo#147344

X-original-commit: 0044fd8bb6966011bd3943bff0bd58bcd111338f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-01-15 11:11:23 +00:00