Tuesday, September 27, 2022
4 changes · master
Resolved issues and error corrections
Fixes a timing issue that could prevent users from selecting date fields during invoice document extraction. It also prevents crashes when working with longer PDFs where some pages do not have extracted selection boxes, making the invoice review flow more stable.
Original PR description
There was a race condition between the handlers of the blur and click events for date boxes. If the blur is handled first, the boxes are removed from the DOM and the click fails as it happens on an element which isn't present. For the other field's boxes, there was no issue as the `mousedown` event was prevented and the field wasn't losing focus, letting the boxes mounted. For the date fields, the `mousedown` event wasn't prevented as it was used to hide the calendar dropdown for UI feedback. In this new version, the `mousedown` event is always prevented and a fake <kbd>ESC</kbd> keypress is triggered for date fields to hide the calendar. This also has the benefit that the boxes are still displayed after a click which is better for the user experience.
This fix prevents an error when users create an asset from a project’s Assets button. It ensures the asset form receives the right type information, allowing project-related asset creation to work reliably.
Original PR description
1. Go to Projects -> edit 2. Click on the "Assets" smart button 3. Try to create an asset -> Traceback This happens because the `asset_type` depends on the context and it is better to explicitly pass it to the view. task-2927428
Intrastat reports now show the product origin country name correctly instead of displaying raw translation data. This prevents confusing country labels and helps users read reporting information accurately.
Original PR description
Due to the recent jsonb fields update, the product origin country name as retrieved by the sql intrastat query is in the form of a json string e.g. {'en_US': 'Algeria'}
To correct this we use the ->> operator to parse the json in the field and retrieve the correctly translated value for the country name.The mobile control panel now displays and behaves correctly again by restoring missing page structure and styling. This helps users navigate and search smoothly on phones without layout issues.
Original PR description
This PR and its community counterpart add back some missing DOM attributes and CSS rules that made the mobile ControlPanel work. Community: https://github.com/odoo/odoo/pull/94975