Monday, January 16, 2023
33 changes · master
Enhancements to existing features
The system now warns developers when database constraint names could exceed PostgreSQL length limits, helping prevent future installation or upgrade issues. One existing constraint name in the account EDI proxy client was shortened to stay compatible with database limits.
Original PR description
Warn when constrains name combine with table name will be more than 63 characters. This is to avoid case like the one fixed in #103148 Unlike index, since constrains name are defined in the code, we prefer to avoid automatic truncate and add a warning since devs can chose an appropriate short-enough name. The linked fixes will just truncate the name to the max length to match the name in existing databases. Renaming could be done in other pull requests with upgrade scripts to avoid constrains re-computation. Linked to odoo/enterprise#35424
This change adds reusable Python-based helpers for downloading and unzipping files in the IoT hardware drivers area. It reduces reliance on bash scripts, making future IoT setup and maintenance easier on Windows machines.
Original PR description
Description of the issue/feature this PR addresses: Before, we were using bash scripts to download files from url's. [Example](https://github.com/odoo/enterprise/blob/5e50de9f977e8c09a0c06a9601c541f2f79cdacd/iot/iot_handlers/lib/load_worldline_library.sh#L9) This poses an issue on IoT Windows as it makes the code less portable This pr implements a 'download_from_url' and 'unzip_file' methods in Python which allows to do the same. This allows for the code to be compatible on Windows machines Current behavior before PR: Bash scripts are the only option used to download files from. Desired behavior after PR is merged: We have the option to download and unzip files directly through Python, which will allow us to remove bash scripts in the future [Task 3116299](https://www.odoo.com/web#id=3116299&cids=1&menu_id=4720&action=333&active_id=1428&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update makes placeholder images in the eLearning website area use one consistent built-in method. This should make course and lesson pages easier to maintain and help ensure placeholder visuals behave consistently across the site.
Original PR description
Before this commit placeholder images were generated in multiple different ways in website_slide. This commit makes use of _get_placeholder_filename function and standardizes the way these placeholder images are generated for website_slide. Task-2908029 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Timesheet create and edit access checks are now handled in separate reusable steps instead of being embedded directly in save logic. This makes it easier for businesses and implementers to customize timesheet approval and access rules without disrupting core behavior.
Original PR description
_* = project_timesheet_holidays Before this PR checking validation for creating and writing on timesheet done in create and write method which makes customization difficult for user. So, in this PR check validation for creating and writing on timesheet done in separate method _check_can_create and _check_can_write respectively for timesheet. task-2928942
Sales and Website settings now show documentation links for shipping connectors, matching the guidance already available in Inventory settings. This makes it easier for users to find setup instructions when configuring delivery integrations.
Original PR description
before this commit, the documentation link was missing for shipping connectors in the sales and website settings. after this commit, the documentation link will be shown for each connectors as it is currently displayed in the inventory settings. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The system’s master release version has been updated to 16.2 alpha. This prepares the project for the next development cycle and helps align future work with the correct upcoming release version.
This update simplifies how customized website and portal routes inherit settings from their base routes. It reduces the risk of future changes being accidentally overridden and adds automated checks to prevent the issue from returning.
The Geo Localization provider settings now have a dedicated, better-structured form instead of relying on a generic default layout. This makes the setup screen clearer and easier to use for administrators configuring location services.
Original PR description
**Description of the issue/feature this PR addresses:** currently there is no form view defined for the model base.geo_provider, and thus accessing the form view of this model, odoo is providing the default form view, which is not aligned properly. 1. Install base_geolocalize 2. Settings -> General Settings 3. Under Integration Section, open any record from Geo Localization  **Current behavior before PR:** missing form view for the model. **Desired behavior after PR is merged:** add form view for the model and update string of the field. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Read-only Knowledge articles now display with extra body padding so their layout stays consistent with editable articles that show action buttons. This creates a cleaner, more balanced reading experience without changing article content or behavior.
Original PR description
This commit adds padding to the readonly articles' body so that there is the same space as if the articles buttons were present in the view. task-3080921
Several spreadsheet dashboard template files were reformatted to make them easier to read and maintain. This does not change business functionality, but it should make future updates easier to review and less error-prone.
Original PR description
before this commit, the readability of the json files of documents_spreadsheet_account and documents_spreadsheet_crm is very less as the files are not properly aligned. after this commit, the readability will increase and later some one make any updates in these files, it is easy to understand the changes. https://github.com/odoo/enterprise/pull/35204/files : This is a previous commit made in one of this files and the difference is not properly showing by git and also less readable.
Timesheet creation and editing checks have been moved into separate reusable methods. This makes it easier for businesses with custom workflows to adapt timesheet validation rules without changing the core create or edit process.
Original PR description
Before this PR checking validation for creating and writing on timesheet done in create and write method which makes customization difficult for user. So, in this PR check validation for creating and writing on timesheet done in separate method _check_can_create and _check_can_write respectively for timesheet. task-2928942
The IoT Kanban view now uses a standard always-visible header button for key actions. This makes important actions easier to find and keeps the interface consistent with newer Odoo view behavior.
The Documents spreadsheet component was updated to align with the latest spreadsheet engine changes. This helps keep chart-related behavior reliable and maintains compatibility with ongoing improvements in spreadsheet features.
Original PR description
adapt tests following https://github.com/odoo/o-spreadsheet/commit/bf97a1e4 [IMP] registries: always populate chart/figure registries
The Knowledge app now shows a specific confirmation button label when moving an article, such as moving to a workspace, private area, or shared area. This helps users better understand the destination before confirming the action.
Original PR description
**PURPOSE** Currently, while moving an article from one category to another, the confirmation dialog shows the 'OK' label of the button. So it does not clarify where the article is actually being moved. **SPECIFICATIONS** For better clarification, the confirm label(OK) will be replaced by 'MOVE TO WORKSPACE/PRIVATE/SHARED' depending on the move. **Task**-3102492
Resolved issues and error corrections
Fixed an issue where record counts in Kanban columns could show the wrong number if users quickly toggled progress bar filters. The count animation is now stopped when the underlying count changes, keeping displayed totals aligned with the active filter.
Original PR description
Before this commit, in the kanban view, if we click the progress bar to filter the column multiple times, the count of records number's could show an incorrect value. This occurs because when removing the filter from the progress bar, an animation is done to the number (to increase the value until the correct number of records). Contrariwise, when activating a filter, the number of records is set directly without animation. When we remove and add again a filter quickly, the animation to increase the value of the number finishes when the filter is already apply and the value shown is the old count of records (without the filter). To avoid this, in this commit, we stop the animation when the count of record changes. Unfortunately, testing this is very complicated (because it involves animation frames and Date.now()), and as the cost/reward ratio is very low, we didn't add a test of this behaviour. X-original-commit: 4c8bb53df6ad6382c5b168532c8493ddbb1f7252
Code cleanup and technical improvements
This update simplifies CRM lead records by removing older partner address fields that duplicated information already handled elsewhere. It helps reduce clutter in CRM data and maintenance complexity without introducing a new user-facing feature.
Original PR description
There is a lot of fields in crm.lead. We can remove these. task-2099510 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
Miscellaneous changes
**Current behavior before PR:** (In the case when Multi-languages are set up for the website.) The translation button does not work well with the e-learning fullscreen view. It completely closes the fullscreen view and opens the edition on a blank page. **Desired behavior after PR is merged:** To avoid this, we intercept the click on the 'translate' button and redirect to the non-fullscreen view of this slide with the translation mode enabled. Task-3087792 Forward-Port-Of: odoo/o
Original PR description
**Current behavior before PR:** (In the case when Multi-languages are set up for the website.) The translation button does not work well with the e-learning fullscreen view. It completely closes the fullscreen view and opens the edition on a blank page. **Desired behavior after PR is merged:** To avoid this, we intercept the click on the 'translate' button and redirect to the non-fullscreen view of this slide with the translation mode enabled. Task-3087792 Forward-Port-Of: odoo/odoo#109662 Forward-Port-Of: odoo/odoo#108249
Original PR description
When overriding an existing controller route, developers can easily c/p the route definition and call super() in the overridden method. ```python # website_sale @route(path, type='http',…
When overriding an existing controller route, developers can easily c/p the route definition and call super() in the overridden method.
```python
# website_sale
@route(path, type='http', website=True, sitemap=False)
def my_route(self, *args, **kw):
# do sthg
# website_sale_something
@route(path, type='http', website=False, sitemap=False)
def my_route(self, *args, **kw):
super().my_route(*args, **kw)
# do sthg else
```
when the route attributes are automatically deducted by odoo from the parent route.
```python
# website_sale_something
@route(path, website=False)
def my_route(self, *args, **kw):
super().my_route(*args, **kw)
# do sthg else
```
Removing those redefined attributes simplifies the routes definition, clearly highlighting what's changed by the override.
Also reduces unexpected behavior when modifying the base route without noticing/considering the redefined attributes in a overridden route, which overrides the changes made to the base route when the sub-module is installed.
This PR/commit adds a test to catch routes attributes redefinition, and clean existing routes.
Enterprise PR: https://github.com/odoo/enterprise/pull/35176
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix ensures payment-related tests use a known, supported currency instead of depending on whichever currency is set as the main one. It helps keep localization and payment checks reliable after recent currency-related changes.
Original PR description
Following f3a3e341503926703b2140f6df72f767422f5605, the l10n tests were failing due to the main currency changing to a currency not available for the test provider.
Kazakhstan is now included in the Eurasian Economic Union country group. This corrects country grouping data so business rules and reporting that rely on EEU membership can apply consistently.
Original PR description
EEU is missing KZ among the member countries, this commit fixes this omission. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prevents a planning test from failing when it runs on Saturdays by creating the test shift at the current time instead of the next day. It improves the reliability of automated checks without changing how users interact with Planning.
Original PR description
Before this commit, the test, in which the `planning_shift_switching_backend` tour is launched, a slot is generated the next day from the commit [1]. By doing that, if the tour is started on Saturday, the tour will fail because slot will no longer be in the current week but in the following week in the gantt since, the last day in a week in the gantt view is Saturday. This commit creates the slot in the current datetime for a period set to one hour to be sure the slot is not considered to the past during the execution of the tour. [1] b9e4be033f0a43c9c94d9efc898787bbadd57d12
The wording in accounting lock date tooltips has been clarified so users better understand when entries can and cannot be created. This reduces confusion during period closing and helps accounting teams apply lock dates correctly.
Original PR description
The wording in the lock date tooltips is confusing and sounds as if it should be possible to create entries on the lock date. This commit makes the message clearer. task-3125611
This fix prevents field service sales projects from failing due to overly long internal constraint names. It improves reliability when creating or updating projects with long names, reducing unexpected errors for users.
Original PR description
linked to odoo/odoo#109065
This update simplifies several website and portal route definitions by removing repeated settings that are already inherited. It keeps the same behavior for users while making the code easier to maintain and less error-prone for future changes.
Original PR description
Remove route values already specified in overridden route Simplify/clean code Community PR: https://github.com/odoo/odoo/pull/108512
Steps to reproduce: - We need to have eLearning and Survey installed. - Then we go to Demo or any other users and we remove the access to eLearning and we give it administrator rights to Surveys. - We connect with Demo and we go to the survey app. Issue: We are getting a traceback when trying to access Survey app, because we load the inherited view that calls for the `slide_channel_count` field which is restricted for elearning officers only. Solution: Added proper access rights
Original PR description
Steps to reproduce: - We need to have eLearning and Survey installed. - Then we go to Demo or any other users and we remove the access to eLearning and we give it administrator rights to Surveys. - We connect with Demo and we go to the survey app. Issue: We are getting a traceback when trying to access Survey app, because we load the inherited view that calls for the `slide_channel_count` field which is restricted for elearning officers only. Solution: Added proper access rights groups to the inherited views so we won't try to access it without the proper rights. FW bot up to master opw-3059128 Forward-Port-Of: odoo/odoo#108535
l10n_in: we set the partner state in `Place of supply` only when the journal type is a sale. Also added the country domain in XML view. l10n_in_edi: we did the form realignment in the e-invoice settings. Also, updated the e-invoice report. l10n_in_edi_ewaybill: The following points are covered - using the `partner_shipping_id` field instead of `_l10n_in_get_shipping_partner` method - form realignment in the e-waybill settings. l10n_in_upi: changed the method `generate_qr_code` t
Original PR description
l10n_in: we set the partner state in `Place of supply` only when the journal type is a sale. Also added the country domain in XML view. l10n_in_edi: we did the form realignment in the e-invoice settings. Also, updated the e-invoice report. l10n_in_edi_ewaybill: The following points are covered - using the `partner_shipping_id` field instead of `_l10n_in_get_shipping_partner` method - form realignment in the e-waybill settings. l10n_in_upi: changed the method `generate_qr_code` to `_generate_qr_code`. Forward-Port-Of: odoo/odoo#109513
Description of the issue/feature this PR addresses: Remove unneeded attribute in field ref Current behavior before PR: The field "Reference" (field name `ref`) is displayed twice on Journal Entries. Desired behavior after PR is merged: The field ref is displayed once. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#109711
Original PR description
Description of the issue/feature this PR addresses: Remove unneeded attribute in field ref Current behavior before PR: The field "Reference" (field name `ref`) is displayed twice on Journal Entries. Desired behavior after PR is merged: The field ref is displayed once. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#109711
In this commit, added the list of error codes with messages, and use them when an error message is empty. If we don't find the message from the defined error codes then we call API to get the latest code and message. Forward-Port-Of: odoo/odoo#109551
Original PR description
In this commit, added the list of error codes with messages, and use them when an error message is empty. If we don't find the message from the defined error codes then we call API to get the latest code and message. Forward-Port-Of: odoo/odoo#109551
This is a forward port of https://github.com/odoo/enterprise/pull/35186 (without the check on `prevent_old_thimesheets_encoding` as this setting has been removed in https://github.com/odoo/enterprise/pull/34043) It is possible to start a timesheet older than the employee's last validated timesheet but an error is raised when trying to stop it Steps to reproduce: 1. Install Timesheets 2. Go to Settings > Timesheets > Time Encoding and enable 'Lock Dates' 3. Set Marc Demo's rights on Proj
Original PR description
This is a forward port of https://github.com/odoo/enterprise/pull/35186 (without the check on `prevent_old_thimesheets_encoding` as this setting has been removed in…
This is a forward port of https://github.com/odoo/enterprise/pull/35186 (without the check on `prevent_old_thimesheets_encoding` as this setting has been removed in https://github.com/odoo/enterprise/pull/34043) It is possible to start a timesheet older than the employee's last validated timesheet but an error is raised when trying to stop it Steps to reproduce: 1. Install Timesheets 2. Go to Settings > Timesheets > Time Encoding and enable 'Lock Dates' 3. Set Marc Demo's rights on Project to 'User' and Timesheets to 'User: own timesheets only' 4. Go to Projects and open any task 5. Add 2 timesheets (with a duration) for Marc Demo on different days 6. Go to Timesheets > To Validate > All Timesheets and validate the most recent timesheet of Marc Demo (in the list view) 7. Connect as Marc Demo and open Timesheets 8. Trigger the list view 9. Start the older timesheet and then stop it: an error is raised Solution: When we try to start the timer of an old timesheet (older than the `last_validated_timesheet_date` of the employee), create an AAL on today's date for the same project/task. When validating timesheets, we interrupt all the old timesheets. opw-3095155
Steps: - Change the language (e.g Dutch) - Go to Sign upload a pdf and send it to a user with a different language. - Go to settings -> technical -> E-mails , select the last mail. Issue: The term "Your signature" is always translated in "Jouw signature" for dutch Cause: The sign.request model sends "Signature" raw to the render opw-3082491 Forward-Port-Of: odoo/enterprise#34915
Original PR description
Steps: - Change the language (e.g Dutch) - Go to Sign upload a pdf and send it to a user with a different language. - Go to settings -> technical -> E-mails , select the last mail. Issue: The term "Your signature" is always translated in "Jouw signature" for dutch Cause: The sign.request model sends "Signature" raw to the render opw-3082491 Forward-Port-Of: odoo/enterprise#34915
The fix from the task-3106778 introduced an issue where it was not possible to compute the correct contract_id when the job of the employee is changed. This commit fixes the issue. This commit also fixes an issue in l10n_be_hr_contract_salary where the generate_simulation_link_action button attribute changes allows to see the button on non-belgian company contract templates while it shouldn't. Forward-Port-Of: odoo/enterprise#35720
Original PR description
The fix from the task-3106778 introduced an issue where it was not possible to compute the correct contract_id when the job of the employee is changed. This commit fixes the issue. This commit also fixes an issue in l10n_be_hr_contract_salary where the generate_simulation_link_action button attribute changes allows to see the button on non-belgian company contract templates while it shouldn't. Forward-Port-Of: odoo/enterprise#35720
In this commit, the following points are covered - updated GST Return Period form view. - form realignment in the GST Service settings. - updated domain to get a partner to match bills. Forward-Port-Of: odoo/enterprise#35614
Original PR description
In this commit, the following points are covered - updated GST Return Period form view. - form realignment in the GST Service settings. - updated domain to get a partner to match bills. Forward-Port-Of: odoo/enterprise#35614
This PR fix 3 issues encountered in 16.0: - add tracking on next_invoice_date. It was not tracked in 16.0 - the following traceback could be encountered when updateting the template: ``` File "/home/odoo/src/enterprise/16.0/partner_commission/models/sale_order.py", line 75, in _prepare_upsell_renew_order_values values = super()._prepare_upsell_renew_order_values(subscription_management) File "/home/odoo/src/enterprise/16.0/sale_subscription/models/sale_order.p
Original PR description
This PR fix 3 issues encountered in 16.0:
- add tracking on next_invoice_date. It was not tracked in 16.0
- the following traceback could be encountered when updateting the template:
```
File "/home/odoo/src/enterprise/16.0/partner_commission/models/sale_order.py", line 75, in _prepare_upsell_renew_order_values
values = super()._prepare_upsell_renew_order_values(subscription_management)
File "/home/odoo/src/enterprise/16.0/sale_subscription/models/sale_order.py", line 858, in _prepare_upsell_renew_order_values
option_lines_data += [
File "/home/odoo/src/enterprise/16.0/sale_subscription/models/sale_order.py", line 860, in <listcomp>
self._compute_option_data_for_template_change(option)
AttributeError: 'sale.order' object has no attribute '_compute_option_data_for_template_change'
```
- prevent draft invoice to be sent to customer
Forward-Port-Of: odoo/enterprise#35627fix typo of contract Forward-Port-Of: odoo/enterprise#35083
Original PR description
fix typo of contract Forward-Port-Of: odoo/enterprise#35083