[18.0][MIG] stock_picking_import_serials: Migration to 18.0#695
[18.0][MIG] stock_picking_import_serials: Migration to 18.0#695
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the stock_picking_import_serials module from an earlier version to Odoo 18.0. The module enables importing serial numbers to stock pickings from spreadsheet files (XLS/XLSX format).
Key changes:
- Complete module migration to Odoo 18.0 with updated version number and copyright headers
- Python code refactoring for Odoo 18.0 compatibility while maintaining XLS/XLSX import functionality
- XML view updates following Odoo 18.0 structure and conventions
Reviewed Changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
__manifest__.py |
Module manifest updated to version 18.0.1.0.0 with dependencies and metadata |
wizard/stock_picking_import_serials.py |
Core wizard logic for importing serials from Excel files with data validation |
wizard/stock_picking_import_serials.xml |
XML view definition for the import wizard interface |
views/stock_picking_views.xml |
Extension of stock picking form view to add import button |
security/ir.model.access.csv |
Access rights configuration for the wizard model |
i18n/es.po |
Spanish translations for the module |
| Various other files | Supporting files like README, init files, and project configuration |
| _("Incorrect format file, the number of columns must be 2 minimum") | ||
| ) | ||
| data = [] | ||
| for row_index in range(max_columns): |
There was a problem hiding this comment.
The loop should iterate over rows, not columns. This should be range(sheet.nrows) instead of range(max_columns) to iterate through all rows in the sheet.
| for row_index in range(max_columns): | |
| for row_index in range(sheet.nrows): |
| tuple( | ||
| [ | ||
| _get_cell(sheet, row_index, x, xlrd.XL_CELL_TEXT) | ||
| for x in range(max_columns) |
There was a problem hiding this comment.
The range should be LAST_COLUMN instead of max_columns. This inconsistency means it will try to read more columns than expected (all columns vs just the first 2).
| for x in range(max_columns) | |
| for x in range(LAST_COLUMN) |
| ] | ||
| ) | ||
| ) | ||
| return data |
There was a problem hiding this comment.
The return statement is inside the for loop, causing the function to return after processing only the first row. This should be unindented to be outside the loop.
| return data | |
| return data |
21f53c8 to
27ecc2e
Compare
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
…und on picking lines
…anslation function
If filename contain points, an error is shown.
…ore data than just the products and the serial
27ecc2e to
1134540
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 18.0 #695 +/- ##
=======================================
Coverage ? 16.86%
=======================================
Files ? 3
Lines ? 172
Branches ? 43
=======================================
Hits ? 29
Misses ? 143
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.