Skip to content

[16.0][IMP] shopfloor_reception_packaging_dimensions/mobile: improve UI/UX + code cleanup#1139

Open
nicolas-delbovier-acsone wants to merge 43 commits intoOCA:16.0from
acsone:16.0-imp-shopfloor_reception_packaging_dimension_mobile-nde
Open

[16.0][IMP] shopfloor_reception_packaging_dimensions/mobile: improve UI/UX + code cleanup#1139
nicolas-delbovier-acsone wants to merge 43 commits intoOCA:16.0from
acsone:16.0-imp-shopfloor_reception_packaging_dimension_mobile-nde

Conversation

@nicolas-delbovier-acsone
Copy link
Copy Markdown

@nicolas-delbovier-acsone nicolas-delbovier-acsone commented Feb 23, 2026

This PR improves the code from: #1103 (to be rebased when merged)

Main changes

  • Refactor for readibility
  • Use packaging name instead of packaging level name
  • Show package details in detail-card
  • Highlight modified fields in details card
Before After
image image

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @simahawk, @guewen, @sebalix,
some modules you are maintaining are being modified, check this out!

@nicolas-delbovier-acsone nicolas-delbovier-acsone marked this pull request as draft February 23, 2026 08:38
@nicolas-delbovier-acsone nicolas-delbovier-acsone force-pushed the 16.0-imp-shopfloor_reception_packaging_dimension_mobile-nde branch from 2f2a910 to c44e69d Compare February 23, 2026 09:54
@nicolas-delbovier-acsone nicolas-delbovier-acsone marked this pull request as ready for review February 23, 2026 09:54
@nicolas-delbovier-acsone nicolas-delbovier-acsone force-pushed the 16.0-imp-shopfloor_reception_packaging_dimension_mobile-nde branch from c44e69d to 10ed0f5 Compare February 26, 2026 07:19
@nicolas-delbovier-acsone nicolas-delbovier-acsone changed the title [IMP] shopfloor_reception_packaging_dimensions/mobile: improve UI/UX + code cleanup [16.0][IMP] shopfloor_reception_packaging_dimensions/mobile: improve UI/UX + code cleanup Mar 27, 2026
Copy link
Copy Markdown
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you squash some of your commits?

@nicolas-delbovier-acsone nicolas-delbovier-acsone force-pushed the 16.0-imp-shopfloor_reception_packaging_dimension_mobile-nde branch 2 times, most recently from 189e51e to b521b26 Compare March 30, 2026 10:25
TDu and others added 21 commits March 31, 2026 08:14
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/
TDu and others added 20 commits March 31, 2026 08:14
…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
- Update doctstring
- Replace list comprehension with a generator expression to avoid allocating useless 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.
@nicolas-delbovier-acsone nicolas-delbovier-acsone force-pushed the 16.0-imp-shopfloor_reception_packaging_dimension_mobile-nde branch from b521b26 to 7de91d8 Compare March 31, 2026 06:15
@lmignon
Copy link
Copy Markdown

lmignon commented Apr 1, 2026

@nicolas-delbovier-acsone Can you take into account the comment from Jacque-Etienne?

@nicolas-delbovier-acsone
Copy link
Copy Markdown
Author

nicolas-delbovier-acsone commented Apr 1, 2026

@nicolas-delbovier-acsone Can you take into account the comment from Jacque-Etienne?

I already squashed some of my commits, the rest did not make sense for me to squash. What commits specifically do you want me to squash?

…s definition

The previous implementation used flattened string keys (e.g., "methods.name")
to define scenario methods. While functional, this is
less idiomatic and prevents editor support
@nicolas-delbovier-acsone nicolas-delbovier-acsone force-pushed the 16.0-imp-shopfloor_reception_packaging_dimension_mobile-nde branch from 7de91d8 to eb8e365 Compare April 8, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.