Skip to content

[18.0][FIX] spreadsheet_oca: compute filename per record - #136

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
chichi0718:18.0-fix-spreadsheet_oca-filename
Oct 20, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:18.0from
chichi0718:18.0-fix-spreadsheet_oca-filename

Conversation

@chichi0718

@chichi0718 chichi0718 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

_compute_filename reads self.name inside for record in self, so computing filename on more than one record at once (list views, exports, batch read()) raises:

ValueError: Expected singleton: spreadsheet.spreadsheet(2, 3)

This PR uses record.name.

The same one-line fix is also part of the larger feature PR #99; it is extracted here so the bug fix can land independently of that review.

@pedrobaeza pedrobaeza added this to the 18.0 milestone Oct 20, 2026

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please check https://github.com/pypa/pip/blob/main/AI_POLICY.md and remove the test that is not adding real value.

_compute_filename read self.name inside the loop, so computing the field
on more than one record at once (list views, exports, batch reads)
raised "ValueError: Expected singleton".
@chichi0718
chichi0718 force-pushed the 18.0-fix-spreadsheet_oca-filename branch from 3448f2a to fe6e0ef Compare October 20, 2026 15:47

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the changes. Let's fast-track this, as obvious patch.

/ocabot merge patch

Please fw-port it to 19 if applicable.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-136-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 47b6750 into OCA:18.0 Oct 20, 2026
6 of 7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at b7884e8. Thanks a lot for contributing to OCA. ❤️

@chichi0718

chichi0718 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks! Forward-port to 19.0: #139

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.

3 participants