Wednesday, May 14, 2025
35 changes · saas-18.3
Enhancements to existing features
The bank reconciliation search dialog now uses the expected ordering, matching the previous experience from the earlier version. Reference text sizing was also adjusted so longer references display more cleanly and are easier to read.
Original PR description
Adding the right context key to change the order like it was in the old bank rec widget of 18.2. Also correcting a css issues where the ref where too big no task id
Resolved issues and error corrections
The HTML editor now prevents users from applying a link when the URL is blank, avoiding an error that could interrupt editing. If a user clears both the link text and URL and clicks away, the empty link is removed cleanly instead.
Original PR description
**Current behavior before PR:** - Removing the label and url from the link popover and attempting to save the link would trigger a traceback. **Desired behavior after PR is merged:** - The Apply button is disabled when the URL field is empty. - Pressing Enter no longer creates or saves a link if the url is missing. - Clicking outside the popover after clearing the label and url will now remove the link. task: 4766687
Miscellaneous changes
the code that tried to print would do some preparation (render a full component node, load related images) witout checking if there even was a device to print the ticket. The preparation steps (specifically loading images), could be a source of indeteriminism when running test tours since we don't await properly the printing step (see https://github.com/odoo/odoo/pull/201578/files#diff-10ebe5a60b7906fdb3a686b58676079783540b2c91b3423faadc27a0267ba393R33) the revision cuts short the pri
Original PR description
the code that tried to print would do some preparation (render a full component node, load related images) witout checking if there even was a device to print the ticket. The preparation steps (specifically loading images), could be a source of indeteriminism when running test tours since we don't await properly the printing step (see https://github.com/odoo/odoo/pull/201578/files#diff-10ebe5a60b7906fdb3a686b58676079783540b2c91b3423faadc27a0267ba393R33) the revision cuts short the printing when there is no printing device and therefore avoids the tests issues. runbot errors: https://runbot.odoo.com/odoo/error/181566 https://runbot.odoo.com/odoo/error/160941 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209274
The self-order kiosk test now uses a dedicated product category so it can reliably find the expected translated button label. This prevents false test failures in French and helps keep the point-of-sale self-order flow stable.
Original PR description
Since https://github.com/odoo/odoo/commit/c2191816fc781bfae350039c4259f1af8a4c3619, the terme "Uncategorised" has been translated in french. In the tour, it was not taken into account so the test was failing as it was not finding the correct button. runbot-error: 198563 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where opening or loading a message without content could cause the mail system to crash. Users should now be able to access affected conversations reliably, even when a message body is missing.
Original PR description
Following odoo/odoo@eaffe784d90a, ensure we don't crash when loading message where body is `False`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix makes automated checks for the HTML editor more reliable by removing browser-version differences in text sizing. It helps ensure list and paragraph spacing stays consistent when the editor is validated in Chrome.
Original PR description
Problem: The test is failing due to inconsistent `font-size` rendering across different Chrome versions, which affects `padding-inline-start`. Solution: Explicitly set `font-size` and `font-family` to ensure consistent `padding-inline-start` calculation across Chrome versions. runbot-xxxxx --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects an automated test for the HTML editor color selector so it works consistently across Odoo editions. It helps keep release checks reliable without changing what users see or how the editor behaves.
Original PR description
After merging the commit [1], the unit test fails in community version. This happens because the value of selected text color is `--body-color`, which is different in community then the enterprise. This PR aims to fix the test case. [1]: https://github.com/odoo/odoo/commit/1c60ca5052c91c4b9a163f843c50de443ebbc78a --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now view question options from the survey navigation menu without encountering an error. This improves reliability for live and custom surveys by making the same question details accessible from all expected entry points.
Original PR description
The issue concerns surveys with a live session available ('live_session' and 'custom' types).
When you want to consult the options of a question:
- if you do it from the survey's form view, no problem
- if you do it from the navbar's 'Questions and Answers' menu, you'll get an EvalError indicating that the name 'parent' is not defined.
'parent' here refers to a survey container record and works only inside sub-views of relational fields.
To fix it, we replace calls to 'parent.field' by related fields.
task-4592388This update corrects how Point of Sale upgrade data is sent to the database during cleanup. It helps ensure the upgrade process handles duplicate identifiers reliably and avoids database interpretation errors.
Original PR description
To send a list to PostgreSQL, it should be a tuple, or postgreSQL will cast a Python list in a PostgreSQL ARRAY. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Creating a new manufacturing operation from the configuration screen no longer fails when capacity is missing or set to zero. This prevents an error page and lets users continue setting up manufacturing workflows normally.
Original PR description
A divide-by-zero error occurs when creating a new manufacturing operation from the configuration due to zero capacity being used in the operation cycle calculation. **Steps to reproduce:** * Install mrp with demo data * Go to `mrp>configurations>Operations>New` `ZeroDivisionError: float division by zero` **Solution:** * Setting the capacity value to be one if it is zero, fixes the following issue. **Sentry-6600762870** --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Before this commit, when posting a message containing only files, the message list shows the new message with "this message has been removed" for a very short time. This happens because the pending message was considered empty, due to lack of attachments in pending message. The pending message is the optimistical behaviour of showing the message that is being posted immediately on UI before receiving response data from server. This commit fixes the issue by showing attachments of just sen
Original PR description
Before this commit, when posting a message containing only files, the message list shows the new message with "this message has been removed" for a very short time. This happens because the pending message was considered empty, due to lack of attachments in pending message. The pending message is the optimistical behaviour of showing the message that is being posted immediately on UI before receiving response data from server. This commit fixes the issue by showing attachments of just sent message in the pending preview. Task-4776054 Posting a message with Avatar.jpg: Before / After   Forward-Port-Of: odoo/odoo#209715
Steps to reproduce: ------------------------ - Install POS & setup kitchen printer. - Open session and make an order with instant creation mode attribute product. - Cancel the order. Issue: ------- - In the cancel KOT the attribute name wasn't visible. Cause: --------- - Wrong value passed for display name just simple name was passed instead of display name containing the attribute. FIX: ------ - Corrected the value passed for the display name. Task: 4720599 Forward-Port-O
Original PR description
Steps to reproduce: ------------------------ - Install POS & setup kitchen printer. - Open session and make an order with instant creation mode attribute product. - Cancel the order. Issue: ------- - In the cancel KOT the attribute name wasn't visible. Cause: --------- - Wrong value passed for display name just simple name was passed instead of display name containing the attribute. FIX: ------ - Corrected the value passed for the display name. Task: 4720599 Forward-Port-Of: odoo/odoo#209575 Forward-Port-Of: odoo/odoo#207167
Description ------------ This patch optimizes domains to generate more efficient queries by: - Simplifying useless sub-queries of the form `fkey in (select id from comodel where id = X)` to `fkey in (X)` where it makes sense (in `sudo` context) - Adding supporting indexes Reference --------- task-4744275 Enterprise PR: https://github.com/odoo/enterprise/pull/83916 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#
Original PR description
Description ------------ This patch optimizes domains to generate more efficient queries by: - Simplifying useless sub-queries of the form `fkey in (select id from comodel where id = X)` to `fkey in (X)` where it makes sense (in `sudo` context) - Adding supporting indexes Reference --------- task-4744275 Enterprise PR: https://github.com/odoo/enterprise/pull/83916 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207015
With Jordan Company setup: - Set dummy values on the Jordan electronic invoicing settings - Enable USD, set a rate and currency precision to 5 - Set the Product Price decimal accuracy to 5 - Make an invoice in USD adding a line as follows: - Price 0.13793 - Qty 9 - Discount 100% - Tax: 16% - Confirm - Send & Print, activate e-invoice (JoFotara (Jordan EDI)) Issue will raise: ``` odoo.addons.base.models.ir_qweb.QWebException: Error while render the template Template: accou
Original PR description
With Jordan Company setup: - Set dummy values on the Jordan electronic invoicing settings - Enable USD, set a rate and currency precision to 5 - Set the Product Price decimal accuracy to 5 - Make an…
With Jordan Company setup: - Set dummy values on the Jordan electronic invoicing settings - Enable USD, set a rate and currency precision to 5 - Set the Product Price decimal accuracy to 5 - Make an invoice in USD adding a line as follows: - Price 0.13793 - Qty 9 - Discount 100% - Tax: 16% - Confirm - Send & Print, activate e-invoice (JoFotara (Jordan EDI)) Issue will raise: ``` odoo.addons.base.models.ir_qweb.QWebException: Error while render the template Template: account_edi_ubl_cii.ubl_20_MonetaryTotalType Path: /t/t/cbc:TaxInclusiveAmount Node: <ns0:TaxInclusiveAmount xmlns:ns0="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" t-att-currencyID="vals[\'currency\'].name" t-out="format_float(vals.get(\'tax_inclusive_amount\'), vals.get(\'currency_dp\'))"/> ``` This occurs because on high currency precision we may work with numbers that are represented in scientific notation (-2e-09) that when converted to string may keep the literal form unless using a specific format opw-4739342 Forward-Port-Of: odoo/odoo#209624
In the case where the name of the related partner is changed, the bank account holder name will not reflect the changes, we add here a dependency on partner_id.name Forward-Port-Of: odoo/odoo#209436
Original PR description
In the case where the name of the related partner is changed, the bank account holder name will not reflect the changes, we add here a dependency on partner_id.name Forward-Port-Of: odoo/odoo#209436
**Purpose:** - The label `File Content (base64)` is still visible even if the attachment type is URL. **Specifications:** - Hide label `File Content (base64)` when attachment type is URL. task-4778138 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209210
Original PR description
**Purpose:** - The label `File Content (base64)` is still visible even if the attachment type is URL. **Specifications:** - Hide label `File Content (base64)` when attachment type is URL. task-4778138 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209210
Currently Chromium generates a lot of temporary files like .org.chromium.Chromium.0ouinx in /tmp directory This leads to the kiosk using IoT Boxes being non responsive and eventually having issues/crashing This PR increases the size of /tmp directory following the recommendation of it being half the size of the ram (which is 2GB for our rpi 4) We also increase /etc directory size to allow more cups storage where it it used Recommendation link: https://docs.aws.amazon.com/linux/al2023
Original PR description
Currently Chromium generates a lot of temporary files like .org.chromium.Chromium.0ouinx in /tmp directory This leads to the kiosk using IoT Boxes being non responsive and eventually having issues/crashing This PR increases the size of /tmp directory following the recommendation of it being half the size of the ram (which is 2GB for our rpi 4) We also increase /etc directory size to allow more cups storage where it it used Recommendation link: https://docs.aws.amazon.com/linux/al2023/ug/filesystem-slash-tmp.html Forward-Port-Of: odoo/odoo#209680
Versions -------- - 16.0+ Steps ----- 1. Have multiple companies; 2. create an eWallet program available to all companies; 3. set its email template to "Gift Card: Gift Card Information"; 4. create & confirm an order containing the "Top-up eWallet" product; 5. switch to a different company; 6. create an new order for the same client. Issue ----- Access Error Cause ----- Commit eaa6f6c5a415f added the `_get_mail_author` method to ensure gift card emails always have an author
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Have multiple companies; 2. create an eWallet program available to all companies; 3. set its email template to "Gift Card: Gift Card Information"; 4. create &…
Versions -------- - 16.0+ Steps ----- 1. Have multiple companies; 2. create an eWallet program available to all companies; 3. set its email template to "Gift Card: Gift Card Information"; 4. create & confirm an order containing the "Top-up eWallet" product; 5. switch to a different company; 6. create an new order for the same client. Issue ----- Access Error Cause ----- Commit eaa6f6c5a415f added the `_get_mail_author` method to ensure gift card emails always have an author. When using the gift card template for eWallets, this can cause an issue for 2 reasons: 1. When creating an eWallet via the top-up product, its `order_id` is the order that created the eWallet. This order may belong to a different company than the one it is getting used for. 2. The `send_reward_coupon_mail` method fetches its coupons by calling `_get_reward_coupons` on the order. This returns any applied eWallets, therefore calling `_send_creation_communication` whenever the eWallet gets used. The reason it returns applied eWallets as a "reward coupon" is because `_update_programs_and_rewards` creates `sale.order.coupon.points` records with 0 points when applying a `loyalty.card`, which then get assumed to be a reward, despite not granting any points: https://github.com/odoo/odoo/blob/9e22dbb7b6fb581d2f11bf0ec48b230047686050/addons/sale_loyalty/models/sale_order.py#L499-L504 Solution -------- 1. In the `_get_mail_author` yield to `super` if the order's company isn't in `self.env.companies`. 2. In the `_get_points_programs` and `_get_reward_coupons` methods, filter out `coupon_point_ids` that don't grant any points. (Alternatively, we could avoid creating `sale.order.coupon.points` records with 0 points, but this might be risky for stable.) opw-4731588 Forward-Port-Of: odoo/odoo#209515 Forward-Port-Of: odoo/odoo#208637
Versions -------- - saas-17.4+ Steps ----- 1. Create a Azure storage container with a hyphen in its name; 2. connect it to your database; 3. go to a contact; 4. click "Send message"; 5. upload an attachment. Issue ----- Server Error pop-up. In the logger, you get: > `TypeError: UserError.__init__() takes 2 positional arguments but 3 were given` Cause ----- 1. The `ValidationError` string is badly formatted. 2. The regex to verify Azure Blob Storage URLs doesn't allow hy
Original PR description
Versions -------- - saas-17.4+ Steps ----- 1. Create a Azure storage container with a hyphen in its name; 2. connect it to your database; 3. go to a contact; 4. click "Send message"; 5. upload an attachment. Issue ----- Server Error pop-up. In the logger, you get: > `TypeError: UserError.__init__() takes 2 positional arguments but 3 were given` Cause ----- 1. The `ValidationError` string is badly formatted. 2. The regex to verify Azure Blob Storage URLs doesn't allow hyphens in the container name. Solution -------- 1. As the `ValidationError` is only shown in the logger, format it as an f-string. 2. Update the regex to the constraints imposed by Azure[^1]. [^1]: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage opw-4770160 Forward-Port-Of: odoo/odoo#209677 Forward-Port-Of: odoo/odoo#209127
### Steps to reproduce: - Install "l10n_din5008" - In Settings > Layout, select DIN5008 as the report and change the two possible colors - Create a quotation, print it - The address is colored ### Cause This [commit](https://github.com/odoo/odoo/commit/92e4c3cb3bec0b3d5537a50fd441a22fa6509ed1) reduced the size of the address by replacing `div` with `span` which is applied `font-size: 0.8em;`. But also `color: $o-default-report-secondary-color;` ([see](https://github.com/odoo/odoo/blob/
Original PR description
### Steps to reproduce: - Install "l10n_din5008" - In Settings > Layout, select DIN5008 as the report and change the two possible colors - Create a quotation, print it - The address is colored ###…
### Steps to reproduce: - Install "l10n_din5008" - In Settings > Layout, select DIN5008 as the report and change the two possible colors - Create a quotation, print it - The address is colored ### Cause This [commit](https://github.com/odoo/odoo/commit/92e4c3cb3bec0b3d5537a50fd441a22fa6509ed1) reduced the size of the address by replacing `div` with `span` which is applied `font-size: 0.8em;`. But also `color: $o-default-report-secondary-color;` ([see](https://github.com/odoo/odoo/blob/d3e43681fd2b989ae7272731662cc3ac6a6d913b/addons/l10n_din5008/static/src/scss/report_din5008.scss#L47-L50)). ### Solution Don't use `span` in the CSS to select the text. Instead we create a new class `colored_address` to apply the color and apply the same font size on the entire address block. This way the addresses will always have the same font size and the color should only be applied where we want it to. Before:  After:  Ticket [link](https://www.odoo.com/odoo/project/967/tasks/4725169) opw-4725169 Forward-Port-Of: odoo/odoo#209020
This commit adds an `await animationFrame()` in a reference field test. This makes the first assertion relevant, as it wasn't before (the view could never be there instantly). It also makes the test more robust as it could sometimes fail for the second assertions (race condition), see https://runbot.odoo.com/runbot/build/80157085 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the
Original PR description
This commit adds an `await animationFrame()` in a reference field test. This makes the first assertion relevant, as it wasn't before (the view could never be there instantly). It also makes the test more robust as it could sometimes fail for the second assertions (race condition), see https://runbot.odoo.com/runbot/build/80157085 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209474
Steps to reproduce: - Enable "Units of Measure" in Inventory settings - Create a repair order - Select a product - Change its UoM Problem: A traceback is triggered: ``` Uncaught Promise > Can not evaluate python expression: ([('id', 'in', allowed_uom_ids)]) Error: Name 'allowed_uom_ids' is not defined Occured on localhost:8076 on 2025-05-07 20:02:29 GMT EvalError: Can not evaluate python expression: ([('id', 'in', allowed_uom_ids)]) Error: Name 'allowed_uom_ids' is not
Original PR description
Steps to reproduce:
- Enable "Units of Measure" in Inventory settings
- Create a repair order
- Select a product
- Change its UoM
Problem:
A traceback is triggered:
```
Uncaught Promise > Can not evaluate python expression:
([('id', 'in', allowed_uom_ids)]) Error: Name 'allowed_uom_ids' is not defined
Occured on localhost:8076 on 2025-05-07 20:02:29 GMT
EvalError: Can not evaluate python expression: ([('id', 'in', allowed_uom_ids)])
Error: Name 'allowed_uom_ids' is not defined
```
The problem is that the field is "readonly=False" in the view, but by
default it's "readonly=True" in Python side.
As a result, the ORM considers the field as read-only and does not
trigger the computation of "allowed_uom_id". When the domain is later
applied in Python, it causes a traceback due to the missing computed
value.
Solution:
Explicitly set readonly=False in the Python field definition.
opw-4773270
Forward-Port-Of: odoo/odoo#208937We don't need to create values when the uuid is NULL. Otherwise we get a long running upgrade for no reason. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209647
Original PR description
We don't need to create values when the uuid is NULL. Otherwise we get a long running upgrade for no reason. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209647
The live chat uses a shadow DOM to preserve its styles. However, shopify hides empty block. Since the live chat root only contains the shadow DOM, it is considered empty which leads to the chat bubble not being displayed. This commit fixes the issue by explicitly setting the "display" style on the live chat root. opw-4768389 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CL
Original PR description
The live chat uses a shadow DOM to preserve its styles. However, shopify hides empty block. Since the live chat root only contains the shadow DOM, it is considered empty which leads to the chat bubble not being displayed. This commit fixes the issue by explicitly setting the "display" style on the live chat root. opw-4768389 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209592
Similar to: https://github.com/odoo/odoo/pull/184830 We've recently introduced a new operator: “is within” in the domain selector, which can be used to find out whether a date is within a dynamic range (e.g. within a month, within 4 days, within 3 weeks, etc.). To works, this domain needs dynamic elements, such as `context_today`, which is defined in `py_builtin.js` and dynamically retrieves the current date. https://github.com/odoo/odoo/blob/2fed354787b6190ee8bca91dc49746fcd0631dd8/a
Original PR description
Similar to: https://github.com/odoo/odoo/pull/184830 We've recently introduced a new operator: “is within” in the domain selector, which can be used to find out whether a date is within a dynamic…
Similar to: https://github.com/odoo/odoo/pull/184830
We've recently introduced a new operator: “is within” in the domain
selector, which can be used to find out whether a date is within a
dynamic range (e.g. within a month, within 4 days, within 3 weeks, etc.).
To works, this domain needs dynamic elements, such as `context_today`,
which is defined in `py_builtin.js` and dynamically retrieves the
current date.
https://github.com/odoo/odoo/blob/2fed354787b6190ee8bca91dc49746fcd0631dd8/addons/web/static/src/core/py_js/py_builtin.js#L77-L79
However, the problem isn't limited to this operator in the selector
domain, as it's only been available since 18.0, and this pr target is
17.0.s
In fact, it is possible in certain cases to use these fields via debug
mode, and there are several cases where `uid`, `user`, etc. are used.
There is therefore an inconsistency where users see the use of these
variables in these cases and when they try to use them elsewhere with,
for example, a field of this style:
`("date", "=", context_today())`, they get a traceback.
This happens mainly because, in Python, the domain is evaluated via
`literal_eval`, and since it contains variables that are designed for
the web, it causes a traceback because this function expects to receive
only a correctly formatted string, with no context and no variables.
This commit handles:
- website/model_page.py:
-
https://github.com/odoo/odoo/blob/2fed354787b6190ee8bca91dc49746fcd0631dd8/addons/website/controllers/model_page.py#L13-L18
https://github.com/odoo/odoo/blob/2fed354787b6190ee8bca91dc49746fcd0631dd8/addons/website/controllers/model_page.py#L47-L57
The enterprise commit (https://github.com/odoo/enterprise/pull/82564)
handles two other cases:
- web_studio/approval:
Here in this case there are several calls to literal_eval on domains
received from the web, notably to create and check its approval spec.
a function has been used to avoid rewriting the same thing several times
in the file.2
- marketing_automation/activity:
Here too, several calls are made to this file, as in the case of
approval, a function has been created to replace all calls to
`literal_eval`
In all three cases, the problem is the same: the problem is not only
present in `is_within` but in the fact that python has no way of
understanding the domain received from the web, so the same fix has been
applied everywhere:
- First, `to_utc()` is removed from the domain, since it's purely
client-side and this notion doesn't exist in et la the python server
- We replace the `literal_eval` call with `safe_eval`, which will do
more than just transform a string containing only a literal value of
type X into type X (e.g. tuple, string, number, array, etc.)
- `safe_eval` can therefore either evaluate expressions or execute
statements. In our case, what we really want is to evaluate just a
string like literal_eval with just one more context, and to be able to
define local or global values, such as defining `context_today()`
- For the moment, the values we use are the same as those used by
`is_within`, i.e.:
-- context_today()
-- relative_delta()
-- datetime
opw-4551335
opw-4672902
opw-4678894
opw-4669315
opw-4577091
Forward-Port-Of: odoo/odoo#207601
Forward-Port-Of: odoo/odoo#204172Steps to reproduce: - Open a list view in which integer field having default value as false like ID field which has enable_formatting option as False. - Create a record Issue: - False is shown inside in integer field before saving. Reason: - When enable_formatting is False the value is returned and no checks are done. Fix: - A basic check to make sure we are sending out a number not a boolean. task-4700791 Forward-Port-Of: odoo/odoo#208262
Original PR description
Steps to reproduce: - Open a list view in which integer field having default value as false like ID field which has enable_formatting option as False. - Create a record Issue: - False is shown inside in integer field before saving. Reason: - When enable_formatting is False the value is returned and no checks are done. Fix: - A basic check to make sure we are sending out a number not a boolean. task-4700791 Forward-Port-Of: odoo/odoo#208262
There were some errors in the tests because we asserted Chat windows were present without waiting for them (except for the one tick). This produced indeterminism which are now fixed runbot-error-162715 runbot-error-163000 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209614
Original PR description
There were some errors in the tests because we asserted Chat windows were present without waiting for them (except for the one tick). This produced indeterminism which are now fixed runbot-error-162715 runbot-error-163000 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209614
Before this commit, for the layouts "Wavy" and "Bubble", when they're applied when printing Draft Invoices, the grey box (with id=informations) has no data and appears as a weird gray line. This commit hides this grey box by adding to it an outer `t-if` condition. task-4670747 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209514
Original PR description
Before this commit, for the layouts "Wavy" and "Bubble", when they're applied when printing Draft Invoices, the grey box (with id=informations) has no data and appears as a weird gray line. This commit hides this grey box by adding to it an outer `t-if` condition. task-4670747 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209514
Description ------------ For non-admin users, loading the default kanban view of the Appointment application triggers the compute method `_compute_appointment_counts`. This is quite slow as it calls an override of `_read_group`, which adds an elaborate domain for privacy in `_get_default_privacy_domain`. This patch optimizes domains to generate more efficient queries by: - Simplifying useless sub-queries of the form `fkey in (select id from comodel where id = X)` to `fkey in (X)` where
Original PR description
Description ------------ For non-admin users, loading the default kanban view of the Appointment application triggers the compute method `_compute_appointment_counts`. This is quite slow as it calls an override of `_read_group`, which adds an elaborate domain for privacy in `_get_default_privacy_domain`. This patch optimizes domains to generate more efficient queries by: - Simplifying useless sub-queries of the form `fkey in (select id from comodel where id = X)` to `fkey in (X)` where it makes sense (in `sudo` context) - Adding supporting indexes Benchmark ---------- On odoo.com, the time for a regular user to open the default kanban view of appointments is: | Before (hot) | After (hot) | Speedup | |--------------|-------------|---------| | 11s | 1.2s | 9.2x | Reference --------- task-4744275 Community PR: https://github.com/odoo/odoo/pull/207015 Forward-Port-Of: odoo/enterprise#83916
Before this commit, the test_automatic_invoice_token test would fail with the following traceback: FAIL: TestSubscriptionController.test_automatic_invoice_token Traceback (most recent call last): File "/data/build/enterprise/sale_subscription/tests/test_subscription_controller.py", line 157, in test_automatic_invoice_token subscription = self._portal_payment_controller_flow() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/build/enterprise/s
Original PR description
Before this commit, the test_automatic_invoice_token test would fail with the following traceback: FAIL: TestSubscriptionController.test_automatic_invoice_token Traceback (most recent call last):…
Before this commit, the test_automatic_invoice_token test would fail
with the following traceback:
FAIL: TestSubscriptionController.test_automatic_invoice_token
Traceback (most recent call last):
File "/data/build/enterprise/sale_subscription/tests/test_subscription_controller.py", line 157, in test_automatic_invoice_token
subscription = self._portal_payment_controller_flow()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/build/enterprise/sale_subscription/tests/test_subscription_controller.py", line 235, in _portal_payment_controller_flow
self.assertEqual(subscription.invoice_ids.sorted('id').mapped('state'), ['posted'])
AssertionError: Lists differ: ['posted', 'posted'] != ['posted']
First list contains 1 additional elements.
First extra element 1:
'posted'
- ['posted', 'posted']
+ ['posted']
The issue was detected when the test was running on the last day of the
month.
When we were not on the last day of the month, in the controller /my/subscriptions/<int:order_id>/transaction
invoice_to_pay was None because there was only once invoice already paid.
As a result, amount_to_invoice was 0.0 in this code:
amount_to_invoice = invoice_to_pay.amount_total if invoice_to_pay else order_sudo.amount_to_invoice
a tx with an amount equal to 0 would be created in the controller and
in payment_transaction.py, during the postprocess, a "partially paid tx" would be found as the amount would not match (2.3 and 0.0).
We prefer to fix the test by making sure an amount is set in the parameters of the controller. It will make the flow more coherent and realistic.
\# Explanation
When /my/subscriptions/<int:order_id>/transaction was called the second
time in the test, no amount kwarg was provided. As a result the
following line would be called in the controller:
amount_to_invoice = invoice_to_pay.amount_total if invoice_to_pay else order_sudo.amount_to_invoice
invoice_to_pay is always None and therefore the amount_to_invoice is
equal to order_sudo.amount_to_invoice
When we look,at _compute_amount_to_invoice, we have:
is_invoice_due = (
not order.last_invoice_date
or (order.next_invoice_date <= today and order.last_invoice_date <= today)
)
if not is_invoice_due:
line.amount_to_invoice = 0.0
continue
We will compare when the code run on the 30th of march or on the 31th of
march.
\## 30th of March
next invoice date is 2025-04-30
start date is 2025-03-30
last_invoice_date is 2025-03-30
next_invoice_date <= today is False
last_invoice_date <= today is True
is_invoice_due = (
not order.last_invoice_date
or (order.next_invoice_date <= today and order.last_invoice_date <= today)
)
Therefore is_invoice_due is False and we enter the condition and set the amount_to_invoice equal to 0.0
\## 31th of March
next invoice date is 2025-04-30
start date is 2025-03-31
last_invoice_date is False
next_invoice_date <= today is False (same)
last_invoice_date <= today is False because last_invoice_date is not set
Therefore, is_invoice_due is True and we set amount_to_invoice to the recurring total of the SO.
The issue is occuring because next invoice date is 2025-04-30 in both situations !
2025-03-30 + relativedelta(months=1) is equal to 2025-03-31 + relativedelta(months=1)
In the definition of last_invoice_date, we compare the next invoice date - billing_period to today:
last_date = order.next_invoice_date and order.plan_id.billing_period and order.next_invoice_date - order.plan_id.billing_period
\# When we start the 30th of March:
\# last_date = 30th of april - 1 month = 30th of march
\# When we start the 31th of March:
\# last_date keep the same value because the next_invoice_date is the
same.
start_date = order.start_date or fields.Date.today()
if order.state == 'sale' and last_date and last_date >= start_date:
order.last_invoice_date = last_date <-- 30th of March >= 30th of March (today when we start on the 30th
else:
order.last_invoice_date = False <-- 30th of March is not larger than 31th of March (today when we start on the 31th)
runbot error: 162144
Forward-Port-Of: odoo/enterprise#84542Fixed the following issues in the SLSP reports: - When filters "Including Partners Without TIN" and "Including Importations" are updated, the lines are not refreshed - When the filters above are updated, the name of the current active filters are not refreshed - When "Including Partners Without TIN" is enabled, the grand total does not consider lines from those partners - When exported, amounts from the previous row are carried forward to the current row, if the current row has no
Original PR description
Fixed the following issues in the SLSP reports: - When filters "Including Partners Without TIN" and "Including Importations" are updated, the lines are not refreshed - When the filters above are updated, the name of the current active filters are not refreshed - When "Including Partners Without TIN" is enabled, the grand total does not consider lines from those partners - When exported, amounts from the previous row are carried forward to the current row, if the current row has no value for that amount 4748216 Forward-Port-Of: odoo/enterprise#85336 Forward-Port-Of: odoo/enterprise#85249
**issue:** When a task with an allocated time > 0.0 but no timesheets is created in a shared project (with edit rights), the portal user incorrectly sees 0.0 as the allocated time. **Steps to reproduce:** - Ensure the sale_timesheet module is installed. - Create a new project. - Create a task with allocated time and no timesheets. - Share the project with a portal user (edit permission). In the portal user's kanban view, the allocated time of the task is displayed as 0.0 instead o
Original PR description
**issue:** When a task with an allocated time > 0.0 but no timesheets is created in a shared project (with edit rights), the portal user incorrectly sees 0.0 as the allocated time. **Steps to reproduce:** - Ensure the sale_timesheet module is installed. - Create a new project. - Create a task with allocated time and no timesheets. - Share the project with a portal user (edit permission). In the portal user's kanban view, the allocated time of the task is displayed as 0.0 instead of the correct allocated time. opw-4582705 Forward-Port-Of: odoo/enterprise#84706 Forward-Port-Of: odoo/enterprise#82171
Fix timezone handling by replacing DateTime.fromSQL with deserializeDateTime Ensures date-times are shown in the correct timezone instead of assuming local time. Forward-Port-Of: odoo/enterprise#84966
Original PR description
Fix timezone handling by replacing DateTime.fromSQL with deserializeDateTime Ensures date-times are shown in the correct timezone instead of assuming local time. Forward-Port-Of: odoo/enterprise#84966
Steps to reproduce the bug: - Create a quality point with the following settings: - Measure on: Operation - Picking Type: Manufacturing - Product Category: "All" - Create a storable product “P1”: - Product Category: "All" - BoM: - components: - 1 unit of P1 - Create a manufacturing order to produce one unit of P1 - Confirm it Problem: The manufacturing order is confirmed, but the corresponding quality check is not created. This issue occurs when a quality
Original PR description
Steps to reproduce the bug: - Create a quality point with the following settings: - Measure on: Operation - Picking Type: Manufacturing - Product Category: "All" - Create a storable product “P1”: -…
Steps to reproduce the bug:
- Create a quality point with the following settings:
- Measure on: Operation
- Picking Type: Manufacturing
- Product Category: "All"
- Create a storable product “P1”:
- Product Category: "All"
- BoM: - components: - 1 unit of P1
- Create a manufacturing order to produce one unit of P1
- Confirm it
Problem:
The manufacturing order is confirmed, but the corresponding quality check is not created.
This issue occurs when a quality point is configured with "Measure on:
Operation". In that case, the quality check should be created for
manufacturing orders here:
https://github.com/odoo/enterprise/blob/18.0/quality_mrp/models/stock_move.py#L49-L51
However, an empty record is passed for the product parameter.
As a result, the domain defined here:
https://github.com/odoo/enterprise/blob/18.0/quality_mrp/models/stock_move.py#L19-L21
is evaluated with both product and category set to False, which
prevents the created quality point from being matched and thus no
quality check is created.
https://github.com/odoo/enterprise/blob/6ee3472937118e758399a9577251efad8c4c1195/quality_control/models/quality.py#L175-L177
opw-4762914
Forward-Port-Of: odoo/enterprise#85186
Forward-Port-Of: odoo/enterprise#84683Similar to: https://github.com/odoo/odoo/pull/184830 We've recently introduced a new operator: “is within” in the domain selector, which can be used to find out whether a date is within a dynamic range (e.g. within a month, within 4 days, within 3 weeks, etc.). To works, this domain needs dynamic elements, such as `context_today`, which is defined in `py_builtin.js` and dynamically retrieves the current date. https://github.com/odoo/odoo/blob/17.0/addons/web/static/src/core/py_js/py
Original PR description
Similar to: https://github.com/odoo/odoo/pull/184830 We've recently introduced a new operator: “is within” in the domain selector, which can be used to find out whether a date is within a dynamic…
Similar to: https://github.com/odoo/odoo/pull/184830
We've recently introduced a new operator: “is within” in the domain
selector, which can be used to find out whether a date is within a
dynamic range (e.g. within a month, within 4 days, within 3 weeks, etc.).
To works, this domain needs dynamic elements, such as `context_today`,
which is defined in `py_builtin.js` and dynamically retrieves the
current date.
https://github.com/odoo/odoo/blob/17.0/addons/web/static/src/core/py_js/py_builtin.js#L77-L79
However, the problem isn't limited to this operator in the selector
domain, as it's only been available since 18.0, and this pr target is
17.0.s
In fact, it is possible in certain cases to use these fields via debug
mode, and there are several cases where `uid`, `user`, etc. are used.
There is therefore an inconsistency where users see the use of these
variables in these cases and when they try to use them elsewhere with,
for example, a field of this style:
`("date", "=", context_today())`, they get a traceback.
This happens mainly because, in Python, the domain is evaluated via
`literal_eval`, and since it contains variables that are designed for
the web, it causes a traceback because this function expects to receive
only a correctly formatted string, with no context and no variables.
The community commit (https://github.com/odoo/odoo/pull/204172) handles:
- website/model_page.py:
https://github.com/odoo/odoo/blob/17.0/addons/website/controllers/model_page.py#L13-L18
https://github.com/odoo/odoo/blob/17.0/addons/website/controllers/model_page.py#L47-L50
This commit
handles two other cases:
- web_studio/approval:
Here in this case there are several calls to literal_eval on domains
received from the web, notably to create and check its approval spec.
a function has been used to avoid rewriting the same thing several times
in the file.2
- marketing_automation/activity:
Here too, several calls are made to this file, as in the case of
approval, a function has been created to replace all calls to
`literal_eval`
In all three cases, the problem is the same: the problem is not only
present in `is_within` but in the fact that python has no way of
understanding the domain received from the web, so the same fix has been
applied everywhere:
- First, `to_utc()` is removed from the domain, since it's purely
client-side and this notion doesn't exist in the python server
- We replace the `literal_eval` call with `safe_eval`, which will do
more than just transform a string containing only a literal value of
type X into type X (e.g. tuple, string, number, array, etc.)
- `safe_eval` can therefore either evaluate expressions or execute
statements. In our case, what we really want is to evaluate just a
string like literal_eval with just one more context, and to be able to
define local or global values, such as defining `context_today()`
- For the moment, the values we use are the same as those used by
`is_within`, i.e.:
- context_today()
- relative_delta()
- datetime
- time
opw-4551335
opw-4672902
opw-4678894
opw-4669315
opw-4577091
community: https://github.com/odoo/odoo/pull/204172
Forward-Port-Of: odoo/enterprise#84203
Forward-Port-Of: odoo/enterprise#82564