Comment 1 for bug 1152204

Revision history for this message
Raphaƫl Valyi - http://www.akretion.com (rvalyi) wrote :

Hello Nicolas,

I think this one is a duplicate of some invalid bug. Indeed, model constraints apply to the persistent data in OpenERP philosophy. That is you could just pull the data from the database and apply constraint validation upon these data with no context.
Whereas context is something related to the transient context of the user interaction (menu, time etc...).
So I think it's a bit normal I think.

Now, yes, OpenObject (remember it's supposed to be a framework) totally lacks handy object life cycle hooks like a validate method that would validate data before saving both for write and create and considering the context. Well, you can always roll your own one, it's just ugly but ultimately it get the job done.

Hope this helps. Then eventually one could invalidate that bug.