bikalabs/Bika-LIMS — pull request #1378 by xispa (2014-12-05 19:37:52+00:00)
Title: LIMS-1441 An error message related to partitions unit is shown when selecting analysis during AR creation

mL is not recognized as a unit by Magnitude, the module used by Bika LIMS for computing with numbers with units. Since mL is commonly used instead of ml to avoid confusion with the number one, "L" has been added as a 'recognizable' unit by Bika-LIMS. L unit (as liter) is also recommended by the [NIST Guide](http://physics.nist.gov/Pubs/SP811/sec05.html#table6).

For further reference, extract from the [Magnitude documentation|http://juanreyero.com/open/magnitude]:

```
A physical quantity is a number with a unit, like 10 km/h. Units can be any
of the SI units, plus a bunch of non-SI, bits, dollars, and any combination
of them. They can include the standard SI prefixes. Magnitude can operate
with physical quantities, parse their units, and print them. You don't have
to worry about unit consistency or conversions; everything is handled
transparently. By default output is done in basic SI units, but you can
specify any output unit, as long as it can be reduced to the basic units of
the physical quantity.

The basic units understood by the magnitude module are:

indicator meaning
--------- -------
$ dollar ('dollar' is also acceptable)
A amperes
bit binary digit
cd candela
K degrees Kelvin
kg kilograms
m meters
mol amount of substance
s seconds

From these basic units you can derive many other units. The magnitude
package predefines these derived units:

Bq becquerel
C coulomb
c speed of light (m/s)
day
degC degree Celsius
dpi dots per inch
F farad
ft feet ("'" is also acceptable)
g gram
gravity acceleration due to gravity (m/s**2)
Gy gray
H henry
h hour
Hz Hertz
inch ('"' is also acceptable)
ips inches per second
J joule
kat byte
l liter
lightyear light year
lm lumen
lpi lines per inch
lux
min minute
N newton
ohm
Pa pascal
S siemens
Sv sievert
T tesla
V volt
W watt
Wb weber
year

Two magnitudes have no units, 'rad' (radian - unit of plane angle) and 'sr'
(steradian - unit of solid angle).

Any of the above units can be augmented with the following set of scale
prefixes:

letter scale name
------ ----- ----
y 1e-24 yocto
z 1e-21 zepto
a 1e-18 atto
f 1e-15 femto
p 1e-12 pico
n 1e-9 nano
u 1e-6 micro
m 1e-3 mili
c 1e-2 centi
d 1e-1 deci
k 1e3 kilo
Ki 2^10 Kibi
M 1e6 mega
Mi 2^20 Mebi
G 1e9 giga
Gi 2^30 Gibi
T 1e12 tera
Ti 2^40 Tebi
P 1e15 peta
Pi 2^50 Pebi
E 1e18 exa
Ei 2^60 Exbi
Z 1e21 zetta
Y 1e24 yotta
```