*** reinhard has joined #gnuenterprise good morning all *** johannesV has joined #gnuenterprise good morning *** dimas has quit IRC *** johannesV has quit IRC *** lekma has joined #gnuenterprise good morning all reinhard: are you available for a few questions? yes (if you can accept slow answers, am on the phone) ok first i really need to understand what filters are, cause it seems i may need this functionnality could you provide an example please from what i understood they are some kind of reference from a class to another class but to what purpose? *** johannesV has joined #gnuenterprise the idea behind filters is to implement things like multi company you have a table "company" that contains the companies and all other tables have a foreign key to the company table you select the company you want to work in at startup or you can even define it in your connections.conf and you will only see the records for your company how do you define a filter and why is getFilers language dependant? couls this filter process be used to implement locale dependent data? ie if i have a lang class and translation classes can i use filters to rule out all record that are not in my locale?\ you could do that getFilters is language dependent because it returns a structure containing a question to ask and the possible answers like "Company" and "company1", "company2",... but for German it will not be "Company" but "Firma" you can find example for filters in gnue-luca could you give the svn url of contrib (gnue-luca is in contrib, right?) gnue-luca is a separate svn repo oh svn.gnuenterprise.org/var/svn/gnue-luca/trunk svn co http://svn.gnuenterprise.org/var/svn/gnue-luca/trunk gnue-luca svn: PROPFIND request failed on '/var/svn/gnue-luca/trunk' svn: Could not open the requested SVN filesystem do you have an idea what's going on? I use svn+ssh instead of http I don't know how it works with http that's ok the correct http url is: http://svn.gnuenterprise.org/gnue-luca/trunk hmm i see some examples, i'll try... is the whitepaper up to date? cause it mentions compound properties i'd like to know what these are oh they have been ditched the idea was originally to have some kind of C struct No parameter for the filter base_lang specified what does this mean? how do I set a parameter for a filer from the rpc pov? and is there a way to bypass a filter? *** kilo has joined #gnuenterprise InvalidFilterValueError: \'en\' is not a valid filter of the type \'base_lang\'\n' i'm a bit lost with this filter functionnality even though it seems useful just a second you have a class base_lang? this is my module def I think you didn't understand correctly if you have a filter="base_lang", appserver creates the field implicitly yeah I think lang and langtxt would be the same class without filter= and then you have some other classes that have language dependent data that have filter="base_lang" on login, you give base_lang = so i need to make a session request to find out which gnue id apply to my filter? before i do anything else that's the purpose of getFilters it gets you the valid values with their respective gnue_id the idea is that you can, on the front end, display a dropdown with the values and let the user select, and then send the corresponding gnue_id at login but what i get from getFilters is only a bunch of gnue_id's so i still have to find out what data they represent mySession = myServer.open({"_username": "", "_password": ""}) myFilters = myServer.getFilters("en") you might need a corresponding gld for the gcd defining the filters for test purpose this is how i connect btw, you can do getFilters *before* the open because you need the filter in the open ok i don't get the needing of a gld, what it will provide are labels only, not the data, the filter i want represents langs like en, fr, de, zh... these are data in base_lang.base.code so how getFilters will give me those? what i'd like at the end is a table base_lang: fr en de zh and table base_langtxt: fr en french fr fr français en en english en fr anglais ... a translation table in this example the lang code and the lang translation code are from the same class so i was thinking maybe if i had a filter base_lang = en i didn't have to put an extra condition when accessing translation classes cause it would rule out all record which are not base_lang == en ah ok i understand getFilter returns a rather complex structure with dictionaries where labels and data are interwoven i see now that with a gld it's different I think it might be an improvement to fall back to something more meaningful if there is no gld creating an issue now... err wait as I write it, it gets logical why it doesn't work without gld the base_lang class could have dozens of fields yep and in the gld you define which of these fields you want to see in the login dialog (i.e. you want to get in getFilters) how? you see only those fields that have a searc= search= which is a pb by itself cause if i understand correctly search is also used in gnue-forms right? yes, but for the same purpose to be precise, it's used for generated forms that have a foreign key to the language so search is what you want to see in the dropdown when you select a language and you probably want to see the same in the login dialog (to select a language) or in any other form (to select a language) there can be mixups between the filter use (where you would only see, say, the code) and gnue-forms use (where you'd like to see the code and smthing else) why? in a login dialog you don't want to clutter the ui with too much things you can also have multiple fields in filter use and in the forms you need the info how can you bypass a defined filter? for migration purpose, for example http://www.gnuenterprise.org/~reinhard/filter_login.png shows how a login dialog looks like with more than one search= you can bypass a filter by explicitly including the filter property into the condition tree only if the condition does not contain any reference to the filter property, appserver implicitly adds a "... and filter_property = filter_value" bbl, lunch back i really think the search attribute for getFilters use should be in gcd's instead of gld the result of a getFilters("en")[3] is a dict with one property whose label is empty, is that correct? if so why the empty label? s/getFilters("en")[3]/getFilters("en")[0][3] elements 2 and 3 of the tuple include definition of related filters if filters are not related, element 3 is a dictionary with a "None" key say you had dialects like for "en" you can have "en_GB", "en_US", etc then you had 2 filters language and dialect the set of valid dialects would depend on the language al right you can probably see that the filter stuff hasn't gone throught the "lekma quality check" system ;-) but I think in basic principle, it's usable and the right direction :) sooner or later we will have to play around with the login process a little more, when we want to add real security to appserver like login with kerberos or whatever ldap woud be great and we might well then think the filter stuff through again I would prefer login methods that don't send passwords over the net so we would either need a wrapper that encrypts passwords client side and decrypts server side or use an authentication system that is secure as such I've been thinking TLS, SASL, Kerberos, GSSAPI and a lot of other buzzwords, but I need to read deeper into it to see what fits with what we actually need but that's down the road anyway, we focus on forms nowadays just a thought: could it be possible that instead of sending "base_lang": "the32charsgnueidofthedeath" in your params we send "base_lang.base_code": "en" as a filter? base_code is not guaranteed to be unique IIRC we had that once but then we switched to gnue_id because we felt that was safer lol @ gnueidofhtedeath *** jamest has joined #gnuenterprise *** lekma has quit IRC *** kilo has left #gnuenterprise hmmm i was thinking there was a way to iterate through all the records loaded into a form (to create a sum in a trigger) without updating the UI yes, you can use the resultset as an iterator like for rec in blkFoo.getResultSet(): for rec in blkFoo: ok, thanks should actually work, too the blkFoo: does work but scrolls the UI ah yes it does right i need it to not do that as accounting doesn't like their entry forms scrolling after each tab :) I wonder whether the scrolling is on purpose or it could be changed as I actually don't like the idea that trigger code can directly access the RecordSet at all err the ResultSet i don't know thy the result set is exposed now as i'd always used the for rec in blkFoo: in my triggers *** dimas has joined #gnuenterprise *** klasstek has joined #gnuenterprise *** derek has quit IRC *** johannesV_ has joined #gnuenterprise *** johannesV has quit IRC *** sacha has joined #gnuenterprise *** derek has joined #gnuenterprise *** jcater has joined #gnuenterprise *** tinwood has joined #gnuenterprise *** tinwood has left #gnuenterprise *** bjantscher has joined #gnuenterprise *** sacha has quit IRC *** sacha has joined #gnuenterprise *** dimas has quit IRC *** sacha has quit IRC *** sacha has joined #gnuenterprise *** SeanTater has joined #gnuenterprise *** SeanTater has left #gnuenterprise *** sjc has joined #gnuenterprise *** sacha has quit IRC *** johannesV_ has quit IRC jamest: could you unsubscribe harder@brinkmann.nl from all gnue lists? this address is broken *** sacha has joined #gnuenterprise yes, i can in a bit *** psu has joined #gnuenterprise *** sacha has quit IRC *** klasstek has quit IRC *** klasstek has joined #gnuenterprise *** sacha has joined #gnuenterprise *** klasstek has quit IRC *** klasstek has joined #gnuenterprise *** ra3vat has joined #gnuenterprise *** ra3vat is now known as dimas *** bjantscher has quit IRC *** psu has quit IRC *** sacha is now known as SachaZzzz *** SachaZzzz has quit IRC *** lupo__ has joined #gnuenterprise *** SachaZzzz has joined #gnuenterprise *** kilo has joined #gnuenterprise *** jamest has left #gnuenterprise good night all *** reinhard has quit IRC *** lupo__ has quit IRC *** kilo has left #gnuenterprise *** klasstek has quit IRC *** sjc has quit IRC *** jcater has quit IRC *** jcater has joined #gnuenterprise *** jcater_ has joined #gnuenterprise *** derek has quit IRC *** derek has joined #gnuenterprise *** Amorphous has quit IRC *** Amorphous has joined #gnuenterprise *** dimas has quit IRC