Tuesday, February 6, 2024
41 changes · saas-17.1
Resolved issues and error corrections
The Employment Hero module's data cleanup script was updated to match renamed fields from a recent refactor. This prevents inconsistencies when preparing or anonymizing data, with no expected change to day-to-day business workflows.
Original PR description
During the last phase of the refactor in 17.1, the field names were updated but the neutralize script was not, making it inconsistent.
Miscellaneous changes
Since commit [1], which removed jQueryUI for the drag and drop, the history when editing breaks easily. Steps to reproduce: - Drag and drop "Text-Image", save and go back to edit mode. - Click on a column, move it to the right using the arrow and then to the left, still with the arrow. - Undo: no issue, the column went to the right. - Undo: nothing changed => the column should have gone to the left. - Undo: the column goes to the left => there should not be a third undo since we only did
Original PR description
Since commit [1], which removed jQueryUI for the drag and drop, the history when editing breaks easily. Steps to reproduce: - Drag and drop "Text-Image", save and go back to edit mode. - Click on a…
Since commit [1], which removed jQueryUI for the drag and drop, the history when editing breaks easily. Steps to reproduce: - Drag and drop "Text-Image", save and go back to edit mode. - Click on a column, move it to the right using the arrow and then to the left, still with the arrow. - Undo: no issue, the column went to the right. - Undo: nothing changed => the column should have gone to the left. - Undo: the column goes to the left => there should not be a third undo since we only did two changes. - Redo: no issue, the column goes to right. - Redo: nothing changed => the column should have gone to the left. - Nothing to redo anymore => the column never goes to the left again. This happens because with the new drag and drop, an `o_draggable` class is added on the elements when their editor are started, which adds mutations in the history. Even though it does not explicitely add a step, these mutations are well reverted when undoing/redoing (e.g. this is what happens when nothing changes in the steps to reproduce). This commit fixes this history issue by ignoring the mutations linked to the `o_draggable` class. Note that commit [2] already fixed other `o_draggable` class issues. This commit therefore fixes them in a more general way. [1]: https://github.com/odoo/odoo/commit/7594d71ca8610d5947e80f325ccb57abc23c2c76 [2]: https://github.com/odoo/odoo/commit/32a6729dd094d53eb4a653ebb9d69d2b8cbe2390 task-3698536 Forward-Port-Of: odoo/odoo#150687
Add some new members and update old ones with the due date. @Tecnativa Forward-Port-Of: odoo/odoo#152745
Original PR description
Add some new members and update old ones with the due date. @Tecnativa Forward-Port-Of: odoo/odoo#152745
Deleting an account or a plan shouldn't raise errors or provoke errors elsewhere. Since the `analytic_distribution` doesn't have a proper foreign key, an account might be deleted while still being referenced. Because of this the code needs to be defensive everywhere: we can't trust the content of the JSON field. Also, add tests to ensure that we can't delete a plan while the field is still referenced in views. Forward-Port-Of: odoo/odoo#152494
Original PR description
Deleting an account or a plan shouldn't raise errors or provoke errors elsewhere. Since the `analytic_distribution` doesn't have a proper foreign key, an account might be deleted while still being referenced. Because of this the code needs to be defensive everywhere: we can't trust the content of the JSON field. Also, add tests to ensure that we can't delete a plan while the field is still referenced in views. Forward-Port-Of: odoo/odoo#152494
[FIX] *: keep image link and options after image reordering in a gallery *: website Steps to reproduce: - Add an "Images Wall" snippet on the website. - Add a link on the first image. - Add a new image on the wall. -> Problem: the first image does not have a link anymore. When adding an image or reordering the images on a wall, the system re-renders the snippet (see `nomode()`, `masonry()`, `grid()`) by adding each images on the wall structure. The problem is that the system onl
Original PR description
[FIX] *: keep image link and options after image reordering in a gallery *: website Steps to reproduce: - Add an "Images Wall" snippet on the website. - Add a link on the first image. - Add a new…
[FIX] *: keep image link and options after image reordering in a gallery *: website Steps to reproduce: - Add an "Images Wall" snippet on the website. - Add a link on the first image. - Add a new image on the wall. -> Problem: the first image does not have a link anymore. When adding an image or reordering the images on a wall, the system re-renders the snippet (see `nomode()`, `masonry()`, `grid()`) by adding each images on the wall structure. The problem is that the system only takes the images into account and not a possible image wrapped into an anchor. This is now fixed as the system renders the images or the wrapped anchored images returned by `_getImgHolderEls`. The process is a bit different when adding an image or reordering the images of an "Image Gallery" snippet. In this case, the system re-renders the `website.gallery.slideshow` template. The problem here is double: First, the template does not take a possible wrapped anchored image into account. Second, there are only few image attributes that are rendered by the template. This leads to a new problem: - Add an "Image Gallery" snippet on the website. - Add a "Blur" filter on the first image. - Click on "move to next" to move the first image at the second position. -> Problem: the image option does not show the filter and it is now impossible to change some image options such as "Filter", "Shape" and "Quality". To solve those two problems, the images rendered by the `website.gallery.slideshow` template are replaced by the images (or the wrapped anchored images) returned by `_getImgHolderEls`. By doing so, the rendered images have the correct attributes (so the options can be correctly displayed and modified) and they are still correctly anchored. opw-3535829 Forward-Port-Of: odoo/odoo#152365 Forward-Port-Of: odoo/odoo#142669
Resolves the conflict where two shortcuts (alt-c for 'new' and 'create invoice') existed, but only 'new' could be triggered. Updates the shortcut for 'create invoice' to alt-i, ensuring both shortcuts are functional and accessible. task-3628572 Forward-Port-Of: odoo/odoo#146307
Original PR description
Resolves the conflict where two shortcuts (alt-c for 'new' and 'create invoice') existed, but only 'new' could be triggered. Updates the shortcut for 'create invoice' to alt-i, ensuring both shortcuts are functional and accessible. task-3628572 Forward-Port-Of: odoo/odoo#146307
In this commit we add 2 new notification sounds: `error.wav`, `notification.wav`. We replace the old error sound with the new one. The notification sound will be used in the preparation display. Credits: - error sound: https://github.com/akx/Notifications - notification sound: https://m2.material.io/design/sound/sound-resources.html Task: 3705003 https://github.com/odoo/enterprise/pull/55700 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com
Original PR description
In this commit we add 2 new notification sounds: `error.wav`, `notification.wav`. We replace the old error sound with the new one. The notification sound will be used in the preparation display. Credits: - error sound: https://github.com/akx/Notifications - notification sound: https://m2.material.io/design/sound/sound-resources.html Task: 3705003 https://github.com/odoo/enterprise/pull/55700 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152323
The patch method is not thread safe, which is very annoying for SH users for instance. One obvious issue is that during one thread patching the method, other threads will also be impacted and have 100 decimal places for the discount. But it is even worse: * thread A start: original = real_original; new = patchedA * thread B start: original = patchedA; new = patchedB * thread A end: reset original to real_original * thread B end: reset original to patchedA Now at the end of the transac
Original PR description
The patch method is not thread safe, which is very annoying for SH users for instance. One obvious issue is that during one thread patching the method, other threads will also be impacted and have 100 decimal places for the discount. But it is even worse: * thread A start: original = real_original; new = patchedA * thread B start: original = patchedA; new = patchedB * thread A end: reset original to real_original * thread B end: reset original to patchedA Now at the end of the transaction, the original method simply doesn't exist anymore, and we only have one of the patches, which forces a restart of the server to fix it. [opw-3552839](https://www.odoo.com/web#id=3552839&model=project.task) Forward-Port-Of: odoo/odoo#152168 Forward-Port-Of: odoo/odoo#151787
Before this fix, the ORM tried to fetch the `product.template` using the `product.product`'s id when creating a new product tag. This was caused by the `context="{'product_template_id': id}"` attribute on the `product_tag_ids` field in `product_template_form_view` [1]. However, `product_normal_form_view` inherits `product_template_form_view` [2], so `context="{'product_template_id': id}"` ended up assigning a `product.product` id to `product_template_id`. The fix overrides the context attribu
Original PR description
Before this fix, the ORM tried to fetch the `product.template` using the `product.product`'s id when creating a new product tag. This was caused by the `context="{'product_template_id': id}"` attribute on the `product_tag_ids` field in `product_template_form_view` [1]. However, `product_normal_form_view` inherits `product_template_form_view` [2], so `context="{'product_template_id': id}"` ended up assigning a `product.product` id to `product_template_id`.
The fix overrides the context attribute in `product_normal_form_view`.
[1] https://github.com/odoo/odoo/blob/06c4d0363e56a640b2239a17ff32e6681ba78018/addons/product/views/product_views.xml#L85
[2] https://github.com/odoo/odoo/blob/06c4d0363e56a640b2239a17ff32e6681ba78018/addons/product/views/product_views.xml#L387
task-3619625
Forward-Port-Of: odoo/odoo#149502Trying to call the get_lines() method of the stock.traceability.report model was failing using the external API, due to the response containing None values. Making sure that False is returned instead of None fixes this. The XML-RPC client error is the following: TypeError: cannot marshal None unless allow_none is enabled --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147831
Original PR description
Trying to call the get_lines() method of the stock.traceability.report model was failing using the external API, due to the response containing None values. Making sure that False is returned instead of None fixes this. The XML-RPC client error is the following: TypeError: cannot marshal None unless allow_none is enabled --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147831
This commit solves an issue where sample data would be erased when the user switches from a view with no sample data to another that should contain them. This commit also removes unnecessary usage of nextTick in assets loading. Steps to reproduce: - go to project and open one - enter a no match filter and save it as favorite - reload - switch from kanban to calendar view and switch back to kanban - after the fix, sample data should no longer be erased from kanban task-3701143 Forwa
Original PR description
This commit solves an issue where sample data would be erased when the user switches from a view with no sample data to another that should contain them. This commit also removes unnecessary usage of nextTick in assets loading. Steps to reproduce: - go to project and open one - enter a no match filter and save it as favorite - reload - switch from kanban to calendar view and switch back to kanban - after the fix, sample data should no longer be erased from kanban task-3701143 Forward-Port-Of: odoo/odoo#152666 Forward-Port-Of: odoo/odoo#151739
### Steps to reproduce the issue: 1. Open Menu Items 2. Open the form to a menu 3. Select an action type (e.g. ir.actions.report) 4. Select another action type (e.g. ir.actions.act_url) 5. Click on the field next to it 6. Click on "Search More..." 7. The results displayed match the first action type selected (report), not the second (act_url) ### Explanation: `res_model` is initiated in two functions: `useOpenMany2XRecord()` and `useSelectCreate()` in the `setup()` of the `Many2XA
Original PR description
### Steps to reproduce the issue: 1. Open Menu Items 2. Open the form to a menu 3. Select an action type (e.g. ir.actions.report) 4. Select another action type (e.g. ir.actions.act_url) 5. Click on the field next to it 6. Click on "Search More..." 7. The results displayed match the first action type selected (report), not the second (act_url) ### Explanation: `res_model` is initiated in two functions: `useOpenMany2XRecord()` and `useSelectCreate()` in the `setup()` of the `Many2XAutocomplete` class. The value is never updated for as long as this instance of the field exists. ### Suggested fix: Everytime the key changes, a new instance of the field will replace the current one, calling its own `setup()` with the updated values. opw-3628017 Forward-Port-Of: odoo/odoo#151495 Forward-Port-Of: odoo/odoo#147543
Before this commit, we tried to access in javascript the cssRules property of some stylesheets, to parse and display to the user potential css errors, to help him to detect and fix them. [1] Since a recent change [2], people get tracebacks on website pages in odoo.com (without being logged in). The issue comes from the fact that when assets are served via a CDN (which is the case in odoo.com for not logged users), reading the cssRules throws a CORS error. This error is logged in the browse
Original PR description
Before this commit, we tried to access in javascript the cssRules property of some stylesheets, to parse and display to the user potential css errors, to help him to detect and fix them. [1] Since a…
Before this commit, we tried to access in javascript the cssRules property of some stylesheets, to parse and display to the user potential css errors, to help him to detect and fix them. [1] Since a recent change [2], people get tracebacks on website pages in odoo.com (without being logged in). The issue comes from the fact that when assets are served via a CDN (which is the case in odoo.com for not logged users), reading the cssRules throws a CORS error. This error is logged in the browser console. We only spotted the issue since [2], because it delays the moment we access the cssRules property (we wait for translations). Thanks to that, the error service is ready and able to handle errors, and it does display the error in a dialog, which allowed us to detect the issue. To fix the issue, we filter out stylesheets with a different origin. [1] 5e920db3ee25cb9f47ae2c0a98db35c4cda9d60f [2] 332268c724ae269378176b3c000ba4ff733ce5e9 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#152696
Add support for `HALF-EVEN` and `HALF-DOWN` as value for `rounding_method` argument of `float_round()`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152227
Original PR description
Add support for `HALF-EVEN` and `HALF-DOWN` as value for `rounding_method` argument of `float_round()`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152227
New point of sale for the Peruvian localization. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143487
Original PR description
New point of sale for the Peruvian localization. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143487
Google has removed the feature that allowed sitemap submissions. Now, it's standard practice for Google to crawl the /sitemap.xml. This commit permits to show an alert message when the user clicks on the button to submit a sitemap. task-3323849 Forward-Port-Of: odoo/odoo#152547 Forward-Port-Of: odoo/odoo#151972
Original PR description
Google has removed the feature that allowed sitemap submissions. Now, it's standard practice for Google to crawl the /sitemap.xml. This commit permits to show an alert message when the user clicks on the button to submit a sitemap. task-3323849 Forward-Port-Of: odoo/odoo#152547 Forward-Port-Of: odoo/odoo#151972
Ever since 14.0, from PR #45414, there has been a _compute_state function for recalculating the state on holiday_status_id change The reverted commit becomes unnecessary and causes incorrect action buttons to be shown before creation Note: Reverts commit 015f8ecfa863ae2fcca983b6bb21e38577b220e7 from #82552 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152513 Forward-Port-Of: odoo/odoo#150826
Original PR description
Ever since 14.0, from PR #45414, there has been a _compute_state function for recalculating the state on holiday_status_id change The reverted commit becomes unnecessary and causes incorrect action buttons to be shown before creation Note: Reverts commit 015f8ecfa863ae2fcca983b6bb21e38577b220e7 from #82552 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152513 Forward-Port-Of: odoo/odoo#150826
**Steps to reproduce the bug:** - Create a storable product X1: - Route: MTO + buy - Vendor: Azure Interior - BoM: - Type: subcontractor - Subcontractor: Azure interior - Component: any component - Create a MO: - product: P1 - Component: X1, qty: 3 - Confirm the MO - Go to the created PO - Confirm the PO - Go to the picking - receive 2 units of P1 and validate it - create a backorder - Cancel the backorder - Try to update the purc
Original PR description
**Steps to reproduce the bug:**
- Create a storable product X1:
- Route: MTO + buy
- Vendor: Azure Interior
- BoM:
- Type: subcontractor
- Subcontractor: Azure interior
- Component: any component
- Create a MO:
- product: P1
- Component: X1, qty: 3
- Confirm the MO
- Go to the created PO
- Confirm the PO
- Go to the picking
- receive 2 units of P1 and validate it
- create a backorder
- Cancel the backorder
- Try to update the purchased qty in the PO line to 2
**Problem**:
A traceback is triggered: File "/home/odoo/src/odoo/addons/purchase_stock/models/purchase.py", line 542, in _prepare_stock_move_vals
'picking_id': picking.id,
AttributeError: 'bool' object has no attribute 'id'
**Solution**:
When updating the quantity in the purchase order, if no picking requires an update, it is better to avoid creating a new picking and new moves.
opw-3681064
Forward-Port-Of: odoo/odoo#152473With Kenya localization installed Create an invoice Send&Print Issue: The sytem will issue the final pdf before the invoice has been send to the fiscal device, so the legal information is actually missing A solution is to generate a proforma pdf invoice when the legal info is still missing Removing call to `_hook_invoice_document_after_pdf_report_render` as it seems intended to add a legal layer not needed in proforma invoice opw-3599869 Description of the issue/feature this PR add
Original PR description
With Kenya localization installed Create an invoice Send&Print Issue: The sytem will issue the final pdf before the invoice has been send to the fiscal device, so the legal information is actually missing A solution is to generate a proforma pdf invoice when the legal info is still missing Removing call to `_hook_invoice_document_after_pdf_report_render` as it seems intended to add a legal layer not needed in proforma invoice opw-3599869 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#151751 Forward-Port-Of: odoo/odoo#142861
**Steps to reproduce:** - Select a document in activity view to get its preview - Click the archive button => traceback **Before this PR:** The `load` method of 'Activity Model' led to the traceback while attempting to set the domain of params, when none were received. (bug introduced by : 7682286) **After this PR:** This issue is resolved by tweaking the code of `load` method. In case of default params, it now directly sets a domain, instead of trying to add a domain to the one obt
Original PR description
**Steps to reproduce:** - Select a document in activity view to get its preview - Click the archive button => traceback **Before this PR:** The `load` method of 'Activity Model' led to the traceback while attempting to set the domain of params, when none were received. (bug introduced by : 7682286) **After this PR:** This issue is resolved by tweaking the code of `load` method. In case of default params, it now directly sets a domain, instead of trying to add a domain to the one obtained in params. Task : [3704340](https://www.odoo.com/web#id=3704340&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form) Forward-Port-Of: odoo/odoo#152335 Forward-Port-Of: odoo/odoo#151741
Steps to reproduce: - Install Accounting and l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create an invoice: * Customer: [any] (e.g. INMOBILIARIA CVA) * Product: [any product with an UNSPSC Category] - Confirm the invoice - Generate CFDI via "Send & Print" button - Register Payment (Payment Way: Effectivo) - Click on "Update Payments" button - Go to the payment - Force CFDI - Send receipt by email Issue: The CFDI document of the payment is not in t
Original PR description
Steps to reproduce: - Install Accounting and l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create an invoice: * Customer: [any] (e.g. INMOBILIARIA CVA) * Product: [any product with an UNSPSC Category] - Confirm the invoice - Generate CFDI via "Send & Print" button - Register Payment (Payment Way: Effectivo) - Click on "Update Payments" button - Go to the payment - Force CFDI - Send receipt by email Issue: The CFDI document of the payment is not in the attachments of the email as it was in previous versions. Cause: The feature was lost during the refactoring of "l10n_mx_edi" module to not depend on "account_edi" module opw-3678484 Forward-Port-Of: odoo/enterprise#55016
Steps to reproduce: - Select any transfer in barcode App - Click add product to manually edit quantity - Set quantity to 0.0002 - Click on -1 multiple times then +1 Bug: the quantity is displayed with too many precision digits (defaul float) Fix: The addition and subtraction with the +1 / -1 button should be upto the decimal value entered. opw-3551250 Forward-Port-Of: odoo/enterprise#55786 Forward-Port-Of: odoo/enterprise#53378
Original PR description
Steps to reproduce: - Select any transfer in barcode App - Click add product to manually edit quantity - Set quantity to 0.0002 - Click on -1 multiple times then +1 Bug: the quantity is displayed with too many precision digits (defaul float) Fix: The addition and subtraction with the +1 / -1 button should be upto the decimal value entered. opw-3551250 Forward-Port-Of: odoo/enterprise#55786 Forward-Port-Of: odoo/enterprise#53378
This PR addresses two issues in the account_followup module: 1. Corrected the email_from value in emails sent for automatic follow-ups. 2. Fixed the incorrect author attribution displayed in follow-up chatter, accurately reflecting the user who initiated the action. Each commit resolves a specific issue. Forward-Port-Of: odoo/enterprise#55696 Forward-Port-Of: odoo/enterprise#55376
Original PR description
This PR addresses two issues in the account_followup module: 1. Corrected the email_from value in emails sent for automatic follow-ups. 2. Fixed the incorrect author attribution displayed in follow-up chatter, accurately reflecting the user who initiated the action. Each commit resolves a specific issue. Forward-Port-Of: odoo/enterprise#55696 Forward-Port-Of: odoo/enterprise#55376
**Current behavior:** Changing the language of the database does not translate the operation_type field in the stock.report model's views. --- **Expected behavior:** The field operation_type gets translated in the stock.report model's views. --- **Steps to reproduce:** 1. In the Inventory application, use the menu bar to navigate to 'Reporting' -> 'Warehouse Analysis' 2. Change the database/user language to something non-English 3. Issue can be observed in the pivot v
Original PR description
**Current behavior:** Changing the language of the database does not translate the operation_type field in the stock.report model's views. --- **Expected behavior:** The field operation_type gets translated in the stock.report model's views. --- **Steps to reproduce:** 1. In the Inventory application, use the menu bar to navigate to 'Reporting' -> 'Warehouse Analysis' 2. Change the database/user language to something non-English 3. Issue can be observed in the pivot view (first column) --- **Cause of the issue:** The stock.report model stores the operation_type field as a Char field type. --- **Fix:** Add an operation_type_id (M2o) field and use it to replace all references to the old operation_type field. --- opw-3663227 Forward-Port-Of: odoo/enterprise#55907 Forward-Port-Of: odoo/enterprise#53802
When increasing an asset with constant periods, we get an error on increase asset validation, due to the asset lifetime days being wrongly computed. Steps: - Asset configuration: - Original value: 1200 - Acquisition date: 10/01/2023 - Method: linear - Duration: 12 Months - Computaion: Constant Periods - Confirm asset - Modify it: action 'modify' and date 01/15/2024 - Validate -> UserError("The remaining value on the last depreciation line must be 0") This is due to the fact that the fiel
Original PR description
When increasing an asset with constant periods, we get an error
on increase asset validation, due to the asset lifetime days
being wrongly computed.
Steps:
- Asset configuration:
- Original value: 1200
- Acquisition date: 10/01/2023
- Method: linear
- Duration: 12 Months
- Computaion: Constant Periods
- Confirm asset
- Modify it: action 'modify' and date 01/15/2024
- Validate
-> UserError("The remaining value on the last depreciation line must be
0")
This is due to the fact that the field `asset_lifetime_days` is an
Integer field and it is computed to satisfy this constraint.
With this commit we change this field (non stored) from Integer
to Float and adapt its computation.
opw-3691191
Forward-Port-Of: odoo/enterprise#55648On the tax report, a banner can be displayed if there exist some draft moves for the selected period. We don't want the banner to appear if the only draft move is a closing entry. The goal of the banner is indeed to warn the user if he still needs to pay attention to draft invoices/entries that might impact the report. We therefore exclude all closing entries from draft moves search. A bit of refactoring was necessary to only apply the logic to tax reports. A limit=1 has also been added on the s
Original PR description
On the tax report, a banner can be displayed if there exist some draft moves for the selected period. We don't want the banner to appear if the only draft move is a closing entry. The goal of the banner is indeed to warn the user if he still needs to pay attention to draft invoices/entries that might impact the report. We therefore exclude all closing entries from draft moves search. A bit of refactoring was necessary to only apply the logic to tax reports. A limit=1 has also been added on the search_count to improve performances. task-3682431 Forward-Port-Of: odoo/enterprise#55573 Forward-Port-Of: odoo/enterprise#55167
In this commit we add a sound notification for incoming orders. Task: 3705003 https://github.com/odoo/odoo/pull/152323 Forward-Port-Of: odoo/enterprise#55700
Original PR description
In this commit we add a sound notification for incoming orders. Task: 3705003 https://github.com/odoo/odoo/pull/152323 Forward-Port-Of: odoo/enterprise#55700
Previously, we were always returning a box in the validation request, even when no box was clicked by the user. Now, the box will only be part of the request if it was indeed clicked by the user and that its text matches the text of the field. This has little impact on the learning of the AI model as it was mostly relying on the text of the validated value, not its box. Forward-Port-Of: odoo/enterprise#55783 Forward-Port-Of: odoo/enterprise#55643
Original PR description
Previously, we were always returning a box in the validation request, even when no box was clicked by the user. Now, the box will only be part of the request if it was indeed clicked by the user and that its text matches the text of the field. This has little impact on the learning of the AI model as it was mostly relying on the text of the validated value, not its box. Forward-Port-Of: odoo/enterprise#55783 Forward-Port-Of: odoo/enterprise#55643
Step to reproduce: - have two products - add one quant of each in the same package - create a out stock move - scan 1 item - scan the package Issue: A high volume of product arrivals with multiple barcodes per item can lead to occasional errors in scanning the wrong barcode (package). Time consuming to redo everything. Solution: Whenever one or multiple item have already been scanned, we ask the user a confirmation if they scan a package barcode. opw-3610819 Forward-Port-Of: odo
Original PR description
Step to reproduce: - have two products - add one quant of each in the same package - create a out stock move - scan 1 item - scan the package Issue: A high volume of product arrivals with multiple barcodes per item can lead to occasional errors in scanning the wrong barcode (package). Time consuming to redo everything. Solution: Whenever one or multiple item have already been scanned, we ask the user a confirmation if they scan a package barcode. opw-3610819 Forward-Port-Of: odoo/enterprise#55748 Forward-Port-Of: odoo/enterprise#54389
Before this commit, when the load is slow and the user does not wait the load method be executed and launches another search, the section, row and column ids could be altered by the both load are currently executed (the current one and the previous one whom is not yet finished). The problem with that is the section, row and column id is a global variable in the file and so the id is incremented by the both loads once a section, row or column is created and so the user could see a big gap between
Original PR description
Before this commit, when the load is slow and the user does not wait the load method be executed and launches another search, the section, row and column ids could be altered by the both load are currently executed (the current one and the previous one whom is not yet finished). The problem with that is the section, row and column id is a global variable in the file and so the id is incremented by the both loads once a section, row or column is created and so the user could see a big gap between the grid header and his first result displayed because the row id could be for instance 21 instead of 1. This commit fixes the issue by removing the global variable and define the attributes to increment for section, row and column id into `GridDataPoint` to be sure the id will only be incremented by only one load. Forward-Port-Of: odoo/enterprise#55361
When the user tries to send a conversational WhatsApp message, it fails saying that the phone number is blacklisted. Problem:- By default, the archived records are not searched in `.search()` unless `active_test` is given `False` in context. Here while searching blacklisted numbers in `_send_message`, the `False` value is obtained for `active_test` in context due to which archived blacklisted numbers are also being searched. This context is obtained from the `mail_message_post` controller.
Original PR description
When the user tries to send a conversational WhatsApp message, it fails saying that the phone number is blacklisted. Problem:- By default, the archived records are not searched in `.search()` unless `active_test` is given `False` in context. Here while searching blacklisted numbers in `_send_message`, the `False` value is obtained for `active_test` in context due to which archived blacklisted numbers are also being searched. This context is obtained from the `mail_message_post` controller. https://github.com/odoo/odoo/blob/46d94c4bdaec287615e47aac6597f36f498cf8de/addons/mail/controllers/thread.py#L96 Solution:- We will forcefully pass the `active_test` with `True` while searching blacklisted phone numbers. Due to this archived records will not be searched and it will let the user send the WhatsApp message using the discuss channel. Task - 3698511 Forward-Port-Of: odoo/enterprise#55399
This commit removes wrong _description overrides on analytic line models. Closes odoo/enterprise#54492 Forward-Port-Of: odoo/enterprise#54492
Original PR description
This commit removes wrong _description overrides on analytic line models. Closes odoo/enterprise#54492 Forward-Port-Of: odoo/enterprise#54492
Sending a CANCEL request while a SIP session is being established will result in a 487 Request Terminated response to the pending INVITE request. Prior to this commit, cancelling a SIP session would cause the session to be deleted twice: once immediately after the CANCEL request was sent, then a second time after the response to the INVITE request was received, resulting in a crash the second time because the session had already been deleted. After this commit, 487 Request Terminated respo
Original PR description
Sending a CANCEL request while a SIP session is being established will result in a 487 Request Terminated response to the pending INVITE request. Prior to this commit, cancelling a SIP session would cause the session to be deleted twice: once immediately after the CANCEL request was sent, then a second time after the response to the INVITE request was received, resulting in a crash the second time because the session had already been deleted. After this commit, 487 Request Terminated responses are ignored, preventing the code from attempting to delete the already deleted session and causing a crash. opw-3702140 Forward-Port-Of: odoo/enterprise#55842
Following commit 1b2977811516cce4830ceaf1a7585c8f7061243a we now send the stock inventory for all the products linked to an Amazon offer. At the time, it was decided to send FBA and FBM updates at the same time because: - The Amazon documentation didn't say anything about it - It avoided the problem of a strange configuration of the customer where a product in FBM could be placed in the Amazon location, as nothing ensure that everything placed there is, indeed, a FBA product, even if this is t
Original PR description
Following commit 1b2977811516cce4830ceaf1a7585c8f7061243a we now send the stock inventory for all the products linked to an Amazon offer. At the time, it was decided to send FBA and FBM updates at…
Following commit 1b2977811516cce4830ceaf1a7585c8f7061243a we now send the stock inventory for all the products linked to an Amazon offer. At the time, it was decided to send FBA and FBM updates at the same time because: - The Amazon documentation didn't say anything about it - It avoided the problem of a strange configuration of the customer where a product in FBM could be placed in the Amazon location, as nothing ensure that everything placed there is, indeed, a FBA product, even if this is the recommended setting. - After testing the synchronization of the FBM stock, we couldn't see any changes in the Amazon backend, which lead us to think that we couldn't, in fact, update the stock of a FBA product as Amazon would ensure the stock used would be the one in their warehouse. Recently, we got some problem with FBA order that Amazon considered being FBM. After investigation, it was found that the stock send for FBA would be set as having a "DEFAULT" fulfilment channel, but this wasn't shown anywhere on Amazon backend, only in their DB. So from time to time, instead of using the set fulfilment channel of a product, Amazon would use that default one, with a separate, virtual, stock. With this fix, we ensure that this "default" channel is now filled with a quantity of 0 instead, for FBA product. We assume the set-up of the Amazon account on Odoo is correctly made and all products in the Amazon location are FBA. task-3693853 Forward-Port-Of: odoo/enterprise#54737
Since odoo/odoo@f0cb56f3651da487c1f4fe34adc25e7401678703 we check rules domains. This has the side effect of making rules in data_merge fail because they may pertain models that are yet to be loaded by the ORM. Steps to reproduce: 1. Install `crm` and `data_merge` on a new DB 2. Run data merge for `crm.leads` Data Cleaning > Configuration > Deduplication Rules > Lead/Opportunity > DEDUPLICATE 3. Try to install data_merge module `./odoo-bin ... -i data_merge` We get a `ParseError`: ```
Original PR description
Since odoo/odoo@f0cb56f3651da487c1f4fe34adc25e7401678703 we check rules domains. This has the side effect of making rules in data_merge fail because they may pertain models that are yet to be loaded…
Since odoo/odoo@f0cb56f3651da487c1f4fe34adc25e7401678703 we check rules domains. This has the side effect of making rules in data_merge fail because they may pertain models that are yet to be loaded by the ORM.
Steps to reproduce:
1. Install `crm` and `data_merge` on a new DB
2. Run data merge for `crm.leads` Data Cleaning > Configuration > Deduplication Rules > Lead/Opportunity > DEDUPLICATE
3. Try to install data_merge module `./odoo-bin ... -i data_merge`
We get a `ParseError`:
```
...
File "/home/odoo/src/odoo/15.0/odoo/tools/convert.py", line 694, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
odoo.tools.convert.ParseError: while parsing /home/odoo/src/enterprise/15.0/data_merge/security/security.xml:4
Invalid domain: 'crm.lead'
```
This issue happens during upgrades 14.0->15.0
The actual reason for the failure is that this line https://github.com/odoo/odoo/blob/dbd37953957b94a2e05908d96cf8e4d7dea42d72/odoo/addons/base/models/ir_rule.py#L79 eventually gets into
https://github.com/odoo/enterprise/blob/0db3d7c9473034da0714f96fe915a7dedb7b667e/data_merge/models/data_merge_record.py#L101 and this causes a `KeyError` because `crm.lead` is not loaded yet.
This error didn't happen before because at XML load there was no attempt to generate a `Query` from a domain expression. After the linked commit above we now force the parse of such queries. That involves the call to `_search_company_id` for `data_merge.record` entries.
The patch proposed here skips `ValidationError`s at install of `data_merge`. This still keeps the validation active for usual DB operations.
X-original-commit: 5a64974501b5be231e2eed941f42ae6dfe110f18
Forward-Port-Of: odoo/enterprise#55847This traceback arises when a user tries to unlink multiple records Steps to produce 1. Install `approvals` 2. Open `approvals/manager/all approvals` 3. Select multiple records then delete them. Error: ``` ValueError: too many values to unpack (expected 1) File "odoo/models.py", line 5837, in ensure_one _id, = self._ids ValueError: Expected singleton: approval.request(9, 8) File "odoo/http.py", line 2150, in __call__ response = request._serve_db() File "odoo/ht
Original PR description
This traceback arises when a user tries to unlink multiple records Steps to produce 1. Install `approvals` 2. Open `approvals/manager/all approvals` 3. Select multiple records then delete them.…
This traceback arises when a user tries to unlink multiple records
Steps to produce
1. Install `approvals`
2. Open `approvals/manager/all approvals`
3. Select multiple records then delete them.
Error:
```
ValueError: too many values to unpack (expected 1)
File "odoo/models.py", line 5837, in ensure_one
_id, = self._ids
ValueError: Expected singleton: approval.request(9, 8)
File "odoo/http.py", line 2150, in __call__
response = request._serve_db()
File "odoo/http.py", line 1722, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1749, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1953, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/17.0/approvals/models/approval_request.py", line 113, in unlink
if self.has_product:
File "odoo/fields.py", line 1148, in __get__
record.ensure_one()
File "odoo/models.py", line 5840, in ensure_one
```
When the user tries to delete multiple records traceback will be generated because it tries to unlink a record instead of calling the entire record set.
which leads to the traceback from here
https://github.com/odoo/enterprise/blob/1551fc9de63706944dffb3d5e57c88482b214a46/approvals/models/approval_request.py#L96-L105
After applying this commit we will resolve the issue by filtering the records and then unlinking the record set.
sentry-4916651369
Forward-Port-Of: odoo/enterprise#55719
Forward-Port-Of: odoo/enterprise#55412Backport of https://github.com/odoo/enterprise/pull/48385 Forward-Port-Of: odoo/enterprise#55718 Forward-Port-Of: odoo/enterprise#55444
Original PR description
Backport of https://github.com/odoo/enterprise/pull/48385 Forward-Port-Of: odoo/enterprise#55718 Forward-Port-Of: odoo/enterprise#55444
With an Ecuador company setup Create and post a bill Hit 'Add witholding' On the witholding line change the withholding tax Issue: base will reset to 0 opw-3690401 Forward-Port-Of: odoo/enterprise#54913
Original PR description
With an Ecuador company setup Create and post a bill Hit 'Add witholding' On the witholding line change the withholding tax Issue: base will reset to 0 opw-3690401 Forward-Port-Of: odoo/enterprise#54913
Fix a decimal issue on reconciliation. Steps: - Set a reconciliation model with payment tolerance of 2% - Create an invoice for $1210 - Create a bank stmt with a line for $1185.80 -> Reconciliation model is not apply This is because of a decimal issue when calculating the residual balance after reconciliation, leading to the difference being 2.000000000000004% instead of 2%. opw-3672092 Forward-Port-Of: odoo/enterprise#55615
Original PR description
Fix a decimal issue on reconciliation. Steps: - Set a reconciliation model with payment tolerance of 2% - Create an invoice for $1210 - Create a bank stmt with a line for $1185.80 -> Reconciliation model is not apply This is because of a decimal issue when calculating the residual balance after reconciliation, leading to the difference being 2.000000000000004% instead of 2%. opw-3672092 Forward-Port-Of: odoo/enterprise#55615
Steps to Produce: - Navigate to the 'Project' form view on a mobile device. - Go to the 'Documents & Analytics' section in the 'Default Tags.' - When you try to create new tags in the 'Category' field, observe that it shows existing tags. Issue: - 'name_search' is not work for kanban view of mobile. Solution: - To resolve the issue, we need to add the missing domain to the 'facet_id' field. task-3549328 Forward-Port-Of: odoo/enterprise#55825 Forward-Port-Of: odoo/enterprise#49586
Original PR description
Steps to Produce: - Navigate to the 'Project' form view on a mobile device. - Go to the 'Documents & Analytics' section in the 'Default Tags.' - When you try to create new tags in the 'Category' field, observe that it shows existing tags. Issue: - 'name_search' is not work for kanban view of mobile. Solution: - To resolve the issue, we need to add the missing domain to the 'facet_id' field. task-3549328 Forward-Port-Of: odoo/enterprise#55825 Forward-Port-Of: odoo/enterprise#49586
This PR addresses a traceback issue in the l10n_in_reports_gstr module when attempting to match data without existing JSON. The fix includes the implementation of error handling to display a user-friendly message when JSON data is not available. Forward-Port-Of: odoo/enterprise#54007
Original PR description
This PR addresses a traceback issue in the l10n_in_reports_gstr module when attempting to match data without existing JSON. The fix includes the implementation of error handling to display a user-friendly message when JSON data is not available. Forward-Port-Of: odoo/enterprise#54007