← Back to team overview

openerp-community team mailing list archive

Re: NULL Integers

 

On 15/03/13 11:10, Holger Brunn wrote:

To trick OpenERP into showing your custom error message: Declare an
_sql_constraint with the same name and your error message, then
throw it away on SQL level in your init function and create your own
constraint.

OK, seems to work without dropping the _sql_constraint once you get the
names matching. Best to use a harmless constraint though.

But on the other hand: Is there a good reason not to use
_constraints and doing this check by hand?

I prefer to put data integrity stuff like this in the database if possible.
And it used to be possible (this is not new code). It's yet another thing
that's been deliberately broken for no apparent benefit.

Martin


Follow ups

References