*** kilo has joined #gnuenterprise *** sjc has joined #gnuenterprise *** dimas has quit IRC *** johannesV has joined #gnuenterprise good morning morning johannesV *** dimas has joined #gnuenterprise hi lekma lekma, have you had some time to check the latest changes in appserver ? not the dependency thingy yet, but i'm running latest svn right now so if smthing pops up i'll tell you ok, great :) i'm fighting reports atm :( it has the same lack appserver had to me when i started with it... doc i haven't spent a lot of time with reports until now is there any plan to integrate appserver an reports ie using the same session... well, appserver should be able to generate report-definitions (grd) like it does not with forms in the future, but in principle, appserver is just a backend for reports erm, like it does now with forms ... so one could do gnue-reports appserver://appserver/report/address_person to get a simple, tabular report for that class hmmm i think a more thightened relation should exist between those how would you see appserver and reports beeing integrated ? like appserver storing grd and running the report with some filters parameters, and so on on demand but that should be part of report-server, shouldn't it ? if it is then report server should be able to share backend with appserver for example i shouldn't have to provide twice user/pass (one for appserver , one for report) but i didn't understand the actual state of report server it does start but how to use it ?? anyway i'm wrestling with some workarounds i think report-server is not really implemented atm involving other tools to make the result of a grd exploitable(? english word?) what do you mean with exploitable ? *** dcmwai has quit IRC johannesV: you still around ?? kind of, yes i think i have a pb related with lasts changes Traceback (most recent call last): File "", line 15, in OrderValidBatch File "/var/lib/gnue/gecocer/SalesOrderBatch.py", line 111, in salesOrderBatch self.flagCreated = validOrders.salesOrderValid () File "/var/lib/gnue/gecocer/SalesOrderValid.py", line 145, in salesOrderValid self.__session.commit () File "/usr/lib/gnue/appserver/language/Session.py", line 212, in commit self.__sm.commit (self.__session_id) File "/usr/lib/gnue/appserver/geasSessionManager.py", line 290, in commit s.commit () File "/usr/lib/gnue/appserver/geasSession.py", line 325, in commit self.__connection.commit () File "/usr/lib/gnue/appserver/data.py", line 809, in commit backend.insert (table, fields, recNo) File "/usr/lib/gnue/common/datasources/drivers/Base/Connection.py", line 156, in insert return gLeave (8, self._insert (table, newfields, recno)) File "/usr/lib/gnue/common/datasources/drivers/DBSIG2/Connection.py", line 436, in _insert return self.__execute (statement, parameters, recno) File "/usr/lib/gnue/common/datasources/drivers/DBSIG2/Connection.py", line 383, in __execute raise Exceptions.ConnectionError, \ ConnectionError: ERROR POSTING RECORD # 1 ERROR: insert or update on table "ship_pickpos" violates foreign key constraint "fk_ship_pickpos_ship_pickorder" DETAIL: Key (ship_pickorder)=(11d999f3b21c7cd8824b00e01828be70) is not present in table "ship_pickords". INSERT INTO ship_PickPos (ship_pickOrder, ship_qtyReq, gnue_id, gnue_createdate, ship_pickPosStatus, ship_qtyConf, ship_pickPos, gnue_modifydate, ship_salePos) VALUES ('11d999f3b21c7cd8824b00e01828be70', '1.0', '11d999f3b223693a824b00e01828be70', '2005-03-21 11:26:32', '0', '0.0', '10', '2005-03-21 11:26:32', '11d993dd5adac3e4829300e01828be70') there is one script that checks order and create picking list accordingly hmm it raise an error where it wants to create a picking list position related to a picking list header that has not been posted yet i don't know why it seems it puts the detail before the master in the commit order (btw it used to work with latest release) can i see the gcd somewhere ? of course i can send ok, jv at bytewise dot at but most of the code occurs outside in external python scripts (that i can also send, but i don't want you to feel obliged to debug our ugly code) :) could you please attach SalesOrderBatch.py and SalesOrderValid.py too ? ok i just want to have a look at the order of statements issued against the language interface sent if you need anything else, let me know lekma, ok, will check it asap lekma, your code is too complex to read and understand in a few minutes ... i've added debug-output (on level 1) to data.py. please svn up and run it using --debug-level 1 this i believe :) so we then see which are the deps and how appserver is ordering stuff ok i've to run for lunch now, but i'll be back afterwards the last two? unordered and ordered? DB001: 0:00:47.488 [data:902] Unordered : [(u'stocks_MvtsLog', u'11d999f9befd2c44af8000e01828be70'), (u'ship_PickOrds', u'11d999f9bf08edccaf8000e01828be70'), (u'ship_PickPos', u'11d999f9bf11d928af8000e01828be70')] DB001: 0:00:47.489 [data:860] Ordered inserts: [(u'ship_PickPos', u'11d999f9bf11d928af8000e01828be70'), (u'stocks_MvtsLog', u'11d999f9befd2c44af8000e01828be70'), (u'ship_PickOrds', u'11d999f9bf08edccaf8000e01828be70')] i don't know why the stocks_MvtLog is here, butthe two other seem to be in right order in the unordered part off for lunch as well bbl * lekma is away: feeding the cat... lekma, can i have the constraints ? lekma, i think i've found it ... it's the case again ... if you check the debug-output of constraints, they should be all lowercase there ... lekma, please svn up and check again ... *** reinhard has joined #gnuenterprise back DB001: 0:00:47.486 [data:901] Constraints: {u'sales_salepos': {u'basics_taxcodes': True, u'basics_units': True, u'sales_salepostypes': True, u'basics_currs': True, u'articles_articles': True, u'sales_saleorders': True, u'basics_stores': True, u'stocks_mvts': True}, u'gnue_property': {u'gnue_class': True, u'gnue_module': True}, u'basics_companiessalesorgs': {u'basics_salesorgs': True, u'basics_companies': True}, u'accounts_partner': {u'acco unts_accounts': True, u'accounts_partnertype': True, u'basics_currs': True}, u'sales_saletypes': {u'basics_doctypes': True, u'stocks_mvts': True}, u'sales_saletypestxt': {u'sales_saletypes': True, u'basics_langs': True}, u'articles_types': {u'basics_stores': True}, u'basics_companies': {u'basics_langs': True, u'basics_calendars': True, u'basics_countries': True, u'basics_currs': True}, u'gnue_class': {u'gnue_class': True, u'gnue_module': T rue}, u'ship_pickords': {u'sales_saleorders': True}, u'xul_scripts': {u'xul_forms': True}, u'basics_stores': {u'basics_companies': True}, u'ship_pickpos': {u'sales_salepos': True, u'ship_pickords': True}, u'xul_items': {u'gnue_property': True, u'xul_elements': True}, u'stocks_mvtslog': {u'basics_units': True, u'articles_articles': True, u'stocks_mvts': True, u'basics_stores': True}, u'sales_saleorders': {u'basics_companiessalesorgs': True, u'basics_countries': True, u'basics_currs': True, u'sales_saletypes': True, u'sales_saleorders': True, u'accounts_payconds': True, u'sales_custs': True, u'basics_stores': True}, u'stocks_storetypes': {u'articles_types': True, u'basics_stores': True}, u'stocks_stocks': {u'basics_units': True, u'articles_articles': True, u'basics_stores': True}, u'xul_labels': {u'basics_langs': True}, u'xul_elements': {u'gnue_property': True, u'gnue_class': True, u'xul_forms': True}, u'articles_articles': {u'articles_types': True, u'articles_varskeys': True, u'docs_docs': True, u'basics_units': True}, u'stocks_mvts': {u'basics_stores': True}} constraints from the previous run i'll svn up it works now thx great, i'm glad i was able to help :) so i'll keep that debug-lines for a few days ... maybe i should consider another debug-level though thx again *** dimas has quit IRC *** johannesV_ has joined #gnuenterprise *** sjc has quit IRC *** kilo has quit IRC *** sjc has joined #gnuenterprise *** johannesV has quit IRC *** jamest has joined #gnuenterprise *** jamest has quit IRC *** jamest has joined #gnuenterprise *** dimas has joined #gnuenterprise *** titopbs has joined #gnuenterprise *** jamest has quit IRC *** jamest has joined #gnuenterprise *** dcmwai has joined #gnuenterprise *** jamest has quit IRC *** dimas has quit IRC *** johannesV_ has quit IRC *** reinhard has quit IRC *** johannesV_ has joined #gnuenterprise *** dimas has joined #gnuenterprise *** reinhard has joined #gnuenterprise reinhard: jamest, jcater: primary key support and row id support should work reinhard: currently primary key has priority over rowid because checking if rowid is available is not yet implemented reinhard: so you can set primarykey= attribute for datasources where you can't use the rowid, so gnue won't even try to access the rowid reinhard: (if you have joins or views) reinhard: I have tested it with postgresql reinhard: (OID) reinhard: johannesV_: if you have some spare time, could you please check if our other sql db's (interbase, mysql, sapdb, and sqlite) have a concept of rowids and have cursor.lastrowid implemented? *** jamest has joined #gnuenterprise reinhard, yes i can check that *** btami has joined #gnuenterprise hi btami should we make a designer release? btami, regarding upper () and lower () for interbase/firebird: is loading of that ib_udf things needed per connection or once per database-creation ? hi reinhard reinhard: i think so, but it has a known bug: after running a form from designer it never quits clean it needs more testing enyhow that was the old, old behaviour as well johannesV_: don't know i seem to recall the issue was that the GFInstance was never released btami: what do you think? should we release as is or not? i think it's better to release this is the debug run form right? yep btami: could you provide a NEWS entry for this release? I would do the prerelease and the release if you want i want to take a quick look at that hang as i know we fought that once before jamest: FWIW, I think you missed this: reinhard: jamest, jcater: primary key support and row id support should work reinhard: currently primary key has priority over rowid because checking if rowid is available is not yet implemented reinhard: so you can set primarykey= attribute for datasources where you can't use the rowid, so gnue won't even try to access the rowid reinhard: (if you have joins or views) reinhard: I have tested it with postgresql reinhard: (OID) does it repopulate on commit? yep all those records that had a change so I can at last get rid of my sequence hacks? on commit triggers? so if you have a db side trigger you will see the new state in your form after you've saved that rocks as i have sequences that are default that i have to manually populate via triggers prior to commit primarykeyseq :) i know :) reinhard: may i ask you to do it yourself (NEWS), i'm not in my best form, my father died yesterday :( jamest: we have done this for appserver long time ago, just had to make it more general btami: i'm sorry to hear that :( btami: oh, sorry to hear does it repopulate the rows after posting, but before detail records are posted? btami: sorry to hear that :( jcater: no thx all jcater: it does 1. post master 2. post details 3. commit jamest: then you need to watch out for that 4. requery details 5. requery master so the details wouldn't have access to their master's PK ah I see the issue if auto populated my thought whas that posting the details could also (via trigger) change the master reinhard: I agree tricky :) e.g. detail records have on-commit that write some kind of total value back into the master I have a lot of situations where that is true so actually the master has to be requeried twice johannesV_: rereading your question, it's needed only at database creation (once) odd, run form isn't working at all for me atm * jamest thought he used it last weke me too _stderrcatcher instance has no attribute 'flush' i think the reason is the latest GDebug patch about adding flush hmm probably need to include that in a try: except AttributeError: block I wonder what _stderrcatcher is an instance of? as I know file objects have .flush, as does stdout ok, i has a bad entry in my connection.conf it's a custom class in Debbuger.py ok is svn slow? I'll look and fix... the fact that it's trying to call flush from stderrcatcher is pointing to a bug IMHO just don't know why forms want to try _ALL_ connection entry al all ? i've been trying to svn up since I said it wasn't working :) *** lekma has quit IRC because the object that flush is called of can't actually be a stderrcatcher object I think the reason might be that debugging is initialized twice i.e. GDebug.setDebug is called twice svn working at all? jamest, mine prompted for password and hasn't moved *** lekma has joined #gnuenterprise johannesV_ and btami and jcater: are you guys commiting anything as those are the 3 open svn processes on the server i'v just tried to svn up, but give it up no was svn up'ing yep, me too jamest: will commit fix for requery (requery before posting child records) as soon as svn works again ok, svn should work viewcvs had it locked committed *** dcmwai has quit IRC bbl jamest, jcater: does anybody of you use datasources that contain joins? no, I create views first I've never used the join featyre err wait, I'm thinking specifically unions the problems with multi-table datasources is that it breaks rowid support "select oid from table1, table2" will probably never work but then again, such datasources can't insert/update/delete anyway, can they? *** elwis has joined #gnuenterprise hi elwis Hey there.. Trying to figure this out .. Iäma jabber man :) *** wendall911 has joined #gnuenterprise reinhard: sorry, I was thinking unions yes, I do joins like that but they are always read only (as I think they would always have to be) ok would you think it's sufficient to not do rowid's for read only datasources? (instead of doing a bogus select on the rowid field to check if the database supports a rowid) and define that all read-write datasources *must* work with rowid if the db has rowids? duh neither block nor datasource have readonly attributes? how *do* i set a datasource readonly?? wa? i swore it did have a readonlyh it ==? if block.editable=N, then it's readonly I think there's an equiv datasource attribute too ah hmm, but I thought wrong can be added though looks like i was using readOnly from the createResultSet and what would you think about replacing the "test query" for rowid availability by a simple check "if not readonly"? ? there are cases where no rowid is available e.g. for datasources containing joins or (as you said) for certain kinds of views in the old code there was a bogus "select %(rowidField) from %(table) where 1 = 2" to find out whether the rowid can be used for this datasource or not my proposal is to always use the rowid for non-readonly datasources and fail at the select if it's not available instead of not using it for such cases and maybe getting weird behaviour on trying to update such a datasource this way, you could rely on the rowid always being there if you have read-write datasource so if the table in postgresql is marked as not having rowids? how would that work as that's set on a per table basis IIRC so it would automatically do a select oid, ... if the datasource isn't marked as read only and if that select fails, then it's just a developer error? jcater: yeah, that's my idea hmm, I'm not sure how favorable I am to that well, let's call it "request for discussion" I hate breaking existing installs i guess i'm missing something http://www.postgresql.org/docs/7.4/interactive/sql-createtable.html search for WITHOUT OIDS yep wouldn't that behaviour break our access to any tables created in such a mannor OIDs are not guaranteed to be unique??? wtf? reinhard: yeah, I just read that too that's news to me once they wrap the 32 bit counter (news to me as well) well, ok might be a seldom case sometimes I wonder whether I made a mistake switching to postgres :) but jamest you have a valid point here seems like we have to do the bogus select test *** mnemoc_ has joined #gnuenterprise jcater: best ditch unix too as the tiemstamp is only 32bits as well :) postgres is just "odd" I guess with some design decisions I think 8.0 fixes several, but I'm chicken to try it out nah, i think you're just used to oracle's oddities :) *** mnemoc has quit IRC *** btami has quit IRC question: does it make sense to have the primary key field in a master-detail relationship differ from the real primary key field of the master? IOW can the primary key used for update/delete where clause be a different field than the primary key used to link m/d? i can't find anywhere i've done that I have cases where I've done that ok just working on the implementation of "requery" property for datasources my understanding was that the requery after the commit should only happen if that property is true is that correct? and is it on purpose that this property defaults to true? that was my understanding as for the default to true i don't know argh! adjusting from oracle to postgres is a real bitch have i mentioned that yet? what now? postgres first uses column aliases in order by, whereas oracle uses field name so select to_char(creation_date,'MM/DD/YY') as creation_date from mytable order by creation_date; gives very different results in oracle vs postgres ouch oracle orders the field as a date field; postgres as the formatted text field um that's what you're telling it to do um in postgres you are in oracle you aren't :) not saying one is more right that the other I see logic behind both just learning all these oddities is giving me a headache first the group by difference this morning, then this :) ok, so "order by mytable.creation_date" gets me there may I spoil the evening with a trivial question? elwis: sure ;-) I'm reading and reading, trying to get some sense in my lousy little form I created this one usin the wizard, connecting 2 tables, with foreign keys But they have no logic inside them? cust_id doesn't give me a customer_name etc? is that Master/detail? there's no relation between the fields? I only pull data from one tabel at the time in the wizard you selected a primary key field and moved it into the right hand column then on the detail field did the same? I did?? :-) Hold it.. I never saw that? in designer do a new -> from wizrd Oh .... sorry wait, now i saw that question about "will these table have a master"? Feel like a.. lol np i always forget to click the button to move the fields I need/want to the right column Well, I bet I can find another one just as stupid as me.. give me some time :) is it working better now? Yes it is, except querying none - key-fields got such a HUGE error message . But now, I'll fire up vim and examine the secret.. :) bbl This is so much fun instead of finishing off the last university course in Java Servlets - who needs it ;) lol as i sit here coding in java Well, I've done enough of it the last year :) curious, have you a lot of experience from ERP systems before? myself? only things created in house Nothing that you've been selling making you rich then ;) *** johannesV_ has quit IRC i think reinhard's company sells an erp like system Well, mine does.. but nothing fancy, like my GNUe system will be .. of course :) jamest: quick question to requery of masterfields would you think they should only be requeried on insert? or can a trigger on update change a master link? (would seem odd to me) and is there only the need to query fields that have been NULL on commit? or could a trigger also set a field that has been set before? a trigger (in postgresql) can do anything to the row *** SachaS has joined #gnuenterprise change any field or even cause the insert or update to not take place *** lekma has quit IRC but would it make any sense to change a field that serves as link to details for an existing record ? hmmmmm not that I do it but what about this case here we have claim #s sometimes we copy a claim and extend the number out with a -1 -2 -3 -4 then when notes are added to one claim my app appends them to the original as well the claim number in this case is the PK simplest answer from me is that I don't do it but off top of my head I can see one case where a slight variation of our system could say all notes go against the original claim and a trigger could change the key value for the detail records which would probably play havok with keys :) silly question 57 of today, then I'll hit the bed.. are there builtin messageboxes in GNUe-forms? Found som dialog example.. yes you can use very basic message boxes or you can create another gnue form form and use that as a dialog box I just found showMessageBox.gfd, looks nice? Just put it in the same folder right? not quite do you have a fresh checkout? or a snapshot? Hmm.. I apt-getted into my UIbuntu box http://www.gnuenterprise.org/cgi-bin/viewcvs.cgi/gnue/trunk/gnue-samples/testcases/forms/gauntlet/ in there is a sample of a dialog it's really just a
set to be a dialog but for simpler dialogs you can do form.showMessage('Fax sent to %s' % faxNo, 'Invoice Sent') Ok, thank you. There's a lot to learn, this time I'll write it all down :) *** kilo has joined #gnuenterprise *** elwis has left #gnuenterprise does postgres treat an empty string as not null? prodepm=> select 1 where '' is not null; ?column? ---------- 1 (1 row)prodepm=> select 1 where '' is not null; ?column? ---------- 1 (1 row) as it's not null yikes ok didn't mean to dbl paste fwiw :) you mean oracle treats '' and NULL as equiv? yes that means I have to rewrite my zope things wow oh, ok, i was concentrating very very much to spot the difference between the two posts... so if the user doesn't type in an address line 2, for example it inserts null instead of empty string :-/ kilo: I was too :) i was too quick on the middle mouse button :) jcater: that's odd as I thought if my fields were blank in forumlator then the field in the db was null not '' I'm not so sure on my forms for some reason and this really sucks I did my data conversion last night pretty simple curs1.execute("""select * from ....""") for rec in .... : curs2.execute("""insert into ....""") where curs1 is pulling from oracle curs2 is inserting into postgres gack! it is inserting '' and none of my empty strings are null grrrrrr I can't believe how dissimilar oracle and postgres are * jcater wonders if he should've gone w/sapdb or firebird :) (too late now) pfft another question on the requery stuff it might be quite usual that a trigger on some master record changes all details, or even deletes or inserts detail records so actually a change in a master record should cause a complete requery of the detail resultsets would you agree? (would mean requery the detail resultset of the current record right after the commmit, and "forgetting" the detail resultsets for other records so they get requeried on record navigation) hmm I agree conceptually but I'm thinking of my users and how they'll react when if their screen rearranges itself after saving i.e., record order would change and focus would change I'm not sure how I feel as I see what you're saying and basically agree jcater: I've thought about navigating to the same record as was current record before commit for the details based on primary key? or just index-based? of course the rearranging would take place yes, based on primary key of course ok then I think that would be the bigger issue bigger than if records rearranged I think I'd like that then *** wendall911 has quit IRC *** dimas has quit IRC *** derek has quit IRC *** wendall911 has joined #gnuenterprise *** derek has joined #gnuenterprise *** dimas has joined #gnuenterprise *** kilo has quit IRC *** jamest has left #gnuenterprise *** sjc has quit IRC night all *** reinhard has quit IRC *** jcater has quit IRC *** titopbs has quit IRC *** titopbs has joined #gnuenterprise *** titopbs has quit IRC *** jcater has joined #gnuenterprise *** wendall911 has quit IRC *** dcmwai has joined #gnuenterprise *** dimas has quit IRC *** jcater has quit IRC *** dimas has joined #gnuenterprise