Skip to content

Conversation

@BhaveshHeliconia
Copy link
Contributor

@BhaveshHeliconia BhaveshHeliconia commented Jan 2, 2026

This update fixes a few issues we encountered when running with newer versions of xlrd (2.0 and above), which dropped support for .xlsx files. The existing fallback mechanism wasn't catching this case correctly, causing import failures in updated environments.

I've improved the file detection logic to explicitly check for the file signature (PK header), which allows us to correctly route .xlsx files to openpyxl when needed, while safely keeping the traditional xlrd behavior for legacy .xls files.

I also took the opportunity to clean up how we handle date fields. I noticed that midnight timestamps (like "2025-01-01 00:00:00") were sometimes being passed to Date fields, causing Odoo to reject the import with "unconverted data" errors. I've updated the value extraction logic to enforce the correct format based on the field type—stripping the time component for Date fields while preserving it for Datetime fields.

@OCA-git-bot
Copy link
Contributor

Hi @kittiu,
some modules you are maintaining are being modified, check this out!

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.

2 participants