On 12/05/11 10:30 +0200, Nicolas Évrard wrote:
> * Cédric Krier  [2011-05-12 10:13 +0200]:
> >On 12/05/11 09:45 +0200, Paul J Stevens wrote:
> >>This makes me wonder if perhaps the whole required state machinery needs
> >>to be able to allow zero values on numeric fields to satisfy the
> >>requirement. I'm well aware of where this comes from: in python numeric
> >>values of zero evaluate to False. However, is a business context an
> >>explicit zero-amount is *not* the same as an unspecified amount, or in
> >>other words: 0 is not False, only False is False.
> >
> >Have you ideas about how we could be sure to not have zero-amount per error?
> 
> You can have a sql constraint and a boolean field.

Having a checkbox if checked it allow zero amount as unit price.
Like that the user should explicitly says that he want a zero amount price.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpyFseZ6WSsb.pgp
Description: PGP signature

Reply via email to