Tuesday, November 26, 2024
21 changes · 17.0
Resolved issues and error corrections
The website editor test flow was updated so background video checks no longer make calls to external video services. This avoids unreliable automated test failures caused by outside services while keeping the website video feature behavior covered internally.
Original PR description
*: web_editor, website
For some reason, the tour introduced by [1] started failing on the
runbot for its 17.0 version, showcasing turnstile errors. Not sure why
but this tour should never have been making external calls to video URL
anyway and solving that seems to solve the main issue.
Specific turnstile problems will be investigated later.
[1]: https://github.com/odoo/odoo/commit/2789b50bc72cc801fbd5005f74e2cd2655040cbb
runbot-107885This fix corrects small mistakes in how manufacturing demo data is generated. It ensures sample-size settings are applied consistently, making demo databases more reliable for testing and demonstrations.
Original PR description
Description of the issue/feature this PR addresses: - When working on this https://github.com/odoo/odoo/pull/186238 , few typos were discovered when populating data in demo database. - This pr fixes them - currently, the sample_ratio argument were not used in some methods [like this](https://github.com/odoo/odoo/blob/17.0/addons/mrp/populate/mrp.py#L363) instead values are hard coded. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix keeps the original database constraint definition intact when Odoo compares expected constraints with existing ones. It avoids unnecessary constraint removal and recreation, and prevents certain percent-sign based rules from being stored incorrectly in the database.
Original PR description
If we replace the original definition then the check between the existing definition and the original one will always fail, thus we are always removing and re-adding the same constraint.…
If we replace the original definition then the check between the existing definition and the original one will always fail, thus we are always removing and re-adding the same constraint. https://github.com/odoo/odoo/blob/5ba361ddffa757cf60968f37180c7fd1304b3fd4/odoo/models.py#L3209
Replacing `%` by `%%` works for `LIKE` operator because they are equivalent. Since they are sent as-is to the DB the constraint could actually be plainly wrong.
```sql
test_17=> SELECT coalesce(d.description, pg_get_constraintdef(c.oid))
FROM pg_constraint c
JOIN pg_class t
ON t.oid = c.conrelid
LEFT JOIN pg_description d
ON c.oid = d.objoid
WHERE t.relname = 'ir_model_fields'
AND conname = 'ir_model_fields_name_manual_field'
+------------------------------------------------+
| coalesce |
|------------------------------------------------|
| CHECK (state != 'manual' OR name LIKE 'x\_%%') |
+------------------------------------------------+
```
Example where the definition sent to the DB is wrong:
```py
class A(models.Model):
_inherit = "res.users"
_sql_constraints = [("test_constraint", "CHECK (login !~ '%')", "Cannot have % in login")]
```
```sql
test_17=> \d res_users
...
Check constraints:
"res_users_test_constraint" CHECK (login::text !~ '%%'::text)
...
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix ensures edited list rows are recalculated when needed instead of relying on potentially outdated saved data. It helps prevent incorrect behavior while preserving earlier performance improvements in the web interface.
Original PR description
In a previous commit [1], we reduced the number of call to the getter `editedRecord` which does a heavy operation. In `DynamicList.leaveEditMode` we saved the edited record but it could become outdated so we need to compute at some point. [1]: b1191a7b99d5e374f92b62c541ac058cff26d4d7
No description available.
This change prevents users from directly loading the Syscebnl chart of accounts template, matching existing safeguards for similar templates. It helps avoid incorrect accounting configurations by stopping use of a template that is not meant to be installed directly.
Original PR description
Raise an error when the user tries to load syscebnl template the same way we block syscohada, as those templates should not be used directly. chart added in https://github.com/odoo/odoo/pull/166211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users will no longer see validation notifications simply for opening an already invalid record or starting a new one from it. Alerts now appear only when the user actually changes the record, reducing confusion and unnecessary interruptions.
Original PR description
Before this commit, if an invalid record existed in db, and it was open from a list, a notification was raised even if the user didn't modify the record. Also, if an invalid record is open, and the user click to create a new record, a notification is raised. Now, the notifications only raise if the user modifies the record. opw-3987849
The website media dialog test now inserts an icon instead of an image, avoiding an external API call that could cause automated test failures. This improves reliability of internal validation without changing the customer-facing website experience.
Original PR description
Since this commit [1], where the "media dialog insert media" was added, the runbot sometimes fails because the tour contacts the "media-api.odoo.com" API, which is not allowed in a tour. This commit fixes the issue by inserting an icon instead of an image, as the icon does not require any API call. [1]: https://github.com/odoo/odoo/commit/2231148db55cfc6fa3f3f5b2b5c5250b74f2feac runbot-107920
Custom filters with very long lists of records now show a shorter description instead of filling the search bar. This prevents oversized, unscrollable filter labels and keeps the search experience usable.
Original PR description
When adding a custom filter, we can produce a domain of the form
["id", "in", [
1415T215,
1545481,
...
]]
with a very long list of ids. In this commit we make the domain description contain only the 20 first ids of the list. If we don't do that we obtain a (unscrollable) search bar facet that is not fully visible when confirming the domain.This update ensures that address formatting for Mexico (MX) within the Odoo Enterprise system aligns with the community version. Previously, there was a discrepancy in how MX addresses were handled, and this change corrects that to maintain consistent data and reporting. This improves data accuracy and simplifies processes for users in Mexico.
Original PR description
Update enterprise formatting override for MX addresses to be consistent with community, see PR: https://github.com/odoo/odoo/pull/186926 Forward-Port-Of: odoo/enterprise#74503
This update corrects a misleading description in the module's documentation. Previously, it stated that posting invoices automatically generated payments, a feature removed in Odoo 13. The change ensures the module description accurately reflects the current functionality, avoiding confusion for users.
Original PR description
The module description of `account_sepa_direct_debit` in the manifest states that posting an invoice will automatically generate a payment. Actually that feature was dropped in Odoo 13 with commit e3d390c4455c620793c481874b4503fa91bb6125 but the `__manifest__.py` was not updated at that time. This makes the situation uncomfortable where a feature not present in the code is still advertised in the module description. This commit updates the description of the module in the manifest. Forward-Port-Of: odoo/enterprise#73380
This update corrects a technical issue where a specific product view was incorrectly prioritized, leading to inaccurate search results and potential problems with inventory reporting. By adjusting the view's priority, we've ensured that product searches are more accurate and reliable, improving data consistency.
Original PR description
Currently the view has the default priority and become the main search view for product despite being specific to industry_fsm_sale. It creates issues in inventory at date view where the filters doesn't exist due to this.
A bug in a test was causing nightly builds to fail. The fix ensures the test correctly identifies items by their unique ID, rather than relying on a related request ID. This resolves an instability issue and guarantees consistent test results.
Original PR description
In the test I added in 16ad0830fd71d4dbf719471c8f303372da3f7e09, the id should be the one of the item and not the request. The test only works if the request and item have the same id, breaking nightly runbot builds.
This update fixes an issue where images in welcome email templates were excessively large, causing layout problems. The changes ensure images are appropriately sized, improving the visual presentation of these emails. Additionally, the source paths for these templates have been corrected.
Original PR description
Apply [this fix] to templates introduced with [this commit]. The purpose is to prevent images that are the only child of their parent from taking too much space. Furthermore, fix the src path for some of these templates. [this fix]: https://github.com/odoo/odoo/commit/d5297a75f50022b406b226ebf4c300f4bd033c3d [this commit]: https://github.com/odoo/enterprise/commit/fd98660e352512e0b74d91958707687978154833 task-4178640
This update corrects a technical issue preventing service invoices from correctly passing a validation check. The reason field, which was incorrectly required, has been removed from the process for service invoices. This ensures smoother invoice generation and avoids disruptions for users.
Original PR description
Oversight of odoo/enterprise#73209. Service invoices don't use the reason field at all (hidden in view) and thus will always fail the constraint. To fix it, disable the constraint for service invoices. opw-4354637
This update resolves an issue where subscription alerts were being triggered multiple times for sales orders, creating unnecessary chatter activities. The fix ensures alerts are only created when the sales order stage changes, streamlining the workflow and preventing performance impacts. This improves the reliability of automated notifications.
Original PR description
Steps ----- - Subscriptions > Configuration > Alerts. - Create an alert triggered when the stage goes from 'Initial' (placeholder) to 'In Progress', set 'Create next activity', chose Email as activity. - Create a subscription, confirm it. ** Multiple activities created in the chatter (1 would be expected) ** Cause ----- The `pre_domain_filter` of the `base.automation` is not set, leading to an activity being created every time a write happens on the sale order while it is in the `stage_to_id` stage. Change ----- Add a pre-domain/domain filter to only trigger actions when the stage changes. opw-4273625 Forward-Port-Of: odoo/enterprise#73601
Miscellaneous changes
Current: Users go to Elearning > Certificates to create a test and do not fill in a description for the test. After the employee finishes the test, they are given a certificate and it is displayed in the employee profile but it is displayed as "False" as shown in the image. This PR fixes that error and fills it back as '' so that it does not display 'False' if the test does not have a description.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186531
### Description of the issue/feature this PR addresses: On selecting multiple cells in a table and applying formatting commands like (Bold, Italic, Underline, and Strikethrough) resulted in the loss of selection. The root cause of this issue was identified in the `cleanForSave()` function, which triggered `deselectTable()` during command execution, removing the entire selection from the table results in collapsing the selection to start. ### Approach: This PR addresses the issue by rest
Original PR description
### Description of the issue/feature this PR addresses: On selecting multiple cells in a table and applying formatting commands like (Bold, Italic, Underline, and Strikethrough) resulted in the loss of selection. The root cause of this issue was identified in the `cleanForSave()` function, which triggered `deselectTable()` during command execution, removing the entire selection from the table results in collapsing the selection to start. ### Approach: This PR addresses the issue by restoring selection using `historyResetLatestComputedSelection()` after executing the command, ensuring that the selection is preserved as intended. ### Desired behavior after PR is merged: We maintain the selection after applying formatting commands (Bold, Italic, Underline, and Strikethrough) in table. task-3822527 Forward-Port-Of: odoo/odoo#165089
**task-4280164 opw-3985404** --- **[FIX] web_editor: removes figure parent of removed image** Steps to reproduce the issue: - In website, edit mode. - Drag and drop a "Picture" snippet onto the page. - Click the image in the "Picture" snippet. - Delete the image by clicking the "Remove" button in the image options. - Inspect the DOM of the "Picture" snippet. - Bug: The figure element which wrapped the image is still there. After this commit, when an image wrapped by a figure e
Original PR description
**task-4280164 opw-3985404** --- **[FIX] web_editor: removes figure parent of removed image** Steps to reproduce the issue: - In website, edit mode. - Drag and drop a "Picture" snippet onto the page.…
**task-4280164 opw-3985404** --- **[FIX] web_editor: removes figure parent of removed image** Steps to reproduce the issue: - In website, edit mode. - Drag and drop a "Picture" snippet onto the page. - Click the image in the "Picture" snippet. - Delete the image by clicking the "Remove" button in the image options. - Inspect the DOM of the "Picture" snippet. - Bug: The figure element which wrapped the image is still there. After this commit, when an image wrapped by a figure element is removed, the figure is also removed. --- **[FIX] web_editor: allows to edit events sidebar photos link** Before this commit, it was not possible to edit the link of the events sidebar photos. This occurred for 2 reasons: A - The image link option didn't work with images wrapped in a figure element. B - After fixing point A, the "href" attribute modification was ignored when saving the "/event" page. Steps to reproduce A: - Go to the "/event" page in edit mode. - Click on the 'Customize' tab and enable the sidebar. - Click a photo in the sidebar. - Bug: the URL input for setting the link is not available in the "Image" options. Steps to reproduce B (after fixing A): - Go to the "/event" page in edit mode. - Click on the 'Customize' tab and enable the sidebar. - Click a photo in the sidebar. - Edit the "Your URL" input. (e.g. [www.odoo.com](http://www.odoo.com/)) - Save the page. - Click the image with the modified link. - Bug: the new link was not saved. To fix issue B, we added the "href" attribute to the list of allowed root attributes. --- **[FIX] website_event: prevents removing sidebar photos** Steps to reproduce the issue: - Go to the "/event" page in edit mode. - Enable the sidebar. - Click a photo in the sidebar. - Click the "Delete" button in the image options. - The image is removed even though it shouldn't be allowed to remove it. This commit hide the "Delete" button for these sidebar images. --- **[FIX] website_event: fix editing of figcaption for event sidebar photos** Steps to reproduce the bug (only on Chrome): - Go to the "/event" page. - Enter edit mode. - Click the "Customize" tab and enable the "Sidebar". - Try to add a character at the end of the figcaption of the second photo in the sidebar. - Bug: it's not possible to add a new character. This requires further investigation, but the issue comes from how Chrome handles editing elements inside links. The fact that the <a> element was set to display inline caused the issue. This commit fixes the issue by setting the <a> element to display block, which is more appropriate anyway. Forward-Port-Of: odoo/odoo#186278
Description of the issue/feature this PR addresses: The second parameter of a Many2many should be the join table as seen in the __init__ of the class here : https://github.com/odoo/odoo/blob/91316ec8d55dbc5e1cd712568f614c62539bd807/odoo/fields.py#L4650 The default string of that field will, in any case, be "Related Contact" which is similar enough IMO to not have to repeat the string="..." just to have the "s" This error in the code (before this commit) does not have any consequence since
Original PR description
Description of the issue/feature this PR addresses: The second parameter of a Many2many should be the join table as seen in the __init__ of the class here :…
Description of the issue/feature this PR addresses: The second parameter of a Many2many should be the join table as seen in the __init__ of the class here : https://github.com/odoo/odoo/blob/91316ec8d55dbc5e1cd712568f614c62539bd807/odoo/fields.py#L4650 The default string of that field will, in any case, be "Related Contact" which is similar enough IMO to not have to repeat the string="..." just to have the "s" This error in the code (before this commit) does not have any consequence since the field is not stored, but by overriding the field in a customisation to set store=True, there are errors. See PSBE-Maintenance task #4191554 for details on the customisation highlighting the issue Current behavior before PR: With a customisation, changing the field to store=True cause issues when assigning it due to the join table being 'none' as highlighted in the traceback of the PSBE-Maintenance task ``` psycopg2.errors.UndefinedTable: relation "none" does not exist LINE 1: SELECT None.None, None.None FROM None, "res_users" LEFT JOI... ``` Desired behavior after PR is merged: The string will be Default and therefore become "Related Contact" (we lose the 's'), and the join table will be correctly created when setting 'store=True' --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183161
Currently, customers are unable to invoice orders through a pos session if they use the Bulgarian localization. Steps to reproduce: ------------------- * Install **point_of_sale** and **l10n_bg** * Change the current company to the Bulgarian one * Set up a shop and open it * Make an order, select any customer * Select payment * Select the invoice option * Select payment method and validate > Observation: Traceback appears psycopg2.errors.CheckViolation: new row for relation "accou
Original PR description
Currently, customers are unable to invoice orders through a pos session if they use the Bulgarian localization. Steps to reproduce: ------------------- * Install **point_of_sale** and **l10n_bg** *…
Currently, customers are unable to invoice orders through a pos session if they use the Bulgarian localization. Steps to reproduce: ------------------- * Install **point_of_sale** and **l10n_bg** * Change the current company to the Bulgarian one * Set up a shop and open it * Make an order, select any customer * Select payment * Select the invoice option * Select payment method and validate > Observation: Traceback appears psycopg2.errors.CheckViolation: new row for relation "account_move_line" violates check constraint "account_move_line_check_accountable_required_fields" Why the fix: ------------ The constraints is violated because the value for account_id does not exist. https://github.com/odoo/odoo/blob/4601acea15feea4780269b4a333f18435904b684/addons/point_of_sale/models/pos_payment.py#L115-L117 We observe that `self.company_id.account_default_pos_receivable_account_id.id` is not set. This field belogns to the `account` module but can only be modified if the module `account_accountant` because of the group `group_account_readonly`. https://github.com/odoo/odoo/blob/4601acea15feea4780269b4a333f18435904b684/addons/point_of_sale/views/res_config_settings_views.xml#L163-L167 Other localizations do not have the issue as they set the default account through the data in `account`module. https://github.com/odoo/odoo/blob/4601acea15feea4780269b4a333f18435904b684/addons/l10n_au/data/account_chart_template_data.xml#L14 https://github.com/odoo/odoo/blob/4601acea15feea4780269b4a333f18435904b684/addons/l10n_au/data/account.account.template.csv#L8 opw-4279804 Forward-Port-Of: odoo/odoo#186551