Skip to content

[18.0][MIG] stock_picking_import_serials: Migration to 18.0#695

Open
deeniiz wants to merge 18 commits into18.0from
18.0-mig-stock_picking_import_serials
Open

[18.0][MIG] stock_picking_import_serials: Migration to 18.0#695
deeniiz wants to merge 18 commits into18.0from
18.0-mig-stock_picking_import_serials

Conversation

@deeniiz
Copy link
Copy Markdown
Collaborator

@deeniiz deeniiz commented Sep 16, 2025

No description provided.

Copilot AI review requested due to automatic review settings September 16, 2025 11:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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):
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
for row_index in range(max_columns):
for row_index in range(sheet.nrows):

Copilot uses AI. Check for mistakes.
tuple(
[
_get_cell(sheet, row_index, x, xlrd.XL_CELL_TEXT)
for x in range(max_columns)
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

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).

Suggested change
for x in range(max_columns)
for x in range(LAST_COLUMN)

Copilot uses AI. Check for mistakes.
]
)
)
return data
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
return data
return data

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale label Feb 22, 2026
@eantones eantones added no stale and removed stale labels Feb 23, 2026
@deeniiz deeniiz force-pushed the 18.0-mig-stock_picking_import_serials branch from 27ecc2e to 1134540 Compare March 12, 2026 10:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 16.86047% with 143 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (18.0@4b294fd). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ort_serials/wizard/stock_picking_import_serials.py 15.88% 143 Missing ⚠️
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.
📢 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants