senaite.core
senaite.core copied to clipboard
AR Create. Sample Type does not autocomplete with Sample Point
Sample Type / Sample Point selection used to limit look-ups options on their counterparts to save clicks during AR Create. Sample Type is often unique per Sample Point and best explained
Steps to reproduce
Select a Sample Point that has a Unique Sample Type assigned to it, eg
Current behavior
Sample Type field is left empty after the Sample Point with fixed Sample Type, Dust, was selected
Expected behavior
The Sample Type field to be auto-completed with dust.
And where more than one Sample Type is available at the Sample Point, the former's look-up be restricted to the valid Sample Type only. This used to work the otherway round too, but is not used that much and can be ignored in the interest of simplicity. I suppose one could raise a warning, and/or simply proceed.
Can be worked around in AR templates but to good to leave off AR Create
This commit solves this issue although I would like to discuss better ways to solve.