[Erp5-dev] Predicates magic - property similar to price

Łukasz Nowak lukasz.nowak at ventis.com.pl
Tue Nov 28 13:30:59 CET 2006


Hi,

Dnia 27-11-2006, pon o godzinie 16:30 +0100, Romain Courteaud
napisał(a):
> Hello Luke,
> 
> The accessor getPrice is surcharged for movement.
> http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Movement.py?view=markup

Well. Ok. I accept it :)

But right now I have another question. As I shown above I managed to
getProperty('trade_name') using predicate in Sale Order Line context.
And right now, I wonder when/where/how shall I apply this value:

 * using TALES:Default python:
here.getProperty('trade_name',here.portal_domains.generateMappedValue
(here).getTradeName()) (in such case I'll have to restrict me from
'None' generateMappedValue)

 * somewhere in object Document/OrderLine.py by overriding accessor
_setTradeName?

Well, I'd like to have same behaviour as price is set.

Thanks,
Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
``Use the Source, Luke...''




More information about the Erp5-dev mailing list