Hi Charles, Could you please state with which version this is committed to OFBiz trunk? I am very much interested in this subject and didn't find anything related when I upgraded to the latest version this morning.
Regards, Pierre 2012/1/31 STELTZLEN Charles <[email protected]> > Hi, > > > Yes this is a good idea. We did such a modification into an old OFbiz >> project and it was very useful. >> > > It's now updated for ofbiz trunk and package as an addon ;-) > > We have implemented a new entity called GeneralPropertyAttribute that > allow us to manage dynamic properties. > > That solve multi-tenant issues and allow us to overload classical file > properties > (new usage of getPropertyValue search properties in bdd, and, if it > doesn't exist, get classical property from file). > > We also use a fromDate/thruDate to be able to disabled it. > > I will send you a patch in the next few days. > > Charles > > PS: see comments below > > > >> On 27/01/2012 07:40, Hans Bakker wrote: >> >>> Problem: >>> ------------ >>> 1. If you would like to have different tenants on your system and want >>> to have different property settings for each tenant laike language or >>> currency etc, that is currently not supported. >>> 2. the properties are not very well organized, to say the least. >>> >>> Proposal: >>> ------------ >>> 1. create the following entity SystemProperty with fields: >>> systemPropertyId(key) >>> parentSystemPropertyId >>> description >>> ofbizPropertyName(index) >>> systemPropertyValue >>> >> In your case : GeneralPropertyAttribute > propKeyId (key) > fromDate (key) > thruDate > propValue > propName > propDomain > resource > comments > > The propKeyId is same value as property index in properties files. > We don't use a system of parent record (I don't see the functional > purpose). > But we add a field "propDomain" that allow us to indicate a domain, just > for search/filter or simple classification. > As I said above, we also use a fromDate/thruDate to be able to disabled it. > > For instant, field "resource" is added to keep transparency between both > properties systems, > and to set property file name that will be overloaded. > > Not sure that's the best way... > > > >>> Initially load the systemPropertyid from the ofbiz propertyId so >>> accounting.fixedasset.**autocreate=Y will have 3 records using the >>> parent id but only the lowest level will have the accounting.fixedasset. >>> **autocreate name and value=Y >>> >>> In your implementation, no initial load. > > when we have this working we can slowly reorganize these records without >>> having to change the programs. >>> >>> 2. add the delegator parameter to the getPropertyValue method and change >>> the method system wide. >>> the getPropertyValue method will first look in this entity with the >>> provided delegator and when the property is null or not found, use the >>> properties file property as currently is done. >>> >> Exactly what we do. > > 3. resolve anywhere where this method is called and where the delegator >>> is not available. >>> >> This part need some improvement. Depends on what you want. > > 4. add a webtools option to set the properties. >>> >> In the addon, we have a portal page with a simple portlet for > GeneralPropertyAttribute > > >>> Please provide comments or counter proposals...... >>> >>> Regards, >>> Hans >>> >>> Thanks for your comments, > >
