Tuesday, November 12, 2024
70 changes
12 changes
Miscellaneous changes
Steps to reproduce: Go to Accounting > Customers > Customers. Current behavior: The contact list cannot be ordered alphabetically by name. The `Name` field is `display_name`, a computed field in `res.partner` that is not stored, preventing alphabetical sorting. In future versions (starting from saas-17.2), `display_name` will be replaced by `complete_name`, a stored field containing the full name of the customer, which supports alphabetical ordering. opw-4262464 Description of t
Original PR description
Steps to reproduce: Go to Accounting > Customers > Customers. Current behavior: The contact list cannot be ordered alphabetically by name. The `Name` field is `display_name`, a computed field in `res.partner` that is not stored, preventing alphabetical sorting. In future versions (starting from saas-17.2), `display_name` will be replaced by `complete_name`, a stored field containing the full name of the customer, which supports alphabetical ordering. opw-4262464 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#186031
### Steps to reproduce: - In the settings Enable Multi-steps route - Create a product FP with a BOM: - 1 component: 1 x COMP (tracked by SN) - 1 operation: "Register SN on COMP" - Add an instruction on your op: - type: "Register consumed component" - Product To Register: COMP - Put 2 SN for COMP: - SN01 in Stock/Shelf1 - SN02 in Stock/Shelf2 - Create and confirm an MO for 1 Unit of FP > SN01 is reserved on the COMP raw move. - Go to the shopfloor > "Register SN o
Original PR description
### Steps to reproduce: - In the settings Enable Multi-steps route - Create a product FP with a BOM: - 1 component: 1 x COMP (tracked by SN) - 1 operation: "Register SN on COMP" - Add an instruction…
### Steps to reproduce:
- In the settings Enable Multi-steps route
- Create a product FP with a BOM:
- 1 component: 1 x COMP (tracked by SN)
- 1 operation: "Register SN on COMP"
- Add an instruction on your op:
- type: "Register consumed component"
- Product To Register: COMP
- Put 2 SN for COMP:
- SN01 in Stock/Shelf1
- SN02 in Stock/Shelf2
- Create and confirm an MO for 1 Unit of FP
> SN01 is reserved on the COMP raw move.
- Go to the shopfloor > "Register SN on COMP"
- Change the SN of the COMP from SN01 to SN02
#### > Go back to the stock MO the incorrect location was used
### Cause of the issue:
While the lot is correctly updated by the action here: https://github.com/odoo/enterprise/blob/e90cf74be3945d1f1256d398ca9c4b61bc35ed08/mrp_workorder/models/quality.py#L485-L507 The associated quant is not set and hence the move location_id, package, ... are not updated with it.
### Fix:
We take advantage of the `quant_id` dummy field of the `stock.move.line` to update the info to write thanks to the write override: https://github.com/odoo/odoo/blob/09cac8b9e6d2db46dadece0442a8a947a49c9de7/addons/stock/models/stock_move_line.py#L85 https://github.com/odoo/odoo/blob/09cac8b9e6d2db46dadece0442a8a947a49c9de7/addons/stock/models/stock_move_line.py#L399-L400 https://github.com/odoo/odoo/blob/09cac8b9e6d2db46dadece0442a8a947a49c9de7/addons/stock/models/stock_move_line.py#L911-L920
### Note:
Unfortunately, the Dialog opened when clicking on the the quality check from the shopfloor:
https://github.com/odoo/enterprise/blob/34ab94cdcc49f4ade66953874a03f2988b2b4317/mrp_workorder/static/src/mrp_display/dialog/mrp_quality_check_confirmation_dialog.js#L12 is not embedded in a form view so that the onchange: https://github.com/odoo/odoo/blob/366676cafdce00d55823c6daf41452b0c2373e4d/addons/stock/models/stock_move_line.py#L185-L192 is not triggered by our change of "lot_id".
opw-4149941
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#185662The issue: When a manufacturing order has a quantity to produce whose decimal accuracy has several digits, in Done status, the fields qty_producing and product_qty overlap. How to reproduce the issue: -Enable debug mode -navigate to Settings > Technical > Database Structure > Decimal Accuracy: Select Stock Weight and set '8' to Digits -Create a product whose UOM is g, add a weight in Logistics and select manufacturing in Routes -Create a Manufacturing Order, select the product, confirm the
Original PR description
The issue: When a manufacturing order has a quantity to produce whose decimal accuracy has several digits, in Done status, the fields qty_producing and product_qty overlap. How to reproduce the issue: -Enable debug mode -navigate to Settings > Technical > Database Structure > Decimal Accuracy: Select Stock Weight and set '8' to Digits -Create a product whose UOM is g, add a weight in Logistics and select manufacturing in Routes -Create a Manufacturing Order, select the product, confirm the Mo, and click on Produce all opw-4237620 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183072
Steps to reproduce: 1. Invoicing -> Customers -> Payments 2. Create new entry with no customer 3. Post the entry 4. Print the receipt `Marc Demo` Appears as customer task-4182618 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#186739
Original PR description
Steps to reproduce: 1. Invoicing -> Customers -> Payments 2. Create new entry with no customer 3. Post the entry 4. Print the receipt `Marc Demo` Appears as customer task-4182618 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#186739
In [1], the gauge widget was converted to OWL, but the option to use the widget with a fixed `max_value` was removed. This commit restores that functionality in the OWL framework. [1]: https://github.com/odoo/odoo/commit/e857e8d7 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186421 Forward-Port-Of: odoo/odoo#185620
Original PR description
In [1], the gauge widget was converted to OWL, but the option to use the widget with a fixed `max_value` was removed. This commit restores that functionality in the OWL framework. [1]: https://github.com/odoo/odoo/commit/e857e8d7 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186421 Forward-Port-Of: odoo/odoo#185620
At the moment cancelling assets is impossible when audit trail is enabled because it tries to unlink the move. It should be possible, in which case the move should be reversed instead. By adding a check in _can_be_unlinked to return False in such case, the _unlink_or_reverse method will then properly reverse asset moves as expected. Back port of https://github.com/odoo/odoo/pull/181193 task-4251586 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit
Original PR description
At the moment cancelling assets is impossible when audit trail is enabled because it tries to unlink the move. It should be possible, in which case the move should be reversed instead. By adding a check in _can_be_unlinked to return False in such case, the _unlink_or_reverse method will then properly reverse asset moves as expected. Back port of https://github.com/odoo/odoo/pull/181193 task-4251586 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184535
In a previous commit: #151805, the goal was to add margin to the account invoice report. No negative margins were possible before because it didn't take the customer's credit notes. This is now fixed with this commit, that aims to add customer's credit note to margin calculations task-4167630 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185498
Original PR description
In a previous commit: #151805, the goal was to add margin to the account invoice report. No negative margins were possible before because it didn't take the customer's credit notes. This is now fixed with this commit, that aims to add customer's credit note to margin calculations task-4167630 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185498
This commit fixes a bug introduced by [#166482](https://github.com/odoo/odoo/pull/166482), where it attempts to reconcile an account_move_line twice, and fails to do so the second time, which prevents the confirmation of invoices. The fix adds a step to remove already reconciled items from the reconciliation plan. opw-4148669 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180903
Original PR description
This commit fixes a bug introduced by [#166482](https://github.com/odoo/odoo/pull/166482), where it attempts to reconcile an account_move_line twice, and fails to do so the second time, which prevents the confirmation of invoices. The fix adds a step to remove already reconciled items from the reconciliation plan. opw-4148669 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180903
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#186718
Original PR description
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#186718
Currently, the relationship between stock.picking and purchase.order is done via a `related` non-store field that requires iterating all moves. This becomes problematic in a case like `_get_related_invoices` in the purchase_stock module because we need to get the purchase_id of a move, but to do that, we will have to go through the picking_id which will need to iterate all moves related to the same picking. When you have `_prefetch_ids` set on that move, this process becomes extremely slow and m
Original PR description
Currently, the relationship between stock.picking and purchase.order is done via a `related` non-store field that requires iterating all moves. This becomes problematic in a case like…
Currently, the relationship between stock.picking and purchase.order is done via a `related` non-store field that requires iterating all moves. This becomes problematic in a case like `_get_related_invoices` in the purchase_stock module because we need to get the purchase_id of a move, but to do that, we will have to go through the picking_id which will need to iterate all moves related to the same picking. When you have `_prefetch_ids` set on that move, this process becomes extremely slow and memory-expensive because the `purchase_id` field is not stored so it needs to compute the relationship for all moves in the expanded ids due to prefetching. Since there exists a Many2many relationship between stock pickings and purchase orders, it's possible to rely on a search query instead of the `mapped` call. Although this might miss some cache optimizations, it's still much more efficient in terms of memory. This is because this approach is not susceptible to prefetch_ids explosion. It's also worth noting that this function is only called on individual stock moves instead of batches as part of the anglo_saxon_accounting logic. That being said, we don't have to worry this much about cache optimization since the method is not batched to begin with. Using this optimization, we get the following benchmarks. Benchmark: | num stock.move (_prefetch_ids) | time before | no. queries before | time after | no. queries after| |----|------|-----| ----- | ----- | | 1000 | timeout | N/A | ~ 85 seconds | 47897 | 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#181822
Use cases: send an email to "Bike@Home" <info@bike.com> (name containing @) "robert@exampl.com" <robert@example.com> (result of partner name_create) When there is an email in the name field, emails are sent twice and thus may be counted twice in various tooling, introduce unwanted or extra recipients, ... This happens notably due to https://github.com/odoo/odoo/commit/795091c69d2bc40e3bd2b5ae29451ea3af07d908 combined to https://github.com/odoo/odoo/pull/74474 which improved support of
Original PR description
Use cases: send an email to "Bike@Home" <info@bike.com> (name containing @) "robert@exampl.com" <robert@example.com> (result of partner name_create) When there is an email in the name field, emails…
Use cases: send an email to "Bike@Home" <info@bike.com> (name containing @) "robert@exampl.com" <robert@example.com> (result of partner name_create) When there is an email in the name field, emails are sent twice and thus may be counted twice in various tooling, introduce unwanted or extra recipients, ... This happens notably due to https://github.com/odoo/odoo/commit/795091c69d2bc40e3bd2b5ae29451ea3af07d908 combined to https://github.com/odoo/odoo/pull/74474 which improved support of multiemails and formatted emails in various email input. This notably leads to better formatted email computation on partner that generates emails like '"email@example.com" <email@example.com>' when email is used both as name and email. When sending emails to this partner only a single email should be sent and counted. A fix is been done to remove duplicates in that tool, making the returned list unique. In this PR we allow to receive a pre-validated list of emails that restricts emails found by 'extract_rfc2822'. When going through classic flows, we already computed emails using 'email_split' and its subtools, hence we just need the encoding check of 'extract_rfc2822'. Additional emails found by that tool are ignored as we consider those are fake emails. This PR contains tests and fixes related to that issue as well as multi and formatted emails management. Task-3704658 Forward-Port-Of: odoo/odoo#186798 Forward-Port-Of: odoo/odoo#185793
Issue: Currently, if the related user is removed from an employee, the link with the res.partner is also removed. This makes it impossible to post expense reports, as a partner is required to do so. To reproduce: 1. Create a new user. 2. Click ‘Create Employee’ in the user view 3. Go to the employee through the smart button 4. In the tab HR Settings, remove the related user 5. Create an expense report and try to post it (Expenses => New => Create Report => Submit to Manager => Approve =
Original PR description
Issue: Currently, if the related user is removed from an employee, the link with the res.partner is also removed. This makes it impossible to post expense reports, as a partner is required to do so.…
Issue: Currently, if the related user is removed from an employee, the link with the res.partner is also removed. This makes it impossible to post expense reports, as a partner is required to do so. To reproduce: 1. Create a new user. 2. Click ‘Create Employee’ in the user view 3. Go to the employee through the smart button 4. In the tab HR Settings, remove the related user 5. Create an expense report and try to post it (Expenses => New => Create Report => Submit to Manager => Approve => Post Journal Entries) 6. An error message about missing vendor (res.partner) appears Cause: The field work_contact_id keeps the link between hr.employee and res.partner, and is updated in the function _sync_user. Since work_contact_id=user.partner_id.id, when the user is removed from the hr.employee, work_contact_id is also removed. Fix: The link between hr.employee and res.partner should be kept until the user is assigned to another employee. In this case, the partner associated to the user should also be associated with the second employee, and no longer to the first employee. To do so, _sync_user assigns _origin.user_partner_id to work_contact_id if no user is passed (in case the user is removed). A helper function is called when creating or writing an employee, to unlink the partner and the previous employee in case the user is assigned to another employee. task-4049996 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175478
1 change
Enhancements to existing features
The Sign app's automated tests were updated to use the newer Hoot testing framework instead of older QUnit-based helpers. This improves maintainability and helps ensure future Sign changes can be validated more reliably, with no direct change expected for end users.
Original PR description
Purpose of this PR is to convert remove QUnit tests which rely on `mail/test_utils` to hoot. task-3818666
12 changes
Enhancements to existing features
Appointment durations now use a shorter display format when longer labels would not fit neatly, such as durations over a day or with extra minutes. This improves readability and makes scheduling screens cleaner and easier to scan for users.
Original PR description
When the appointment duration is not a multiple of hours, ex: 2 hour 30 minutes it is not able to fit in one line. Thus change appointment duration format to short when duration exceeds a day or is not a multiple of an hour. And some other UI/UX changes. Task-4209912
The appointment calendar now limits its display to dates within the month currently being viewed. This makes scheduling clearer by avoiding extra days from adjacent months that could distract users or cause confusion.
Original PR description
Limit calendar view to show only dates within the currently selected month. Task-4294202
Resolved issues and error corrections
The point of sale food delivery setup no longer pre-selects Glovo as the default provider, giving businesses a neutral starting point when configuring platforms. Order notes have been cleaned up by removing an extra bullet point, and the related settings label is clearer for users managing food delivery platforms.
Original PR description
Before this commit : - Glovo was selected as default delivery provider. - Extra Dot(Bullet Point) is visible in the Order notes - Label to be changed under Food delivery connector field. Following this commit : - Default delivery provider is removed. - Extra dot is been removed in order notes. - Label is been updated to Food Delivery Platforms. task - 4315841
This update fixes an internal automated test for document folder deletion that could fail when the expected test folder was not selected. It helps keep quality checks stable without changing how users delete folders in Documents.
Original PR description
The tour is failing because the test folder ("Folder1") is not always selected when starting the test with its access token. As the test is checking the folder deletion, we select the test folder manually by clicking on it.
Task-4247011This fix removes an incorrect warning shown around Web Studio kanban views after a naming change from "kanban-card" to "card". It helps avoid confusing users or administrators with a warning about something that no longer exists, with no expected change to business workflows.
Original PR description
The warning was erroneous as "kanban-card" doesn't exist, we renamed it into "card" [1]. [1] odoo/odoo#180999
Code cleanup and technical improvements
The HTML editor integrations were reorganized to use clearer internal APIs across appointment scheduling, Knowledge, and Studio report editing. This should make future editor-related improvements easier to maintain while causing little direct change for end users.
Original PR description
Community: https://github.com/odoo/odoo/pull/185356
Miscellaneous changes
`uom_po_id` is invisible in the product view in 2 scenarios. the uom group is not activated or the product cannot be bought. As we are setting the default value anyway in those tests, it's better to not give a particular value to avoid error about writing into invisible field runbot error : 65999 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
Original PR description
`uom_po_id` is invisible in the product view in 2 scenarios. the uom group is not activated or the product cannot be bought. As we are setting the default value anyway in those tests, it's better to not give a particular value to avoid error about writing into invisible field runbot error : 65999 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#186737
This commit makes cancelled depreciation entries appear in grey in the depreciation board. It also turns the the depreciation entry's name into a link towards the move's form view. Forward-Port-Of: odoo/enterprise#73684 Forward-Port-Of: odoo/enterprise#72819
Original PR description
This commit makes cancelled depreciation entries appear in grey in the depreciation board. It also turns the the depreciation entry's name into a link towards the move's form view. Forward-Port-Of: odoo/enterprise#73684 Forward-Port-Of: odoo/enterprise#72819
This reverts commit fd46e62809544702193e636ec388103eea11f788. Task-4314619 Forward-Port-Of: odoo/enterprise#73506
Original PR description
This reverts commit fd46e62809544702193e636ec388103eea11f788. Task-4314619 Forward-Port-Of: odoo/enterprise#73506
Versions -------- - saas-17.4+ Community PR: https://github.com/odoo/odoo/pull/186284 Steps ----- 1. Have Planning installed; 2. change localisation to 'en_GB' (or any whose weeks start on Monday); 3. open in Gantt view in weekly granularity; 4. go to the week of 2024-12-30. Issue ----- Label on top right displays "W1 2024"; Cause ----- It uses the `getLocalWeekNumber` function to get the week number of 2024-12-30, which falls in the first week of 2025. It then combines it
Original PR description
Versions -------- - saas-17.4+ Community PR: https://github.com/odoo/odoo/pull/186284 Steps ----- 1. Have Planning installed; 2. change localisation to 'en_GB' (or any whose weeks start on Monday); 3. open in Gantt view in weekly granularity; 4. go to the week of 2024-12-30. Issue ----- Label on top right displays "W1 2024"; Cause ----- It uses the `getLocalWeekNumber` function to get the week number of 2024-12-30, which falls in the first week of 2025. It then combines it with the `year` of the date, which is 2024. Solution -------- ### Community: Like the `weeknumber` function added in 9c47e911d0ca7 to `odoo.tools.date_utils`, have a function in `web` that returns both year and week number. ### Enterprise: Define a `formatLocalWeekYear` function in `web_gantt` using the new `getLocalYearAndWeek` function from `web`. opw-4280192 Forward-Port-Of: odoo/enterprise#73318
We wait for the next tick to leave the dialog enough time to load properly before changing the mode to draw, this way we avoid to have the canva with the auto result after changing to draw mode. Forward-Port-Of: odoo/enterprise#73248 Forward-Port-Of: odoo/enterprise#69785
Original PR description
We wait for the next tick to leave the dialog enough time to load properly before changing the mode to draw, this way we avoid to have the canva with the auto result after changing to draw mode. Forward-Port-Of: odoo/enterprise#73248 Forward-Port-Of: odoo/enterprise#69785
**Steps to reproduce:** (production credentials required) - Install l10n_cl_edi - Switch to a Chilean company (e.g. CL Company) - Create an invoice for a Chilean customer - Confirm the invoice and process the electronic invoice - Create a credit note and process the electronic credit note - Create a debit note from the credit note (Do not set "SII Reference Code") - Process the electronic debit note **Issue:** The debit note will be rejected because "SII Reference Code" is not set.
Original PR description
**Steps to reproduce:** (production credentials required) - Install l10n_cl_edi - Switch to a Chilean company (e.g. CL Company) - Create an invoice for a Chilean customer - Confirm the invoice and process the electronic invoice - Create a credit note and process the electronic credit note - Create a debit note from the credit note (Do not set "SII Reference Code") - Process the electronic debit note **Issue:** The debit note will be rejected because "SII Reference Code" is not set. **Solution:** Set "SII Reference Code" field as required. opw-4182451 Forward-Port-Of: odoo/enterprise#73551 Forward-Port-Of: odoo/enterprise#72679