[IMP] shopfloor_reception_packaging_dimensions/mobile: improve UI/UX + code cleanup#1139
Open
nicolas-delbovier-acsone wants to merge 44 commits intoOCA:16.0from
Conversation
Contributor
2f2a910 to
c44e69d
Compare
[BOT] post-merge updates
Translated using Weblate (Italian) Currently translated at 100.0% (7 of 7 strings) Translation: wms-14.0/wms-14.0-shopfloor_reception_packaging_dimension Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_packaging_dimension/it/
Such vars should be initialized when the component gets initialized.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-shopfloor-18.0/stock-logistics-shopfloor-18.0-shopfloor_reception_packaging_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-shopfloor-18-0/stock-logistics-shopfloor-18-0-shopfloor_reception_packaging_dimension/
Currently translated at 100.0% (11 of 11 strings) Translation: stock-logistics-shopfloor-18.0/stock-logistics-shopfloor-18.0-shopfloor_reception_packaging_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-shopfloor-18-0/stock-logistics-shopfloor-18-0-shopfloor_reception_packaging_dimension/it/
…ld for packaging weight
…hen barcode empty
…ry noise in tests Reset 'shopfloor_user_id' on the move line after the assertion to prevent subsequent test steps from triggering a session recovery warning.
…arser By introducing a specific packaging parser, we ensure we get exactly the infos we need for the "packaging dimension" scenario
…date message - Move the 'packaging_dimension_updated' message from shopfloor to this module, as it is only relevant here. - Rename/Update the message to 'packaging_updated' and remove the word "dimension", as the feature also allows updating barcodes and quantity.
Use guard clause pattern to improve code readibility
Replace list comprehension with a generator expression in _check_dimension_to_update. This avoids allocating an intermediate list in memory
Rename the 'cancel' parameter to 'skip' in the set_packaging_dimension service and validator. The term 'skip' is more accurate because the process continues to the next packaging or step rather than aborting some operation. This also aligns the backend logic with the 'Skip' button label used in the Shopfloor UI, improving developer clarity.
…rs and highlight changes Update the packaging dimension screen to improve data handling and user feedback: - Switch v-model bindings from direct record fields (e.g., 'barcode') to input buffers (e.g., 'barcode_input'). - Implement '_is_field_changed' helper to detect differences between buffered inputs and original record values. - Apply the 'accent' CSS class to detail fields when they have been modified, providing clear visual feedback to the user. - Rename 'get_packaging_measurements' to 'get_packaging_measurements_inputs' to reflect the shift to buffered data. - Align the 'on_skip' payload with the backend rename of 'cancel' to 'skip'.
…ith model fields Simplify the data flow between the Shopfloor UI and the backend by removing the unnecessary field mapping.
Optimize the packaging dimension update logic to skip writing values that are already present in the database.
c44e69d to
10ed0f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves the code from: #1103 (to be rebased when merged)
Main changes