Friday, July 5, 2024
7 changes · 17.0
Resolved issues and error corrections
This fix ensures that timesheet reminder notification dates are properly calculated when a new company is created in Odoo. Previously, these reminder dates were only set when specific configuration fields were manually changed, even though they had default values. Now the system automatically calculates these dates during company creation, ensuring employees and managers receive their timesheet reminders as expected from day one.
Original PR description
Before this commit the timesheet_mail_employee_nextdate and timesheet_mail_manager_nextdate Were calculated only when a change was made on timesheet_mail_employee_delay, timesheet_mail_employee_interval or timesheet_mail_manager_delay, timesheet_mail_manager_interval fields, even tho those two have a default value Now the _timesheet_postprocess method will always call _calculate_timesheet_mail_employee_nextdate and _calculate_timesheet_mail_manager_nextdate method when called from the res.company.create method Seems to work even if the delay and interval fields don't have default value Following this PR > https://github.com/odoo/enterprise/pull/48096 15.0 > master Task-3714293 Forward-Port-Of: odoo/enterprise#55546
This fix corrects how ordered quantities are calculated when creating sales orders from field service tasks. Previously, delivered quantities displayed correctly but ordered quantities were incorrect due to a missing unit conversion. The fix ensures both quantities now display accurately when converting timesheets to sales orders.
Original PR description
### Steps to reproduce the issue: 1. Create a Product with "Service" as Product Type and "Based on Timesheets" as Invoicing Policy 2. Go to _Field Service > Configuration > Projects_ and choose a…
### Steps to reproduce the issue: 1. Create a Product with "Service" as Product Type and "Based on Timesheets" as Invoicing Policy 2. Go to _Field Service > Configuration > Projects_ and choose a Project 3. In the _Invoicing_ section, add a line with an Employee and the Service Product you created 4. Create a Task for the Project 5. Add in the _Timesheets_ section a line with the Employee and a duration of one hour 6. Click on "Mark as done", then "Sales Order" 7. The Delivered Quantities have a correct value but the Ordered Quantities do not ### Explanation: An uom conversion is performed in `_get_delivered_quantity_by_analytic` to compute `qty_delivered` but is missing in `_fsm_create_sale_order_line` for `product_uom_qty`. https://github.com/odoo/odoo/blob/18e03c73691d9efa82cbf82b5e084172fe74665e/addons/sale/models/sale_order_line.py#L386-L392 ### Suggested Fix: To prevent unintended behaviours, any product that is currently used in a Field Service Project will have `invoice_policy`, `service_type` and `detailed_type` locked to match the domain of `timesheet_product_id` for every model using it. opw-3858530 Forward-Port-Of: odoo/enterprise#65855 Forward-Port-Of: odoo/enterprise#63337
This fix resolves a system error that occurred when the MRP Workorder module was uninstalled while the Quality MRP module remained active. The issue happened because a quality check method was trying to use a field that only exists when the Workorder module is installed. By moving the problematic method to the correct module, the system now works properly regardless of which modules are installed.
Original PR description
### Steps to reproduce: - Install mrp_quality and uninstall mrp_workrder - Create products A, B, and C - Product A: Storable, Manufacturing: - BOM: - 1 x product B - Product B: Storable, tracked by…
### Steps to reproduce:
- Install mrp_quality and uninstall mrp_workrder
- Create products A, B, and C
- Product A: Storable, Manufacturing:
- BOM: - 1 x product B
- Product B: Storable, tracked by Lot, Manufacturing route with:
- BOM: - 1 x Product C
- Quality check: Op manufacturing and Control Per Quantity
- Product C: Storable, On hand quantity of 10
- Create MO for product B and complete it with a Lot id
- Create MO for product A > confirm
#### > Traceback error
### Cause of the issue:
The `move_id` field of the `quality.check` model is used in the `_update_lot_from_lot_line` method of that same model. However, the method is defined in the `quality_mrp` module while the `move_id` field is defined in the `mrp_workorder` module.
Since `quality_mrp` depends on `mrp` and since `mrp_workorder` is auto installed when `mrp` is installed, this should not be an issue. However, since `mrp_workorder` is not a strict dependency of the `quality_mrp` module, the later in not uninstalled when `mrp_workorder` is. As such, it is possible to not have a `move_id` field on the `quality.check` model while the filed is used in the call of the `_update_lot_from_lot_line` mdethod defined in `quality_mrp`.
### For the posterity:
The method was introduced by commit 8ab6c56 in saas-16.4 for a fix and was later an later updated by commit 801ff42 for an other fix.
opw-3994004
---The IoT module has been updated to properly handle logs containing international characters (non-ASCII). Previously, receiving logs with special characters would cause system errors. This fix ensures all character types are processed correctly while maintaining compatibility with older IoT devices that may still send standard ASCII characters.
Original PR description
Before this commit, receiving logs with non-ascii characters would cause a traceback. After this commit, non-ascii characters are processed correctly. With the proposed fix, should a client send an ascii-encoded string, it will still be decoded correctly, ensuring backwards compatibility. This means that if the IoT box doesn't get updated and interacts with an updated server, since the UTF-8 table covers the ascii table, it won't lead to any error server-side. OPW-4001252 Forward-Port-Of: odoo/enterprise#65956
This update fixes how fixed taxes are displayed when printing invoices. Previously, the base amount was incorrectly shown after a fixed tax, even though fixed taxes don't use that base amount in their calculation. The system now properly distinguishes between fixed and regular taxes to display the correct information on invoices.
Original PR description
Related to : https://github.com/odoo/odoo/pull/170741 When printing an invoice including a fixed tax, we don't want the base amount to be displayed after said tax, since the fixed computation doesn't take into account said amount.
Added a check to differenciate fixed taxes from other and adapt display accordingly.
This specific PR intends to stop a test in tax_external taking the new field into account.
Since the function modified has been updated in 17.2, another PR will be necessary.
See https://github.com/odoo/odoo/pull/168634
task-3964942
X-original-commit: b4c0aa0b00892b87da0c3bf6815cb0f575c216b2Fixed an issue where products that failed quality checks during manufacturing were not being sent to the designated failure location. Previously, failed products would always go to the default stock location instead. Now when a manufactured product fails a quality check, it correctly routes to the failure location specified in the quality control setup.
Original PR description
**Current behavior:** Setting up a control point for a product by quantity with a failure stock location on manufacturing operations will never allow a manufactured product that fails the quality…
**Current behavior:**
Setting up a control point for a product by quantity with a failure stock location on manufacturing operations will never allow a manufactured product that fails the quality check to end up in the failure location.
**Expected behavior:**
A product created in a manufacturing order can fail a quality check and end up in the designated failure location in WH.
**Steps to reproduce:**
1. Set up a quality point on some storable product on manufacturing operations with:
`Control per: Quantity`
`Type: Pass - Fail`
`Failure Location: Some internal location`
3. Create a new MO with the quality controlled product and confirm it
4. Click the Quality Checks button, fail the check (make sure to select the faiure location here)
5. After the Quality Check, click Produce All -> Observe that the full quantity of products produced by the MO still was moved to whatever the default Stock location is, not the failure location specified.
**Cause of the issue:**
The method `_move_line_to_failure_location()` expects a picking and SML to exist, however when the quality check starts from an MO, we have neither (contrasted with a check starting from a picking). So the method just skips the logic where the re-route would occur.
**Fix:**
Override the method in the mrp_quality bridge module, if the quality check has a production_id then create the SML on the spot via `MrpProduction.action_confirm()`, then go through the same logic to split the created line as necessary based on the failed quantity vs. total quantity of the MO.
opw-3865301This fix corrects how customer and pickup point addresses are sent to Sendcloud for shipping labels. Previously, the pickup point address was being duplicated on labels. Now both the pickup point location and the customer's delivery address are correctly sent to Sendcloud, ensuring labels print accurately with the right information.
Original PR description
Before this commit: When the user chooses a pickup point, the res.partner of the sale order is replaced with data from the pickup point, while the previously set customer's data is set as the partner's parent. And Sendcloud relies on a service_point_id field in its API rather than a raw address. Which causes double printing of the service point address on the label. Moreover, Sendcloud explicitly requires the customer's (and not the pickup point) address in its API. After this commit: Both the service_point_id and the customer's delivery address are sent to Sendcloud. Both addresses are printed on the label correctly. opw-3977565