Tuesday, November 19, 2024
22 changes · saas-17.2
Miscellaneous changes
**Steps to reproduce the bug:** - Create a tracked product by SN: “P1.” - Create a storable product: "P2." - Create a receipt for one unit of P1 and P2. - Mark it as "To Do." - Set the done quantity of P1 to 0. - Attempt to perform the quality check. **Problem:** You must perform a quality check for P1 even though it has yet to be received. Since the move_line is set to 0 rather than deleted in the original picking, it will be linked to the backorder when it is created. Therefore,
Original PR description
**Steps to reproduce the bug:** - Create a tracked product by SN: “P1.” - Create a storable product: "P2." - Create a receipt for one unit of P1 and P2. - Mark it as "To Do." - Set the done quantity of P1 to 0. - Attempt to perform the quality check. **Problem:** You must perform a quality check for P1 even though it has yet to be received. Since the move_line is set to 0 rather than deleted in the original picking, it will be linked to the backorder when it is created. Therefore, to avoid unexpected behavior we can ignore linking its quality check to the backorder. https://github.com/odoo/odoo/blob/00057f8efd3c728e13a981290a725878e058d2c6/addons/stock/models/stock_picking.py#L832 opw-4187521 Forward-Port-Of: odoo/enterprise#73407
Some strings weren't translatable/were missing from the pot files to be translated. Since these strings weren't translatable (i.e. no lost work), they have been updated to be more grammatically correct + understandable where useful. opw-4321317 Forward-Port-Of: odoo/enterprise#73854
Original PR description
Some strings weren't translatable/were missing from the pot files to be translated. Since these strings weren't translatable (i.e. no lost work), they have been updated to be more grammatically correct + understandable where useful. opw-4321317 Forward-Port-Of: odoo/enterprise#73854
Forward-Port-Of: odoo/enterprise#73692 Forward-Port-Of: odoo/enterprise#72823
Original PR description
Forward-Port-Of: odoo/enterprise#73692 Forward-Port-Of: odoo/enterprise#72823
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which can lead to issues when validating the batch. ## Steps to reproduce: - Create a payment (posted but not sent) SEPA transfer. - Select this payment and create batch payment. - validate the batch - Open payments list again, and select that same payment, then create a batch payment from the se
Original PR description
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which…
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which can lead to issues when validating the batch. ## Steps to reproduce: - Create a payment (posted but not sent) SEPA transfer. - Select this payment and create batch payment. - validate the batch - Open payments list again, and select that same payment, then create a batch payment from the selection. - a new batch payment will be created. - If you open the batch payments list you'll notice 2 batches: 1. the original batch now has no payments inside it so the "re-generate Export File" button won't show up. 2. the second batch now contains the payment, but we can't re-generate the export file because it shows an error: The batch could not be validated, Some payments have already been sent. Solution: - before creating a batch with payments or adding payments to a batch we check if the payments we are adding are already in a batch. OPW-3976563 Forward-Port-Of: odoo/enterprise#72646 Forward-Port-Of: odoo/enterprise#67315
When a whatsapp conversation is inactive after 1 day, they are automatically unpinned as long as user has seen all the messages. However, if the user never reads them, these whatsapp conversations keep being added to the pinned list of conversations, which adds more and more loads on Discuss fetched data over time. There is a practical limit of around 2000 pinned conversations, after which Discuss is very slow and hardly usable. This is a known limitation with the current implementation.
Original PR description
When a whatsapp conversation is inactive after 1 day, they are automatically unpinned as long as user has seen all the messages. However, if the user never reads them, these whatsapp conversations…
When a whatsapp conversation is inactive after 1 day, they are automatically unpinned as long as user has seen all the messages. However, if the user never reads them, these whatsapp conversations keep being added to the pinned list of conversations, which adds more and more loads on Discuss fetched data over time. There is a practical limit of around 2000 pinned conversations, after which Discuss is very slow and hardly usable. This is a known limitation with the current implementation. Whatsapp conversations usually involved many operators for a given conversation, even though usually a single operator is actively communicating with the whatsapp customer. This means that all the inactive operators are keeping many unread whatsapp conversations, thus lots of whatsapp conversations stay unpinned. This commit fixes the issue by forcing unpinning inactive whatsapp conversations after 2 weeks, regardless of whether current user has read the conversation or not. Most of the time whatsapp conversations are short-lived conversations, therefore after 2 weeks this is almost guarantee that there's no point keeping this conversation pinned. opw-4331007 Forward-Port-Of: odoo/enterprise#73923
The view `stock_move_line_product_selector_inherit` had no priority set and so had the default one, which means when we want to display the `stock.move.line` form view, it could happen this one is displayed instead, which is not wanted and causes traceback. task-4329041 Forward-Port-Of: odoo/enterprise#73893
Original PR description
The view `stock_move_line_product_selector_inherit` had no priority set and so had the default one, which means when we want to display the `stock.move.line` form view, it could happen this one is displayed instead, which is not wanted and causes traceback. task-4329041 Forward-Port-Of: odoo/enterprise#73893
Add `Bonus` input type to `United States Regular Pay Salary Structure`. Use `Expenses` and `Bonus` input types in the computation of payslips. * Expenses: * Allows users to include expenses (added automatically from the Expenses app) into the salary calculation when using the Structure Type "United States: Regular Pay". The rule is placed post taxes in the structure. * Bonus: * Add an Input type in "hr.payslip.input.type" called `Bonus`. * "Bonus" allows users to add an e
Original PR description
Add `Bonus` input type to `United States Regular Pay Salary Structure`.
Use `Expenses` and `Bonus` input types in the computation of payslips.
* Expenses:
* Allows users to include expenses (added automatically from the Expenses app) into the salary calculation when using the Structure Type "United States: Regular Pay". The rule is placed post taxes in the structure.
* Bonus:
* Add an Input type in "hr.payslip.input.type" called `Bonus`.
* "Bonus" allows users to add an extra source of income for employees that have associated the "United States: Regular Pay" Structure type in their payslip. The rule is placed pre-taxes in the structure, it is a taxable amount.
task-4097635
Forward-Port-Of: odoo/enterprise#68530test_sync_pickings depends on street value, which does not exist in no-demo mode, thus breaking tests. This commit fixes the issue. [broken test](https://runbot.odoo.com/web#id=73283&view_type=form&model=runbot.build.error&menu_id=405&cids=1) Forward-Port-Of: odoo/enterprise#73041
Original PR description
test_sync_pickings depends on street value, which does not exist in no-demo mode, thus breaking tests. This commit fixes the issue. [broken test](https://runbot.odoo.com/web#id=73283&view_type=form&model=runbot.build.error&menu_id=405&cids=1) Forward-Port-Of: odoo/enterprise#73041
Forward-Port-Of: odoo/enterprise#73901
Original PR description
Forward-Port-Of: odoo/enterprise#73901
Before this commit, a rtcSession was required to display the connection state. Which meant that the receiving end of a peer-to-peer offer was not displaying the connection state until the offer was received, which was hiding early connection issues (pre-offer) like missing bus messages. Forward-Port-Of: odoo/odoo#186788
Original PR description
Before this commit, a rtcSession was required to display the connection state. Which meant that the receiving end of a peer-to-peer offer was not displaying the connection state until the offer was received, which was hiding early connection issues (pre-offer) like missing bus messages. Forward-Port-Of: odoo/odoo#186788
Steps to reproduce: 1. Go to website --> forum 2. Click on "New Post," add a title/description, and post the question. 3. A pop-up appears --> close the pop-up. 4. Enter edit mode, resulting in a traceback. Before this fix, the `publicWidget` responsible for attaching the modal in DOM was bound to the `body` element, which led to the removal of the `body` on `widget_stop_request` when trying to open the editor. This commit addresses the issue by creating a dummy element to bind the `Fo
Original PR description
Steps to reproduce: 1. Go to website --> forum 2. Click on "New Post," add a title/description, and post the question. 3. A pop-up appears --> close the pop-up. 4. Enter edit mode, resulting in a traceback. Before this fix, the `publicWidget` responsible for attaching the modal in DOM was bound to the `body` element, which led to the removal of the `body` on `widget_stop_request` when trying to open the editor. This commit addresses the issue by creating a dummy element to bind the `ForumShare` publicWidget instead of the `body`, preventing its removal. Additionally, an event listener has been added to remove the modal from the DOM after it's closed, ensuring no further issues during the editor opening process. task-3834378 Forward-Port-Of: odoo/odoo#187379 Forward-Port-Of: odoo/odoo#181643
Partner was not created during import because `bank_details` was an iterator instead of a list/collection. So once it was consummed for the search, nothing was created. Moreover, this function is called in the context of a file import which may have a default journal_id which is not the same as the journal of the partner. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187464 Forward-Port-Of: odoo/odoo#187415
Original PR description
Partner was not created during import because `bank_details` was an iterator instead of a list/collection. So once it was consummed for the search, nothing was created. Moreover, this function is called in the context of a file import which may have a default journal_id which is not the same as the journal of the partner. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187464 Forward-Port-Of: odoo/odoo#187415
Problem: If the product image size is smaller than `$o-form-picture-size` or is an SVG without intrinsic size, it uses the original image size or displays as 0px in the case of SVGs without intrinsic size. The desired behavior is for the image to always display at `$o-form-picture-size`. Steps to reproduce: - Add a small or SVG image without intrinsic size to a product. - The image will not display correctly. opw-4119433 --- I confirm I have signed the CLA and read the PR guidelin
Original PR description
Problem: If the product image size is smaller than `$o-form-picture-size` or is an SVG without intrinsic size, it uses the original image size or displays as 0px in the case of SVGs without intrinsic size. The desired behavior is for the image to always display at `$o-form-picture-size`. Steps to reproduce: - Add a small or SVG image without intrinsic size to a product. - The image will not display correctly. opw-4119433 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#178526
opw-4325300 Forward-Port-Of: odoo/odoo#187407 Forward-Port-Of: odoo/odoo#187285
Original PR description
opw-4325300 Forward-Port-Of: odoo/odoo#187407 Forward-Port-Of: odoo/odoo#187285
The function _validate_accounting_entries is notorious for not using proper batching which results in a lot of SQL queries. Originally, it had to iterate individual svls and invoke functions in an unbatched way, even when all svls belonged to the same product. The changes here are to use as much batching as possible and enforcing the use of prefetch_ids to lower the total number of queries. Benchmarks: |no. queries before| no. queries after | total time before | total time after| |-----|-
Original PR description
The function _validate_accounting_entries is notorious for not using proper batching which results in a lot of SQL queries. Originally, it had to iterate individual svls and invoke functions in an unbatched way, even when all svls belonged to the same product. The changes here are to use as much batching as possible and enforcing the use of prefetch_ids to lower the total number of queries. Benchmarks: |no. queries before| no. queries after | total time before | total time after| |-----|-----|------|-----| |95991|83352|1.59 min|1.48 min| opw-4283347 opw-4096108 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186434
**Issue:** An employee can't modify a `Payment Method` (other than "Manual" on a new payment entry). **Expected:** An employee should be able to change the payment provider to register a customer payment. **Steps to reproduce:** - Activate Accounting app and go to Configuration > Online Payments > Payment Providers; - Install any of these providers, configure it, activate the test mode and publish it; - Go to Customers Payments > Payments; - Open or create a payement record; - Try t
Original PR description
**Issue:** An employee can't modify a `Payment Method` (other than "Manual" on a new payment entry). **Expected:** An employee should be able to change the payment provider to register a customer payment. **Steps to reproduce:** - Activate Accounting app and go to Configuration > Online Payments > Payment Providers; - Install any of these providers, configure it, activate the test mode and publish it; - Go to Customers Payments > Payments; - Open or create a payement record; - Try to change the Payment Method field for . **Cause:** No rights have been given to users on the payment provider data lookup. https://github.com/odoo/odoo/blob/18.0/addons/payment/security/ir.model.access.csv **Fix:** Give temporary rights on payment provider token lookup. opw-4270781 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186890
Previously, the l10n_id_kode_transaksi field was invisible on the invoice form view. This is because the xpath was incorrectly done. This solution is inspired to what is already done in 18.0. Steps to reproduce: - Install l10n_id_efaktur - Select ID company - Create an Indonesian customer with a VAT number, and select boolean field PKP - Create an invoice, select this customer, and add a line with a tax -> the field below Customer has no display name, but the value is visible
Original PR description
Previously, the l10n_id_kode_transaksi field was invisible on the invoice form view. This is because the xpath was incorrectly done. This solution is inspired to what is already done in 18.0. Steps to reproduce: - Install l10n_id_efaktur - Select ID company - Create an Indonesian customer with a VAT number, and select boolean field PKP - Create an invoice, select this customer, and add a line with a tax -> the field below Customer has no display name, but the value is visible opw-4315901 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187294
fiscalyear_last_day and fiscalyear_last_month can be defined in order to use fiscal years not aligned on the civil calendar. In enterprise, it works fine (it's overridden there to add functionalities), however, community forgot to make use of these fields, even though they are declared in it. Forward-Port-Of: odoo/odoo#187451 Forward-Port-Of: odoo/odoo#187250
Original PR description
fiscalyear_last_day and fiscalyear_last_month can be defined in order to use fiscal years not aligned on the civil calendar. In enterprise, it works fine (it's overridden there to add functionalities), however, community forgot to make use of these fields, even though they are declared in it. Forward-Port-Of: odoo/odoo#187451 Forward-Port-Of: odoo/odoo#187250
## Problem: When generating sorting URLs, the `post` dictionary only contains a single selected attribute. This is due to `request.params` only passing the first `attrib` parameter during dispatch, even though there can be multiple. ## Solution: Modify the `post` dictionary to store attributes as a list before passing it to the `_shop_get_query_url_kwargs` method. This ensures that all selected attributes are preserved and properly passed to the `keep` query parameters. ## Steps to repro
Original PR description
## Problem: When generating sorting URLs, the `post` dictionary only contains a single selected attribute. This is due to `request.params` only passing the first `attrib` parameter during dispatch, even though there can be multiple. ## Solution: Modify the `post` dictionary to store attributes as a list before passing it to the `_shop_get_query_url_kwargs` method. This ensures that all selected attributes are preserved and properly passed to the `keep` query parameters. ## Steps to reproduce: - Go to `/shop`. - Apply multiple attribute filters (ensure more than one attribute is selected). - Change the sorting option. - Only the first selected attribute is applied in the filter. opw-4244895 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186982 Forward-Port-Of: odoo/odoo#183927
Current behaviour: --- On Knowledge, when multiple people are looking at the same page, if one of them deletes the end of a sentence, the others have a traceback. Steps to reproduce: --- 1. Install knowledge 2. On one browser tab, connect admin 3. On another, connect demo 4. With admin, go to knowledge 5. Create a page in workspace 6. In Share, change visibility to everyone 7. With demo, join the page 8. With admin, write a long word 9. Place both cursors at the end of the word
Original PR description
Current behaviour: --- On Knowledge, when multiple people are looking at the same page, if one of them deletes the end of a sentence, the others have a traceback. Steps to reproduce: --- 1. Install knowledge 2. On one browser tab, connect admin 3. On another, connect demo 4. With admin, go to knowledge 5. Create a page in workspace 6. In Share, change visibility to everyone 7. With demo, join the page 8. With admin, write a long word 9. Place both cursors at the end of the word 10. With admin, select a few letters at the end of the word 11. Delete those letters 12. Demo should have a traceback Cause of the issue: --- In `getDeepestPosition` > `closestBlock` > `findNode` `findNode` can return `null` opw-4072333 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#177964
`BLOCK` button in the workcenter blocking wizard should be in lowercase --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187384
Original PR description
`BLOCK` button in the workcenter blocking wizard should be in lowercase --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187384
Forward-Port-Of: odoo/odoo#186983 Forward-Port-Of: odoo/odoo#185343
Original PR description
Forward-Port-Of: odoo/odoo#186983 Forward-Port-Of: odoo/odoo#185343