On 11/04/12 02:56 -0700, Henrik Genssen wrote:
> I am pretty new to tryton - so maybe this is a real dump question...

I see top-posting.
Please follow the netiquette:
https://groups.google.com/d/topic/tryton/-IA9TLq5qag/discussion

> if I have an Integer/float etc. field and set this to required - why is 0 
> not valid?

Because it was a design choice at early stage. The idea was as the
client was not able to manage None value for numeric, it was decided to
get the same behavior on server side.
But now, in trunk the client can manage None value and than the server
also. So required on numeric is now 'NOT NULL' constraint as for other
fields.

> I would understand if an empty field would be invalid...
> 
> Is there a way to construct a field of Int/Floar that is required but 
> allows 0 as a valid value?

On <= 2.2, just create a field with required=False
On >= 2.4, just create a field and required doesn't influence.

-- 
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: pgp6N3a2tkAq0.pgp
Description: PGP signature

Reply via email to