[Erp5-dev] PropertExistence Constraint and acquired properties
Yoshinori Okuji
yo at nexedi.com
Fri Sep 19 09:23:57 CEST 2008
On Monday 15 September 2008 10:26:12 Łukasz Nowak wrote:
> Hello,
>
> I'm using PropertyExistence Constraint for Organisation portal type to
> check is address is defined.
>
> Well - this class is not working for "virtual" properties using
> storage_id, as test object.hasProperty('default_address_city') returns
> 0, even if object.getProperty('default_address_city') returns proper
> value.
This should be considered to be a bug. As you can see in Utils, ERP5 generates
testers, but perhaps the code does not cover all cases. Please check if
hasDefaultAddressCity is generated. My guess is that acquired_property_id is
not taken into account when generating testers.
Regards,
YO
>
> Of course I'll create my own Constraint class for such properties, but
> I'd like to know what is your opinion in this case. Shall it be another
> Constraint or shall PropertyExistence support such situation? (Or maybe
> there is Constraint class for this case which I missed?)
>
> Regards,
> Luke
--
Yoshinori Okuji, Nexedi KK President / Nexedi SA CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.co.jp/
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com/
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org/
More information about the Erp5-dev
mailing list