[Erp5-dev] Constraint's condition

Łukasz Nowak email at lnowak.com
Fri Dec 5 12:58:05 CET 2008


Hello,

I was playing some with Constraints and its configuration with
PropertySheets.

What I found out great is using condition parameter in PropertySheet, to
have conditional constraint. I've tried to describe this usage on wiki
http://www.erp5.org/HowToUseConstraints - you might be interested in
reviewing my work.

But one thing with condition surprised my. I thought that this parameter
would be checked automatically for my own Constraint classes - but it
isn't. For example in attached files, Constraint's condition defined in
PropertySheet won't be taken into account, if not invoked explicit.

Is it know issue, that shall be just noted for Constraint creators or it
could be feature request? If this is know thing, I'll remove note from
wikipage, so let me know.

Testing conditions: TestPropertySheet on Sale Order and Purchase Order,
with commented out code constraint is checked on both, with comments
removed - works as expected.

Maybe is that documented somewhere else?

Regards,
Luke

-- 
Łukasz Nowak IT Specialist email at lnowak.com http://lnowak.com/
Skype: Shufla jid: shufla at jabster.pl
``Use the Source, Luke...'' My blog: http://shufla.rootnode.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestPropertySheet.py
Type: text/x-python
Size: 396 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20081205/f5d734e2/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestConstraint.py
Type: text/x-python
Size: 421 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20081205/f5d734e2/attachment-0001.py>


More information about the Erp5-dev mailing list