Skip to content

Syncing from upstream OCA/wms (16.0)#661

Merged
bt-admin merged 35 commits intobrain-tec:16.0from
OCA:16.0
May 4, 2026
Merged

Syncing from upstream OCA/wms (16.0)#661
bt-admin merged 35 commits intobrain-tec:16.0from
OCA:16.0

Conversation

@bt-admin
Copy link
Copy Markdown

@bt-admin bt-admin commented May 4, 2026

bt_gitbot

nicolas-delbovier-acsone and others added 30 commits April 20, 2026 08:46
…er readibility

Reorganized the template structure to ensure the date-picker is positioned adjacent to its related components inside the "set_lot" template.
- Merge `set_lot_confirm_action` and `set_lot` endpoints so as to call only one endpoint
- Ensures lot is not created in DB until proven valid
- Add expired expiration date check
Update the 'set_lot' state logic to store user input locally on the
active move line before calling the backend.

Crucially, this ensures the 'set_lot' function is now called with both
'expiration_date' and 'lot_name' at the same time upon confirmation.
This prevents premature backend calls with partial data and allows
for better validation of the lot on the server.
Updated unit tests to be resistant to changes in product data serialization.
Previously, tests used a hard-coded dict, which caused failures when
other modules modified the product's serialized fields.
Add an endpoint to call on lot name scan. This enables to detect already existing lots.
This endpoint could also be used to add logic to extract extra infos from barcode such as expiration date.
When a user provides a lot name but forgets the expiration date, the `lot_name` was previously lost
in the response.

This change ensures that `lot_name` is included in the returned
data, allowing the UI to retain the value and
preventing the user from having to re-type it.
The frontend was sending expiration dates in the user's local timezone. Because Odoo expects datetime values in UTC, this caused "hour shifts" that could move the expiration date to the previous day in the database.

This fix ensures that the selected date is treated as local midnight and converted to the corresponding UTC timestamp before being sent to the server.
…display

Updated the lot expiration display to show only the date component. Since the selection widget is restricted to dates, displaying the time was redundant.
…trings

- Rename internal methods to follow standard naming conventions, ensuring compatibility for downstream modules inheriting from this component.
- Updated docstrings to accurately reflect method behavior.
The 'UTC=timezone.utc' alias was introduced in Python 3.11.
To maintain support for environments running Python 3.10,  the alias is added manually at the beginning of the file
Enforce the 'use_create_lots' setting from the picking type during the
reception process.
When a lot name is present on the move line, the system now attempts to find a matching existing
lot record. If found, the lot metadata is sent to the frontend to
pre-fill the screen, preventing redundant data entry.
Update '_response_for_set_lot' to check if lot information was already
resolved during parsing. If the parsed data is complete, the system now
bypasses the 'set_lot' entry screen and processes the confirmation
automatically.
…ction`

Break down the function into smaller functions to isolate responsability and make code more readable
… gs1

Co-authored-by: Copilot <copilot@github.com>
The previous naming 'scan_lot_name' was misleading as the endpoint
is designed to handle more than just a string identifier.

In many workflows, such as GS1 barcoding, the incoming data
contains multiple attributes (e.g., lot name, expiration date,
or weight). Renaming the endpoint to 'scan_lot' provides a more
generic and accurate description of its functional scope.
nicolas-delbovier-acsone and others added 5 commits May 4, 2026 09:45
The previous attempt to prefill expiration dates with the line expiration date caused an issue: if a user manually entered a date before scanning/entering
a lot name, the system would inadvertently overwrite and potentially accept the
wrong date for a new lot (the one from the line instead of the one entered by the user).

Reverting to the previous behavior where the date is cleared if no
existing lot is found. This ensures the user must explicitly provide
a date for new lots **after** scanning the name, preventing data integrity issues caused by
incorrect UI sequencing.
Signed-off-by jbaudoux
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: wms-16.0/wms-16.0-shopfloor_reception
Translate-URL: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_reception/
@bt-admin bt-admin added the 16.0 label May 4, 2026
@bt-admin bt-admin merged commit 176d17b into brain-tec:16.0 May 4, 2026
4 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 95.59322% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.86%. Comparing base (c28a95d) to head (f687d7a).
⚠️ Report is 242 commits behind head on 16.0.

Files with missing lines Patch % Lines
shopfloor_reception/services/reception.py 86.17% 7 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             16.0     #661      +/-   ##
==========================================
+ Coverage   94.81%   94.86%   +0.04%     
==========================================
  Files         613      617       +4     
  Lines       26742    26897     +155     
  Branches     1846     1860      +14     
==========================================
+ Hits        25355    25515     +160     
+ Misses        999      988      -11     
- Partials      388      394       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants