Wednesday, October 30, 2024
12 changes
2 changes
Resolved issues and error corrections
This update removes a reference to a field that no longer exists in the Field Service reporting views. It helps prevent reporting screens from failing or showing outdated information after related system changes.
Original PR description
Related: https://github.com/odoo/odoo/pull/184934 task-4269588
Updated the help text in the barcode stock workflow so users see clearer, accurate guidance. This reduces confusion during warehouse operations without changing underlying functionality.
6 changes
Resolved issues and error corrections
Removed leftover records and assets for a module that no longer exists. This prevents obsolete module data from appearing or causing confusion during system maintenance and upgrades.
Original PR description
The module was removed in odoo/enterprise@53098e18 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
4 changes
Resolved issues and error corrections
This update resolves an issue where the Helpdesk module was incorrectly creating an empty partner record when attempting to 'Plan Intervention' on a ticket without a defined contact. The fix prevents the system from generating a partner when required information is missing, ensuring data integrity and preventing unnecessary record creation.
Original PR description
Steps: Create a ticket with no partner. Click on 'Plan Intervention'. The modal opens. Issue: See that a partner "@" has been created and set. Cause: Clicking on the button calls `action_generate_fsm_task`, which calls `_find_or_create_partner`, but the args, `self.partner_name` and `self.partner_email`, are empty. Solution: Not try to create a partner when the fields both empty. task-4265584
Fixes an issue where previewing a canceled invoice with no invoice lines could show an error instead of opening the preview. The system now handles missing invoice line data safely, improving reliability for users reviewing incomplete or canceled invoices.
Original PR description
Currently, an error occurs when the user attempts to preview an invoice, and invoice has no invoice lines. Step to produce: - Install the ```account``` module. - Create a new invoice, add a customer name, and 'Cancel' this invoice. - Click on 'Preview' button(ensure that no invoice lines have been added). ```ValueError: Expected singleton: account.move()``` An error occurs when the system tries to get installment data from the move line at [1], and the move lines are not available in the invoice. Link [1]: https://github.com/odoo/odoo/blob/430656132044f8d675712d5b6cbfef807880d024/addons/account/models/account_move.py#L5411-L5412 To handle this issue, pass empty data for installments if the move line is not available in the invoice. Sentry-5978934688 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents an unexpected error screen when users save a customized view that contains an invalid context value. Instead of a technical traceback, the system can handle the invalid input more safely, improving reliability during view editing.
Original PR description
When the user edits the view and adds context with invalid syntax, a traceback will appear. Steps to reproduce the error: - Go to Settings > Technical > Views > Open any view - Add context = ``"[]"``…
When the user edits the view and adds context with invalid syntax,
a traceback will appear.
Steps to reproduce the error:
- Go to Settings > Technical > Views > Open any view
- Add context = ``"[]"`` or context = ``"{a}"`` like this in the view
- Save
Traceback:
```
UnboundLocalError: cannot access local variable 'err' where it is not associated with a value
File "odoo/http.py", line 2365, in __call__
response = request._serve_db()
File "odoo/http.py", line 1892, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1955, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1922, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2169, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 728, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/enterprise/18.0/industry_fsm_report/controllers/main.py", line 10, in edit_view
action = super().edit_view(view_id, studio_view_arch, operations, model, context)
File "odoo/http.py", line 728, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/enterprise/18.0/worksheet/controllers/main.py", line 10, in edit_view
action = super().edit_view(view_id, studio_view_arch, operations, model, context)
File "odoo/http.py", line 728, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/enterprise/18.0/web_studio/controllers/main.py", line 695, in edit_view
self._set_studio_view(view, new_arch)
File "home/odoo/src/enterprise/18.0/web_studio/controllers/main.py", line 456, in _set_studio_view
studio_view.arch_db = arch
File "odoo/fields.py", line 1402, in __set__
records.write({self.name: write_value})
File "home/odoo/src/enterprise/18.0/web_studio/models/studio_mixin.py", line 33, in write
res = super(StudioMixin, self).write(vals)
File "odoo/addons/base/models/ir_ui_view.py", line 535, in write
res = super(View, self).write(self._compute_defaults(vals))
File "odoo/models.py", line 4750, in write
real_recs._validate_fields(vals, inverse_fields)
File "odoo/models.py", line 1599, in _validate_fields
check(self)
File "odoo/addons/base/models/ir_ui_view.py", line 413, in _check_xml
elif err.__context__:
```
https://github.com/odoo/odoo/blob/69b404c7109ff689381f56520aad758424ec01aa/odoo/addons/base/models/ir_ui_view.py#L413-L418
Here, the ``err`` variable is referenced before the assignment,
So, it will lead to the above traceback.
sentry-5993638522
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prRestoring a file from the trash now shows the correct error when its original folder was also moved to the trash. This helps users understand why the restore cannot be completed and keeps the message consistent with other document restore cases.
Original PR description
**Steps to reproduce:** Create a folder in 'My Drive' e.g: "New". Add 2 files in New folder. Open the folder and only select those 2 files and move them to trash. Now, go back to My drive, select that empty New folder and move it to Trash. Go to Trash workspace. Select one of the file and try to restore it. **Technical:** The folder whose parent has a folder_id 'False'. In the domain, we check the id and active status for the folder_id but since there is no folder_id, that record will not be considered as archived_top_parent_documents. **Specifications:** Show the appropriate error message when restoring from TRASH, consistent with the error for other documents. Task-4274176
The subscription customer portal now shows and uses the correct upcoming billing amount after an internal field name changed. This prevents customers from seeing an incorrect or missing next payment amount when managing subscription payments online.
Original PR description
Since #69952 the name of the final amount has been changed in the dict from `amount_total` to `total_amount` but not in the get. task-id: 4242134
A test for Sendcloud delivery pickup locations now creates the required partner email information when demo data is not available. This prevents false test failures and helps keep delivery-related validation reliable across environments.
Original PR description
when running this test in no-demo mode, test was breaking as there was no email information created during test. Creating email information for partner fixes the issue. [link to runbot build errors](https://runbot.odoo.com/web#id=102115&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form)
This update resolves an issue where the preparation display would generate an error if a product's category wasn't found. The change ensures that the display gracefully handles missing categories, preventing errors and improving the user experience. This backport addresses a previous bug.
Original PR description
Before this commit, if one of the product's categories was not included in the preparation display, it would lead to an error. Backport of https://github.com/odoo/enterprise/pull/66479 opw-4292494
This update fixes a calculation error in the Deferred Expense Report. When the report's end date is before its start date (e.g., looking at a previous month), the report was incorrectly displaying negative amounts. This change ensures the report accurately shows a zero amount in these scenarios, preventing incorrect financial reporting.
Original PR description
Version: 17.0+ Issue: In the Deferred Expense Report, there is a missing check for if the `period_end` is before the `period_start` for when the deferred method is 'day'. If the `period_end` is in the same month as selected month of the report, the later column will compute the amount to be negative of the `amount_per_day` times the difference of days. For example, if the end date is 2024-11-04 and we look at the month of November, the later column will display the negative amount of 26 days. In this example the amount is expected to be 0. Purpose of this PR: To add an additional condition, if the `period_end` is before the `period_start` then the amount should be 0. opw-4231549
This update fixes an issue where return labels were incorrectly using the customer's information as the shipper. Now, the shipper field accurately reflects the original sender (ship-to) ensuring correct billing for returned shipments. This improves the accuracy of our return processes.
Original PR description
**Current behavior:** Return labels are being generated with the `shipper` field set to the partner defined on the delivery picking (i.e., customer). **Expected behavior:** `shipper` should match the `ship_to` field (the original sender) as this field informs who gets billed for the return shipment. **Steps to reproduce:** Generate a return label with `delivery_ups_rest`. **Cause of the issue:** The return label is generated with `shipper=picking.partner_id`. **Fix:** Set it to `shipper=picking.picking_type_id.warehouse_id.partner_id` (which matches the `ship_to` argument). opw-4147118 Forward-Port-Of: odoo/enterprise#72482