Tuesday, October 29, 2024
44 changes · 18.0
Enhancements to existing features
This change improves how Odoo prepares database queries for company-specific JSON-based fields when no fallback value is defined. It enables database administrators to add targeted indexes for specific companies, which can improve performance for frequently used company-dependent data.
Original PR description
this commit changes the SQL for jsonb company dependent when fallback is not defined. The new sql allows DB managers to add index per company for some company dependent column which is not expected to be sparse. for field is not expected to be sparse 1. set index=False, company_dependent=True 2. add index per company for the result of `_field_to_sql`` e.g. `CREATE INDEX idx_name ON table USING btree (((col->'1')::float))` or `CREATE INDEX idx_name ON table USING btree (((col->'1'->>0)::varchar))` 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
The UrbanPiper point-of-sale integration now creates its discount product only when it is needed and only if it does not already exist. This reduces setup duplication and helps keep discount handling consistent without changing the day-to-day user workflow.
Original PR description
In this commit: === - Removed the XML data file for creating the discount product. - Added logic to create the discount product in Python, directly where the existing discount product is searched. - Implemented a check to first search for the discount product, and only create it if it does not already exist.
Resolved issues and error corrections
The mobile editing toolbar now stays directly above the on-screen keyboard instead of leaving an awkward gap. This makes editing content on phones smoother and reduces visual confusion for users.
Original PR description
Current behavior before PR: When the keyboard opens on mobile, the toolbar appears in the wrong position, leaving a space between the toolbar and the keyboard. Desired behavior after PR is merged: Now, when the keyboard opens on mobile, the toolbar will correctly stick to the top of the keyboard. task:4196686
Code cleanup and technical improvements
This update makes Odoo's automated guided tours better at finding usable screen elements by ignoring disabled options during the search. This should reduce flaky tour failures and provide clearer error messages when a tour step cannot proceed.
Original PR description
In this commit, we improve the algorithm for finding the trigger. In fact, in macro.js, when each time the findTrigger method returns "false", then we wait for the next mutation to run findTrigger again. So in fact, it is not correct to check if the element found for the tour step is disabled AFTER having found it. We must find an element that meets specific criteria, namely that it is not disabled. We take advantage of this commit to improve the error messages. We take advantage of this commit to move the pointer in tour_automatic and no longer have to pass it in tour_step_automatic. 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
Issue --> A noticeable amount of time is spent in the method `_get_outgoing_incoming_moves` when doing the `OR` operation on the stock.move recordsets when there is a large number of moves to iterate through. Solution --> Replace the odoo recordset operations with set operations. Benchmarks --> | # of moves | Before | After | |--------|--------|--------| | 32000 | 24.08s | 1.43s | | 7300 | 1.74s | 0.40s | opw-4220302 Forward-Port-Of: odoo/odoo#185251 Forward-Port-Of: odoo/
Original PR description
Issue --> A noticeable amount of time is spent in the method `_get_outgoing_incoming_moves` when doing the `OR` operation on the stock.move recordsets when there is a large number of moves to iterate through. Solution --> Replace the odoo recordset operations with set operations. Benchmarks --> | # of moves | Before | After | |--------|--------|--------| | 32000 | 24.08s | 1.43s | | 7300 | 1.74s | 0.40s | opw-4220302 Forward-Port-Of: odoo/odoo#185251 Forward-Port-Of: odoo/odoo#183671
This update fixes several small issues in automated guided tours for Project, Project Todo, and Website Sale Autocomplete. These changes help keep test flows stable by avoiding duplicate actions, using existing sample data, and waiting for records to be created before continuing.
Original PR description
In this commit, we make little fix for multiple tours. project_update_tour_tests.js: remove two time click. project_todo_main_functions.js: fill marc instead of test to avoid to create a new user. autocomplete_tour.js: precise trigger to remove run functions. project_tour.js: check the new record is created before continue the tour. 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
This update applies the project's JavaScript formatting rules to web test files that previously missed automated checks. It helps keep the test suite consistent and easier to maintain, without changing customer-facing behavior.
Original PR description
Since the creation of v18, the JavaScript tooling wasn't enabled. The tooling was enabled in commit[1]. In this commit, we applied a manual eslint pass inside the "web/static/tests" directory to ensure we have well-formatted .test.js files. ``` eslint '**/web/static/tests/**/*.js' --fix ``` [1]: https://github.com/odoo/odoo/commit/f3407c392d4e7595e9a299662115df03bacbd41c
Fixes an issue where message author avatars disappeared for guests after a member left a public chat channel. This keeps chat history clearer and easier to follow for external or guest viewers.
Original PR description
Steps to reproduce: - Create a public channel - Add a non website_published user as a new member - Log in as that new member and send a message then leave the channel - Open the channel as a guest - The author avatar of the message is not there
This fixes a toolbar issue in the HTML editor where clicking near the edge of dropdown items could close the toolbar instead of selecting the option. It also ensures the selected 13px font size is displayed correctly, making formatting controls more reliable for users.
Original PR description
Description of the issue this PR addresses: Current behavior before PR: Clicking near the edge of a toolbar dropdown item would not work. This occurred because the `user-select-none` class was applied to the child element rather than the dropdown item itself, causing `onSelectionChange` to be triggered, followed by `updateToolbarVisibility` closing the toolbar. Desired behavior after PR is merged: The `user-select-none` class is now applied directly to the dropdown item, preventing `updateToolbarVisibility` from closing the toolbar when clicking near the edges of dropdown items. task-4241028 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The upload button for quote builder documents is now hidden until a quotation template has been saved. This prevents users from triggering an error when adding documents before the system has created the template record needed to attach them correctly.
Original PR description
When attempting to upload a file in the ``Quotation Templates`` without saving the template first, an error occurs in the terminal. Steps to reproduce: --- - Install the ``sale_management`` module -…
When attempting to upload a file in the ``Quotation Templates`` without saving the template first, an error occurs in the terminal. Steps to reproduce: --- - Install the ``sale_management`` module - Sales > Configuration > Sales Order > Quotation Templates - Create New > Quote Builder > Click on Upload - Try to upload a file Traceback: --- ``ValueError: invalid literal for int() with base 10: 'false'`` Previous Behaviour: --- When attempting to upload a file in the ``Quotation Templates`` without first saving the template, the template ID is not generated at [1]. As a result, at [2], we encounter an issue where ``int(sale_order_template_id) = 'false'``. This happens because the template tries to access its name in the uploaded file. If the template name is not available and we attempt to upload the file, ``resId`` at [1] will be returned as false. Solution: --- Until the template is saved, the upload button will remain hidden. Once the template is saved, the upload button will be displayed. This ensures that when a file is uploaded, the template name will be properly associated with it. [1]- https://github.com/odoo/odoo/blob/c5ce138697d7c5ebe200566dfb8b7ba55365f100/addons/sale_pdf_quote_builder/static/src/js/quotation_document_kanban/quotation_document_kanban_widget.js#L21-L23 [2]- https://github.com/odoo/odoo/blob/c5ce138697d7c5ebe200566dfb8b7ba55365f100/addons/sale_pdf_quote_builder/controllers/quotation_document.py#L24-L26 sentry-5963406254 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
In commit [1], the carousel controls have been deactivated in edit mode, in order to control the carousel sliding manually so everything is done in the mutex. This was done to avoid asynchronous issues and to have a correct history when using the carousel options. However, these controls are also blocked in translate mode, because it is considered as if it was in edit mode, which should not be the case. This made it impossible to translate the other slides, since we cannot slide the carousel
Original PR description
In commit [1], the carousel controls have been deactivated in edit mode, in order to control the carousel sliding manually so everything is done in the mutex. This was done to avoid asynchronous issues and to have a correct history when using the carousel options. However, these controls are also blocked in translate mode, because it is considered as if it was in edit mode, which should not be the case. This made it impossible to translate the other slides, since we cannot slide the carousel anymore. This commit fixes this by not deactivating the carousel controls if we are in translate mode. Steps to reproduce: - Install an other language. - In edit mode, drop the "Carousel" or the "Quotes" snippet and save. - Change the language of the website and translate it. - Try to slide the carousel. => It is impossible. [1]: https://github.com/odoo/odoo/commit/93ec3ac285dc9ffd363e185a1dc238c6135d79dd opw-4134824 Forward-Port-Of: odoo/odoo#178252
Since [1] the `user_id` represents the buyer, the string in the field was updated but not in the filter and the search which could be confusing. [1]: https://github.com/odoo/odoo/commit/470b7562 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185376 Forward-Port-Of: odoo/odoo#179834
Original PR description
Since [1] the `user_id` represents the buyer, the string in the field was updated but not in the filter and the search which could be confusing. [1]: https://github.com/odoo/odoo/commit/470b7562 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185376 Forward-Port-Of: odoo/odoo#179834
There were some cache inconsistencies when computing remaining leaves on the dashboard or in the accrual scheduled actions due to commit 7ef0ad2. The cache invalidation is necessary to avoid issues when the call to process_accrual is made twice in a row, but the cache invalidation was too broad. This commit aims at only invalidating the part of the cache that were causing issues when computing the remaining leaves. opw-4167557 opw-4167582 opw-4175815 opw-4149134 opw-4241970 Forward
Original PR description
There were some cache inconsistencies when computing remaining leaves on the dashboard or in the accrual scheduled actions due to commit 7ef0ad2. The cache invalidation is necessary to avoid issues when the call to process_accrual is made twice in a row, but the cache invalidation was too broad. This commit aims at only invalidating the part of the cache that were causing issues when computing the remaining leaves. opw-4167557 opw-4167582 opw-4175815 opw-4149134 opw-4241970 Forward-Port-Of: odoo/odoo#185189 Forward-Port-Of: odoo/odoo#180832
Before this commit, adding a product to an order and then changing the cashier would not update the cashier information on the captured order, resulting in the previous cashier being recorded. However, the printed receipt would display the current cashier, leading to inconsistency. opw-4257705 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184092
Original PR description
Before this commit, adding a product to an order and then changing the cashier would not update the cashier information on the captured order, resulting in the previous cashier being recorded. However, the printed receipt would display the current cashier, leading to inconsistency. opw-4257705 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184092
**Current behavior:** Duplicating a user-defined filter will fail and trigger an exception. **Expected behavior:** Record duplicates. **Steps to reproduce:** 1. Go to some menu, create a filter 2. In technical settings, go to user-defined-filters menu 3. Select one and duplicate it -> Exception **Cause of issue:** The SQL constraint check_res_id_only_when_embedded_action is triggering because `embedded_parent_res_id` is an Integer type field which, when NULL in postgres, will
Original PR description
**Current behavior:** Duplicating a user-defined filter will fail and trigger an exception. **Expected behavior:** Record duplicates. **Steps to reproduce:** 1. Go to some menu, create a filter 2. In technical settings, go to user-defined-filters menu 3. Select one and duplicate it -> Exception **Cause of issue:** The SQL constraint check_res_id_only_when_embedded_action is triggering because `embedded_parent_res_id` is an Integer type field which, when NULL in postgres, will be interpreted by the ORM as 0 when the record we want to duplicate has its values copied. **Fix:** In the copy_data override for `ir.filters`, delete the key, value pair for `embedded_parent_res_id` if its value is 0. The only case this problem arises in, is when we copy values from an existing filter record and directly use them for creating a new one- i.e., on duplication/copy. opw-4234421 Forward-Port-Of: odoo/odoo#184414
nodeValue on `input` always return null. To get the previous value of the input cell, the query should be `matrixInput.attributes.value.nodeValue`. That way unchanged cell won't be send to the list of data to be updated. opw: 3987284 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#184792
Original PR description
nodeValue on `input` always return null. To get the previous value of the input cell, the query should be `matrixInput.attributes.value.nodeValue`. That way unchanged cell won't be send to the list of data to be updated. opw: 3987284 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#184792 Forward-Port-Of: odoo/odoo#184294
This completes https://github.com/odoo/odoo/pull/171784 by adding support for the same kind of rrule string, but without the `RRULE;` prefix. Based on Real World™️ evidence. Description of the issue/feature this PR addresses: <details> ``` odoo-1 | 2024-10-24 11:20:18,785 42 ERROR odoo odoo.addons.google_calendar.models.res_users: [res.users(2,)] Calendar Synchro - Exception : unsupported property: ! odoo-1 | Traceback (most recent call last): odoo-1 | File "/opt/odoo/auto
Original PR description
This completes https://github.com/odoo/odoo/pull/171784 by adding support for the same kind of rrule string, but without the `RRULE;` prefix. Based on Real World™️ evidence. Description of the…
This completes https://github.com/odoo/odoo/pull/171784 by adding support for the same kind of rrule string, but without the `RRULE;` prefix.
Based on Real World™️ evidence.
Description of the issue/feature this PR addresses:
<details>
```
odoo-1 | 2024-10-24 11:20:18,785 42 ERROR odoo odoo.addons.google_calendar.models.res_users: [res.users(2,)] Calendar Synchro - Exception : unsupported property: !
odoo-1 | Traceback (most recent call last):
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[res_users.py](https://res_users.py/)", line 100, in _sync_all_google_calendar
odoo-1 | user.with_user(user).sudo()._sync_google_calendar(google)
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[res_users.py](https://res_users.py/)", line 78, in _sync_google_calendar
odoo-1 | synced_recurrences = self.env['calendar.recurrence'].with_context(write_dates=recurrences_write_dates)._sync_google2odoo(recurrences)
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[google_sync.py](https://google_sync.py/)", line 202, in _sync_google2odoo
odoo-1 | odoo_record.with_context(dont_notify=True)._write_from_google(gevent, vals)
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[calendar_recurrence_rule.py](https://calendar_recurrence_rule.py/)", line 86, in _write_from_google
odoo-1 | current_parsed_rrule = self._rrule_parse(current_rrule, self.dtstart)
odoo-1 | File "/opt/odoo/auto/addons/calendar/models/[calendar_recurrence.py](https://calendar_recurrence.py/)", line 375, in _rrule_parse
odoo-1 | rule = rrule.rrulestr(rule_str, dtstart=date_start)
odoo-1 | File "/usr/local/lib/python3.10/site-packages/dateutil/[rrule.py](https://rrule.py/)", line 1730, in __call__
odoo-1 | return self._parse_rfc(s, **kwargs)
odoo-1 | File "/usr/local/lib/python3.10/site-packages/dateutil/[rrule.py](https://rrule.py/)", line 1698, in _parse_rfc
odoo-1 | raise ValueError("unsupported property: "+name)
odoo-1 | ValueError: unsupported property:
```
</details>
Current behavior before PR: Odoo stops sync of users calendars as long as they have one event with an RRULE like this.
Desired behavior after PR is merged: Odoo keeps working.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
@moduon MT-7215
Forward-Port-Of: odoo/odoo#185089In some theme customizations, images were replaced by new ones without specifying the usual image classes `img img-fluid mx-auto`. While two of them could be ignored, this is not the case of `img-fluid`, which limits the maximum width of an image to 100%. Without it, grid images in mobile view are overflowing, because the rule forcing their width to 100% has been moved in commit [1], to be applied on the desktop view only. This commit fixes this issue by adding a rule for grid images, limitin
Original PR description
In some theme customizations, images were replaced by new ones without specifying the usual image classes `img img-fluid mx-auto`. While two of them could be ignored, this is not the case of `img-fluid`, which limits the maximum width of an image to 100%. Without it, grid images in mobile view are overflowing, because the rule forcing their width to 100% has been moved in commit [1], to be applied on the desktop view only. This commit fixes this issue by adding a rule for grid images, limiting their width to 100%. The problematic themes will also be fixed in the associated design PR. [1]: https://github.com/odoo/odoo/commit/710d000f1872fd99b41d52ec3d6923756bba7cba Forward-Port-Of: odoo/odoo#183013
Before this commit : `is_html_empty` considers empty icons as empty html. After this commit: Empty icons are considered as non empty html Note: changed the tag_re to more performant regex task-4060037 Forward-Port-Of: odoo/odoo#182642
Original PR description
Before this commit : `is_html_empty` considers empty icons as empty html. After this commit: Empty icons are considered as non empty html Note: changed the tag_re to more performant regex task-4060037 Forward-Port-Of: odoo/odoo#182642
How to reproduce: - Create a product P, storable, uom=Units - Create Receipt for 12 units of P, Confirm - Change the operation line from 12 Units to 1 Dozen - Validate Receipt => Valuation layer for 12 Units created (OK) - Unlock Receipt - Change the operation line from 1 to 2 Dozens - Save Receipt => Valuation layer for 1 Unit created (Should be 12) OPW-4204420 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#1848
Original PR description
How to reproduce: - Create a product P, storable, uom=Units - Create Receipt for 12 units of P, Confirm - Change the operation line from 12 Units to 1 Dozen - Validate Receipt => Valuation layer for 12 Units created (OK) - Unlock Receipt - Change the operation line from 1 to 2 Dozens - Save Receipt => Valuation layer for 1 Unit created (Should be 12) OPW-4204420 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184881 Forward-Port-Of: odoo/odoo#182502
Since [1] e-mails from forms are compared to the logged in user's e-mail when a website form is submitted. Because of this forms without e-mail cannot be used anymore when the user is not logged in. This commit removes this comparison for forms that do not contain an e-mail field. Steps to reproduce: - Install website_hr_recruitment - Drop a form into the home page - Set the form action to "Apply for a Job" - Remove the e-mail field - Save - Submit the form => An error occurred
Original PR description
Since [1] e-mails from forms are compared to the logged in user's e-mail when a website form is submitted. Because of this forms without e-mail cannot be used anymore when the user is not logged in. This commit removes this comparison for forms that do not contain an e-mail field. Steps to reproduce: - Install website_hr_recruitment - Drop a form into the home page - Set the form action to "Apply for a Job" - Remove the e-mail field - Save - Submit the form => An error occurred [1]: https://github.com/odoo/odoo/commit/1aa5cbb06be85e94c01f8f55ef57b9415b9bb50f task-4282750 Forward-Port-Of: odoo/odoo#185032
This PR fixes issues linked to the fact that the sliding of carousels is an asynchronous operation. Indeed, the options and the history of the carousels were not taking this into account. - [FIX] website: always set the first carousel slide as the active one - [FIX] website: make the `Carousel` options atomic - [FIX] website: prevent recording sliding of some carousels in history - [FIX] website: add a tour to test the `Carousel` options task-3744613 related to opw-3675019 Forward-Po
Original PR description
This PR fixes issues linked to the fact that the sliding of carousels is an asynchronous operation. Indeed, the options and the history of the carousels were not taking this into account. - [FIX] website: always set the first carousel slide as the active one - [FIX] website: make the `Carousel` options atomic - [FIX] website: prevent recording sliding of some carousels in history - [FIX] website: add a tour to test the `Carousel` options task-3744613 related to opw-3675019 Forward-Port-Of: odoo/odoo#178316 Forward-Port-Of: odoo/odoo#153892
"Tax Receivable" account shouldn't be set as a receivable account, but as a current assets one, else it will appear in aged reports, which does not make sense. Similar to the fix already made here for "Tax Payable": https://github.com/odoo/odoo/commit/2318e671c3a5535590fe6d95949835417856dce6 Forward-Port-Of: odoo/odoo#185141
Original PR description
"Tax Receivable" account shouldn't be set as a receivable account, but as a current assets one, else it will appear in aged reports, which does not make sense. Similar to the fix already made here for "Tax Payable": https://github.com/odoo/odoo/commit/2318e671c3a5535590fe6d95949835417856dce6 Forward-Port-Of: odoo/odoo#185141
Steps to reproduce: ------------------- * Make sure you have atleast 2 companies created * Create atleast one PoS in each company * Go in one of the company settings and look for Trusted Point of sale > Observation: You are able to select the PoS from the other company Why the fix: ------------ Adapt the domain to filter out PoS that are not part of the current company opw-4161351 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Por
Original PR description
Steps to reproduce: ------------------- * Make sure you have atleast 2 companies created * Create atleast one PoS in each company * Go in one of the company settings and look for Trusted Point of sale > Observation: You are able to select the PoS from the other company Why the fix: ------------ Adapt the domain to filter out PoS that are not part of the current company opw-4161351 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184938 Forward-Port-Of: odoo/odoo#184466
Steps to reproduce: 1. Navigate to Pricelists. 2. Import a CSV or XLSX file that contains at least one product or product variant. 3. Duplicate the newly created pricelist. Issue: - When duplicating an imported pricelist, the duplicated record does not retain the product or product variant information. Cause: - If the applied_on field is not provided during the creation of the pricelist item, the default value of 3_global is applied. - As a result, when duplicating the pricelis
Original PR description
Steps to reproduce: 1. Navigate to Pricelists. 2. Import a CSV or XLSX file that contains at least one product or product variant. 3. Duplicate the newly created pricelist. Issue: - When duplicating an imported pricelist, the duplicated record does not retain the product or product variant information. Cause: - If the applied_on field is not provided during the creation of the pricelist item, the default value of 3_global is applied. - As a result, when duplicating the pricelist, the product_tmpl_id and product_id fields are set to None. Fix: - When the applied_on field is missing during the creation of a new pricelist item, set it based on the presence of the relevant fields (such as product or product variant). opw-4170242 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185100
This commit addresses an issue where scanning a product configured for lot/serial tracking would add the product directly to the order without prompting the user for the required serial or lot number. opw-4261671 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184317
Original PR description
This commit addresses an issue where scanning a product configured for lot/serial tracking would add the product directly to the order without prompting the user for the required serial or lot number. opw-4261671 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184317
## Steps: 1- Expenses 2- Settings 3- Employee Expense Journal: all the journals can be selected. It should be only "Purchase" journals. This PR adds a filtering domain to the `expense_journal_id` field to filter out non 'purchase' journals. opw-4251517 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183696
Original PR description
## Steps: 1- Expenses 2- Settings 3- Employee Expense Journal: all the journals can be selected. It should be only "Purchase" journals. This PR adds a filtering domain to the `expense_journal_id` field to filter out non 'purchase' journals. opw-4251517 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183696
Before this commit, capturing orders while offline and then refreshing the browser upon returning online would show the WiFi icon in green, and captured orders would appear in the paid orders list. However, these orders were not yet synced with the backend, leading to confusion for the user. Although pending orders would sync after capturing the first order post-refresh, the initial state upon loading the PoS was misleading. opw-4157460 --- I confirm I have signed the CLA and read the PR
Original PR description
Before this commit, capturing orders while offline and then refreshing the browser upon returning online would show the WiFi icon in green, and captured orders would appear in the paid orders list. However, these orders were not yet synced with the backend, leading to confusion for the user. Although pending orders would sync after capturing the first order post-refresh, the initial state upon loading the PoS was misleading. opw-4157460 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#179505
Since 058212e12b5079eba870bde9775fe98f27928935 Bootstrap's version is 5.3 Many more style is set by CSS Custome properties which wkhtmltopdf does not support This fixes the <hr /> case. opw-4265150 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#185497
Original PR description
Since 058212e12b5079eba870bde9775fe98f27928935 Bootstrap's version is 5.3 Many more style is set by CSS Custome properties which wkhtmltopdf does not support This fixes the <hr /> case. opw-4265150 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#185497
Same issue as https://github.com/odoo/odoo/pull/126323 but with CSV, TXT and other types of files. This basically overrides the default decoding charset of the email python module to use utf-8 by default. As mentioned in the PR above, utf-8 is a superset of the ascii encoding and this should not cause other issues. opw-4237114 opw-4245261 Forward-Port-Of: odoo/odoo#185360 Forward-Port-Of: odoo/odoo#184295
Original PR description
Same issue as https://github.com/odoo/odoo/pull/126323 but with CSV, TXT and other types of files. This basically overrides the default decoding charset of the email python module to use utf-8 by default. As mentioned in the PR above, utf-8 is a superset of the ascii encoding and this should not cause other issues. opw-4237114 opw-4245261 Forward-Port-Of: odoo/odoo#185360 Forward-Port-Of: odoo/odoo#184295
Sometimes when renaming the IoT box, it would instead rename to `localhost.localdomain`. This was due to the script writing to the `/tmp` directory, which sometimes gets full and causes the `/etc/hostname` file to become empty. The fix is simply to bypass using the `/tmp` directory at all in the script. task-4210432 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184843
Original PR description
Sometimes when renaming the IoT box, it would instead rename to `localhost.localdomain`. This was due to the script writing to the `/tmp` directory, which sometimes gets full and causes the `/etc/hostname` file to become empty. The fix is simply to bypass using the `/tmp` directory at all in the script. task-4210432 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184843
Currently, an exception is generated when the user tries to open the UTM link by following steps. - Install 'website_links' (for creating a link tracker). - Go to Link Tracker > New > Fill all details - Set the target URL as 'http://localhost:8069/odoo' - Copy Tracked URL > Open url in incognito mode or new browser error: `ValueError: Expected singleton: res.users()` This is because when we open this type of link, the code line [1] tries to set a cookie, and since we have not log
Original PR description
Currently, an exception is generated when the user tries to open the UTM link by following steps. - Install 'website_links' (for creating a link tracker). - Go to Link Tracker > New > Fill all…
Currently, an exception is generated when the user tries to open the UTM link by following steps. - Install 'website_links' (for creating a link tracker). - Go to Link Tracker > New > Fill all details - Set the target URL as 'http://localhost:8069/odoo' - Copy Tracked URL > Open url in incognito mode or new browser error: `ValueError: Expected singleton: res.users()` This is because when we open this type of link, the code line [1] tries to set a cookie, and since we have not logged in (not even have a dummy user) at the time of checking, the method `has_group` generate an error from line [2] because `self(user)` is required. In the previous version, the `has_group` method did not require self, but after a code refactor with https://github.com/odoo/odoo/commit/cb31d4352c741a5f8a927a65debb8e027e87df22#diff-16e37db365c1ea1f2e6c79aeb60c80f68f1a5c75970e8e3f198eb18af56278ddL1037-L1043, it needed a record in self. This commit will fix the above issue by allowing cookie when its type is required or the request environment has user. [1]- https://github.com/odoo/odoo/blob/871d20d8ffb00737fe8192223385cdad69fe12e1/addons/utm/models/ir_http.py#L21 [2]- https://github.com/odoo/odoo/blob/871d20d8ffb00737fe8192223385cdad69fe12e1/odoo/addons/base/models/res_users.py#L1133 sentry-5281961509 Forward-Port-Of: odoo/odoo#184733
It was previously already done in commit 148810637bf9e7a9cc53338f665ec612221a1ba2 . But in the meantime new modules were added or the 'countries' info were added back to the manifest. Currently the auto_install does not work correctly. E.g. installing `account_reports` and then `l10n_lv` does not automatically install `l10n_lv_reports` (which it should). After this commit the auto_install works again. Forward-Port-Of: odoo/enterprise#72920 Forward-Port-Of: odoo/enterprise#72299
Original PR description
It was previously already done in commit 148810637bf9e7a9cc53338f665ec612221a1ba2 . But in the meantime new modules were added or the 'countries' info were added back to the manifest. Currently the auto_install does not work correctly. E.g. installing `account_reports` and then `l10n_lv` does not automatically install `l10n_lv_reports` (which it should). After this commit the auto_install works again. Forward-Port-Of: odoo/enterprise#72920 Forward-Port-Of: odoo/enterprise#72299
Purpose ======= If there is already a user for a given employee (including a trigram for instance), we should avoid erasing it to the value the employee encodes on the salary configurator. Forward-Port-Of: odoo/enterprise#72799
Original PR description
Purpose ======= If there is already a user for a given employee (including a trigram for instance), we should avoid erasing it to the value the employee encodes on the salary configurator. Forward-Port-Of: odoo/enterprise#72799
To reproduce the issue: 1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the report ; modify the duplicate to: - Make it a variant of the Generic BS - Set its prefix group threshold to 3 4) Ensure at least 3 move lines exist in the same period for the Receivable account 5) Open the Balance Sheet. By default, the Generic one will be shown 6) Switch to the duplica
Original PR description
To reproduce the issue: 1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the…
To reproduce the issue:
1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the report ; modify the duplicate to:
- Make it a variant of the Generic BS
- Set its prefix group threshold to 3 4) Ensure at least 3 move lines exist in the same period for the Receivable account 5) Open the Balance Sheet. By default, the Generic one will be shown 6) Switch to the duplicate you made in 3).
7) Unfold both levels of the Receivable line.
====> Prefix groups aren't used, while the number of move lines reaches the threshold value.
This happens because the variant is opened from the Generic BS. So, options have first been generated and kept in the session for the Generic BS. When openin the variant, it receives the previously generated options as previous_options, and restores the threshold originally defined on the Generic BS.
We don't want to restore the threshold for previous options, so we just remove that code and now always initialize it to the value contained in the apporpriate field when computing the options.
Forward-Port-Of: odoo/enterprise#72822Context: an AccessError is raised while running test `TestAccountMove.test_add_followers_on_post` and having `l10n_pe_edi_pos` installed: ``` odoo.exceptions.AccessError: You are not allowed to access 'Point of Sale Orders' (pos.order) records. This operation is allowed for the following groups: - Inventory/User - Point of Sale/User Contact your administrator to request access if necessary. ``` Reason: commit 3045807f9a318fed810095fc5746c0e7bbdb0063 extended the `_post` method
Original PR description
Context: an AccessError is raised while running test `TestAccountMove.test_add_followers_on_post` and having `l10n_pe_edi_pos` installed: ``` odoo.exceptions.AccessError: You are not allowed to access 'Point of Sale Orders' (pos.order) records. This operation is allowed for the following groups: - Inventory/User - Point of Sale/User Contact your administrator to request access if necessary. ``` Reason: commit 3045807f9a318fed810095fc5746c0e7bbdb0063 extended the `_post` method on `account.move`, and is reading the field `pos_order_ids`. But one may post an invoice without having sufficient security groups to access `pos.order` records (Inventory/User, Point of Sale/User). runbot-102743 Forward-Port-Of: odoo/enterprise#72467
File "/data/build/enterprise/sale_subscription/tests/test_performance.py", line 21, in test_recurring_order_creation_perf with self.assertQueryCount(__system__=2309): File "/usr/lib/python3.12/contextlib.py", line 144, in __exit__ next(self.gen) File "/data/build/odoo/odoo/tests/common.py", line 549, in assertQueryCount self.fail(msg % (login, count, expected, funcname, filename, linenum)) AssertionError: Query count more than expected for user __system__: 2310 > 2309 in te
Original PR description
File "/data/build/enterprise/sale_subscription/tests/test_performance.py", line 21, in test_recurring_order_creation_perf
with self.assertQueryCount(__system__=2309):
File "/usr/lib/python3.12/contextlib.py", line 144, in __exit__
next(self.gen)
File "/data/build/odoo/odoo/tests/common.py", line 549, in assertQueryCount
self.fail(msg % (login, count, expected, funcname, filename, linenum))
AssertionError: Query count more than expected for user __system__: 2310 > 2309 in test_recurring_order_creation_perf at /data/build/enterprise/sale_subscription/tests/test_performance.py:21
One more query has been added recently when all modules are installed.
runbot error: https://runbot.odoo.com/web#id=102953&view_type=form&model=runbot.build.error&menu_id=405&cids=1
Forward-Port-Of: odoo/enterprise#72349Before this commit when dragging a sign item, the initial copy wasn't invisible completely. For example placeholder, dragging arrow were still visible. This commit aims to fix the issue by setting visibility of sign_item_body to be same as parent. Task: 4195899 Forward-Port-Of: odoo/enterprise#70276
Original PR description
Before this commit when dragging a sign item, the initial copy wasn't invisible completely. For example placeholder, dragging arrow were still visible. This commit aims to fix the issue by setting visibility of sign_item_body to be same as parent. Task: 4195899 Forward-Port-Of: odoo/enterprise#70276
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without selecting a month will raise a traceback. Reason: - While calculating the start_date and end_date of the quarterly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.month), year=int(record.year))` If there is no month, then int(record.month) will
Original PR description
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without…
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without selecting a month will raise a traceback. Reason: - While calculating the start_date and end_date of the quarterly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.month), year=int(record.year))` If there is no month, then int(record.month) will return 0 and The month should be between 1 and 12, so it will raise an error. - While calculating the start_date and end_date of the monthly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.quarter), year=int(record.year))` If there is no quarter, then int(record.quarter) will return 0 and The month should be between 1 and 12, so it will raise an error. After this commit: - The start_date and end_date will not be calculated if a month or quarter is not defined for the monthly or quarterly return periods. Traceback - https://pastebin.com/LyKUDrH5 Task-4243468 Forward-Port-Of: odoo/enterprise#72815 Forward-Port-Of: odoo/enterprise#71883
When the date in the modify wizard for assets is changed, the residual_value should be updated to give a better view to the user. As this value is changed, the tests had to be changed accordingly. The gain or loss account is now correctly adapted from the computed value (itself computed on the date) and the Asset Counterpart Account is hidden if there is no gain. task-3981380 Forward-Port-Of: odoo/enterprise#72504 Forward-Port-Of: odoo/enterprise#70277
Original PR description
When the date in the modify wizard for assets is changed, the residual_value should be updated to give a better view to the user. As this value is changed, the tests had to be changed accordingly. The gain or loss account is now correctly adapted from the computed value (itself computed on the date) and the Asset Counterpart Account is hidden if there is no gain. task-3981380 Forward-Port-Of: odoo/enterprise#72504 Forward-Port-Of: odoo/enterprise#70277
Issue: Mail scanners can send HTTP HEAD requests to links contained in emails, which can change the state of a sign request without user action. Steps: - send a sign request - look in mailhog to get the notification mail - copy the link at the bottom of the mail and `curl --head <url>` - the sign request is now ignored opw-4217355 Forward-Port-Of: odoo/enterprise#72423 Forward-Port-Of: odoo/enterprise#72182
Original PR description
Issue: Mail scanners can send HTTP HEAD requests to links contained in emails, which can change the state of a sign request without user action. Steps: - send a sign request - look in mailhog to get the notification mail - copy the link at the bottom of the mail and `curl --head <url>` - the sign request is now ignored opw-4217355 Forward-Port-Of: odoo/enterprise#72423 Forward-Port-Of: odoo/enterprise#72182
Steps ----- 1. Create a deduplication rule for a model with a non-stored company field (e.g. Document). Add a field to the deduplication rules. 2. Run the "Data Merge: Find Duplicate Records" scheduled action. ** ValueError: <class 'psycopg2.errors.UndefinedColumn'>: "column documents_document.company_id does not exist ** Change ----- Handle the case where the company field of the model is not stored but still accessible through its related field in another table. opw-4114062 Forward
Original PR description
Steps ----- 1. Create a deduplication rule for a model with a non-stored company field (e.g. Document). Add a field to the deduplication rules. 2. Run the "Data Merge: Find Duplicate Records" scheduled action. ** ValueError: <class 'psycopg2.errors.UndefinedColumn'>: "column documents_document.company_id does not exist ** Change ----- Handle the case where the company field of the model is not stored but still accessible through its related field in another table. opw-4114062 Forward-Port-Of: odoo/enterprise#72368 Forward-Port-Of: odoo/enterprise#68816
We want to keep the two columns layout when there is no transaction yet. Task-id: 4150010 Forward-Port-Of: odoo/enterprise#72418
Original PR description
We want to keep the two columns layout when there is no transaction yet. Task-id: 4150010 Forward-Port-Of: odoo/enterprise#72418
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the xml on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx/) **Issue:** The validation fails because "Sello" attribute is invalid. **Cause:** A wrong XSLT is used to generate the digital stamp for COA SAT (XML). opw-4209089 Forward
Original PR description
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the xml on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx/) **Issue:** The validation fails because "Sello" attribute is invalid. **Cause:** A wrong XSLT is used to generate the digital stamp for COA SAT (XML). opw-4209089 Forward-Port-Of: odoo/enterprise#72882