openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #23904
[Bug 1152204] Re: [7.0 ] context is not passed to constraints function
*** This bug is a duplicate of bug 891592 ***
https://bugs.launchpad.net/bugs/891592
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.
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1152204
Title:
[7.0 ] context is not passed to constraints function
Status in OpenERP Server:
New
Bug description:
when you redefine a constraint function used in _constraints property
of Model Class. The context passed to the CRUD function is not
transmitted to constraint functions. It is probabely the same if the
function in redefined.
Regards
Nicolas
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1152204/+subscriptions
References