Skip to content

Allow manual volume entry for bottles widget#151

Open
nnpvaan wants to merge 4 commits into
masterfrom
manual-bottle-volume
Open

Allow manual volume entry for bottles widget#151
nnpvaan wants to merge 4 commits into
masterfrom
manual-bottle-volume

Conversation

@nnpvaan

@nnpvaan nnpvaan commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR updates the sample type container controller so bottle volume is only auto-calculated and forced read-only when the selected bottles setup is configured for automatic volume calculation. It also rebuilds the bundled frontend assets and updates the static resource reference.

Linked issue: https://github.com/beyondessential/bes.tuvalu.lims/issues/4

Current behavior

When the Bottles widget is shown in the add form, the main Volume field is forced to read-only and bottle volume recalculation still runs on bottle container/weight changes, even for setups where bottle volume should be entered manually.

Desired behavior

When the Bottles widget is shown in the add form, the main Volume field is only read-only if bottle volume is auto-calculated. For manual bottle-volume setups, the Volume field stays editable and automatic recalculation is skipped.

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@nnpvaan nnpvaan requested a review from xispa June 2, 2026 08:27
@nnpvaan nnpvaan self-assigned this Jun 9, 2026
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