IRC logs of #tryton for Monday, 2010-02-22

chat.freenode.net #tryton log beginning Mon Feb 22 00:00:01 CET 2010
cedkvengfulsquirrel: but it is not necessary the best way00:00
cedkvengfulsquirrel: there is a lot of POS arround00:00
cedkand I think we should first focus on the way to import POS data in Tryton00:01
vengfulsquirrelYes, I agree but a lot of them are too integrated with something else.  The dream scenario would be another POS interface with a tryton batch backend.00:01
vengfulsquirrelRight then if it comes to it a tryton POS interface could be developed to use that interface as well.  Although only if another decoupled POS could NOT be found.00:02
cedkvengfulsquirrel: I don't think POS are too integrated with something else00:04
cedkvengfulsquirrel: but they are oriented for specific sectors like restaurant...00:04
cedkI think most of it can export sales of the day into csv file00:05
cedkand somes are linked to the hardware00:05
vengfulsquirrelWell it would be good to have some target POS interfaces in mind because they seem hard for me to find.  Also preferably at least one that does not demand any specific hardware for smaller companies.00:07
cedkvengfulsquirrel: there is http://www.openbravo.com/product/pos/00:08
cedkvengfulsquirrel: http://www.openbravo.com/img-corp/product/screenshots/screen5-pos.png00:10
cedkvengfulsquirrel: the UI seems not too complicate00:10
cedkvengfulsquirrel: and could be done in Tryton with some custom widgets00:10
vengfulsquirrelcedk: Are you proposing to use openbravo pos as a gui frontend or to create a tryton pos based on openbravo's gui frontend ?00:12
cedkvengfulsquirrel: both are possible00:12
cedkvengfulsquirrel: using openbravo one will be faster00:13
vengfulsquirrelI hate how hard it is to try their products.00:15
cedkvengfulsquirrel: it can be part of their business :-)00:17
vengfulsquirrelThis asyncronous POS thing actually is an immediate problem for me.  I cannot find reliable internet for our second location.00:17
vengfulsquirrelHa yeah ughh, I also am allergic to java.  I'm trying to download it now though.00:17
vengfulsquirrelcedk: I moved my production deployment to its own VPS separate from my website and it is performing much better.  I think it was running out of resources.  I don't know if you remember me mentioning I was having a problem a week or two ago.00:18
petrusvengfulsquirrel: remedy for java: http://clojure.org/00:19
vengfulsquirrelcedk: I think my website was using too many resources or somehow stealing the resources from trytond because the behaviour of the two program was so much different.00:19
vengfulsquirrelpetrus: How does clojure compare to jython ?00:20
petrusvengfulsquirrel: it doesn't really. clojure is a nice lisp running on the JVM. it is very much an FP language (more than lisp). It has however access to Java libs.00:23
petruspetrus: main strengths: FP --> really works with threads00:24
petrusvengfulsquirrel: oops, don't know why I am writing to myself :-)00:27
cedkgood night00:30
vengfulsquirrelcedk: gn00:30
petruscedk: bye00:30
vengfulsquirrelpetrus: Ha yeah I do that all the time. Does jython not work well with threads?00:30
petrusvengfulsquirrel: don't have experience with jython, but python is not good witht hreads (GIL). Java, well, deal with them but you sooner or later have a synchronization nightmare.00:32
petrusvengfulsquirrel:  clojure on the other hand uses immutable functional data structures, so the problem just go away.00:34
petrusvengfulsquirrel: and consider that nowadays we have multicore everywhere00:35
vengfulsquirrelpetrus: Yeah I think jython circumvents the GIL problem. Although I would prefer to never venture out of CPython.00:51
petrusvengfulsquirrel: I don't know the implementation details for jython, you still got to have GIL and explicit synchronization.00:54
petrusvengfulsquirrel: when you work with immutable data structures, you just go about your business and forget about synchronization, no need.00:56
-!- petrus(~petrus@142.176.238.66) has left #tryton01:16
readyhi01:21
readyneed help. i try to set up tryton from trunk01:23
readystarting with empty database01:23
vengfulsquirrelDid you use the download script ?01:23
readyno, didnt notice there's a download script01:24
readyi gettin an exception when i do: bin/trytond -u all -d tryton01:25
readyinit stuff seems to work01:25
readyException: ('ValidateError', 'The value "en_US" for the field "lang" is not in the selection')01:25
vengfulsquirrelYou might need to run -i first.01:26
vengfulsquirrelready: Did you see this?  http://code.google.com/p/tryton/wiki/InstallationMercurial01:27
vengfulsquirrelThe script I'm talking about is just for downloading trunk and the modules.01:27
vengfulsquirrelready: I mean to use bin/trytond -i all -d tryton  (i for install instead of u for update) assuming the database is completely empty.01:28
readyhttp://www.pastebin.com/m2351a8b601:29
readythat's the error01:29
readyi'll retry it using -i01:29
readyvengfulsquirrel: i did not see that, thanks for that link, i'm going to bookmark it01:30
readysame error using -i01:31
readyi'll try to use the script from different dir01:31
vengfulsquirrelready: It is trunk maybe their is an unresolved problem?01:34
readyno :)01:49
vengfulsquirrelDid it work ?01:49
readyyes, now it works01:49
vengfulsquirrelWeird, well that's good.01:50
readyit seems i did not delete the old database correcly before resetup01:50
readythanks for all01:50
vengfulsquirrelready: Yeah, glad it worked.01:51
-!- digitalsatori(~tony@116.233.247.190) has joined #tryton02:22
-!- vengfulsquirrel(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton03:00
-!- yangoon(~mathiasb@p549F78C4.dip.t-dialin.net) has joined #tryton05:18
-!- ikks_(~ikks@200.118.243.193) has joined #tryton05:22
-!- vengfulsquirrel(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton07:28
-!- Timitos(~timitos@88.217.184.172) has joined #tryton07:56
-!- sharkcz(~dan@plz1-v-4-17.static.adsl.vol.cz) has joined #tryton08:13
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:16
-!- paepke(~paepke@p4FEB3983.dip0.t-ipconnect.de) has joined #tryton08:24
-!- sharoon(~sharoonth@opg066b.halls.manchester.ac.uk) has joined #tryton08:28
-!- mootoo(daemon@p5B32D1F8.dip.t-dialin.net) has joined #tryton08:55
mootoocedk, hello! you asked for locking tables with mysql?08:56
cedkmootoo: yes08:57
mootoocedk, what exactly do you want to know? there is a manual describing the complete lock commands here: http://dev.mysql.com/doc/refman/5.1/en/lock-tables.html08:58
cedkmootoo: I know but the issue is that you must lock every tables that will be accessed08:59
mootoocedk, so you want to lock the whole database?09:00
cedkmootoo: but Tryton is a generic framework so we can not assume which tables will be query during the lock of one09:00
cedkmootoo: I have thought about locking all tables but the issue is that MySQL required to explicitly locks also alias tables09:00
mootoocedk, could that do the trick? http://dev.mysql.com/doc/refman/5.1/en/lock-tables-and-transactions.html09:02
mootoosecond paragraph09:02
cedkmootoo: perhaps "TABLES WITH READ LOCK" should work09:05
cedkmootoo: I will try09:05
paepkemootoo, what about innodb vs. myisam. any proposal?09:09
cedkpaepke: I forced the use of innodb in the mysql patch09:09
mootoocedk, in which cases the tables will be locked by the framework?09:09
cedkmootoo: there is some places: computing the stock quantities, running the cron09:10
mootoocedk, paepke i think inno is neccessary with relations09:10
cedkmootoo: yes, to have a mimimum of constraints09:11
mootoocedk, do you need to lock tables write (preventing other threads writing to it) or do you want to take some sort of snapshot for the jobs?09:17
mootoocedk, in second case the start transaction thing should do it09:17
cedkmootoo: preventing any other write09:18
mootoocedk, then you have to lock the tables used explicitely (shown on the second transaction example)09:20
cedkmootoo: this is not possible09:20
mootoocedk, i'm not really sure but i think you only have to lock the table to which you write directly (not possible tables which have foreign keys)09:21
cedkmootoo: with locks, I must lock every tables that will be used in query between the locks and the unlock09:23
cedk"FLUSH TABLES WITH READ LOCK;" failed when two transactions run it instead of waiting09:29
cedkMySQL is really far from PostgreSQL09:30
mootoocedk, ive just talked to someone.09:30
mootoocedk, "start transaction; <run whatever you want in multiple queries> commit;"09:31
mootoothis will queue all other queries and execute the whole transaction at once. if one query in the transaction fails the whole transaction is discarded09:31
cedkmootoo: yes I know what is a transaction, but we need to lock tables09:32
mootoocedk, locking tables seems irrelevant within a transaction because no other task is able to change anything in the whole database (other requests are queued)09:33
cedkmootoo: per example for the stock quantity reservation, we need to ensure that nobody will change any moves until the commit09:35
cedkmootoo: and this is no ensure by the transaction mechanism09:36
cedkmootoo: it requires to lock the table09:36
-!- bechamel(~user@host-85-201-159-186.brutele.be) has joined #tryton09:37
mootoocedk, what are the logical steps to do the reservation?09:38
cedkmootoo: compute available quantity and modify status of moves into assigned09:39
mootoocedk, what if you put all steps neccessary into one transaction? or isnt that possible?09:40
cedkmootoo: it is in one transaction (every tryton call is in one transaction)09:40
-!- hoRn(~chatzilla@dslb-094-223-193-066.pools.arcor-ip.net) has joined #tryton09:42
-!- tony_(~tony@116.233.247.181) has joined #tryton09:42
cedkmootoo: but the problem can not be solved with transaction only, it must use a lock to prevent other transaction to modify the move table09:43
mootoocedk, then it should work without locking. for example: one instance runs the "whatever-calculation-which-needs-consistency" - any other instances run other tasks on the db. so every task (every whole transaction) will run after each other - there should be no way that data changes between two querys of one transaction09:43
vengfulsquirrelI think the part that is left out is that what is read has to be used later in the transaction to produce what is written.  So like read bank balance, add number, write bank balance.  If someone changes the bank balance since you read it then your write will not be correct.09:44
mootoocedk, two transactions dont run simultaneously (?)09:44
vengfulsquirrelIsn't that the problem ?09:44
cedkmootoo: in PostgreSQL they run in parallel09:44
cedkmootoo: and one will failed if it tries to modify a record that has been modified by the other09:45
cedkmootoo: I guess MySQL transaction works the same way09:45
mootoovengfulsquirrel, thats what i wanted to say: there is no other query which runs while the whole transaction is processed09:45
cedkmootoo: because I can start two transaction in //09:45
vengfulsquirrelTransactions do not fix the problem I described with the bank situation because they only determine if all writes or no write occur (for a transaction).  They do not stop reads since the beginning of the transaction.09:47
mootoohm09:48
cedk"FLUSH TABLES WITH READ LOCK;" seems to solve the issue except that it may raise a lot of error message like this one "Can't execute the query because you have a conflicting read lock"09:49
mootoocedk, right. this will block everything else while running the task09:49
cedkmootoo: it blocks write not read09:50
mootooah sry.09:51
mootoocedk,  then give it a try :)09:52
cedkmootoo: yes09:52
vengfulsquirrelcedk: Is this the current problem?  '''A session that requires locks must acquire all the locks that it needs in a single LOCK TABLES statement. While the locks thus obtained are held, the session can access only the locked tables.'''09:54
cedkvengfulsquirrel: yes09:55
-!- paepke_(~paepke@p4FEB149B.dip0.t-ipconnect.de) has joined #tryton09:59
vengfulsquirrelcedk: Yeah that is pretty limiting.  Do you think there will ever be a way to use row level locks?10:00
vengfulsquirrelThe purpose of the locking is for stock assignment right ?10:01
cedkvengfulsquirrel: row level locks is already working because we use serial transaction10:01
cedkvengfulsquirrel: with postgresql10:01
mootoocedk, here is some more information on per-record locks which does mysql automatically in transactions: http://dev.mysql.com/doc/refman/5.0/en/innodb-locks-set.html10:03
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton10:14
-!- essich(~essich@p4FCF8AB9.dip0.t-ipconnect.de) has joined #tryton10:21
-!- essich(~essich@p4FCF8AB9.dip0.t-ipconnect.de) has left #tryton10:21
-!- cedric_b(~cedric@ANantes-158-1-62-21.w86-195.abo.wanadoo.fr) has joined #tryton11:34
-!- tekknokrat(~gthielebe@dslb-188-103-022-099.pools.arcor-ip.net) has joined #tryton12:08
readyhow can i change design of a sale or invoice?14:31
cedkready: the quick and dirty way is to edit the odt file in the module15:01
cedkready: or by editing the content file from the client in "Administration>User Interface>Actions>Report"15:03
cedkready: and the dev way is to create a module that override the report http://doc.tryton.org/1.4/trytond/doc/reports.html#replacing-existing-tryton-reports15:07
-!- woakas(~woakas@190.144.69.234) has joined #tryton15:16
-!- paepke(~paepke@p4FEB149B.dip0.t-ipconnect.de) has left #tryton15:42
-!- sharoon(~sharoonth@opg066b.halls.manchester.ac.uk) has joined #tryton16:17
-!- tony_(~tony@116.233.247.181) has joined #tryton17:04
-!- vengfulsquirrel(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton18:00
-!- pepeu(~manuel@201.152.23.39) has joined #tryton19:07
-!- johbo(~joh@statdsl-085-016-072-173.ewe-ip-backbone.de) has joined #tryton22:02
-!- abm_(~antonio@87.223.97.175) has joined #tryton22:46
abm_Hi all, I'm studying OpenErp and Tryton... and why not tu use sqlalchemy for the db access?22:48
cedkabm_: because sqlachemy was not available when OpenERP started22:50
cedkabm_: and now using it will be too much work for little benefit22:52
abm_well, total independece of databases...22:52
abm_not only in connection, sql also...22:53
abm_something like  select([users.c.id], where(id==3)).limit(1)22:54
cedkabm_: it is a dream, all databases doesn't have the necessary feature to work for an business software22:54
abm_works for every database supported without moving a line22:55
cedkabm_: SQL is already a standard so SQL should work for any database22:55
abm_cedk: that's true, but if a enterprise want to use oracle...22:55
cedkabm_: it requires some tuning, but I think it can be done in less then 2 days22:56
abm_cedk: that's not true, oracle has it's tricks22:56
cedkabm_: I made a MySQL support in less then 2 days22:56
abm_and sqlserver also...22:56
abm_for example with datatypes22:56
cedkabm_: in Tryton we try to use only standard SQL22:57
abm_or for example, limit in postgres or TOP in sqlserver22:57
cedkabm_: we can handle different "limit offset" clause per database22:58
abm_but the sql inside modules is raw sql22:58
cedkabm_: yes but it must be standard22:59
abm_how you manage the particularities of a concrete db?22:59
cedkabm_: and it must use the database function that make it work on any database22:59
abm_no oracle support, no?22:59
abm_:)22:59
cedkabm_: and SQL inside module should be avoid as much as possible22:59
cedkabm_: no oracle because no access to oracle db23:00
cedkand by the way, I think we should stick to postgresql as it is a very good database engine much better then many other opensource one23:02
cedkbut I have not yet tested all opensource databases23:02
abm_yes, but I think, if tryton want to be an alternative in the ERP world, must be easily adaptable to other databases and integrated with legacy systems23:03
cedkabm_: and it is possible there is support for SQLite and next release will have support for MySQL23:04
abm_perfect...23:05
cedkabm_: but it will for now recommend to be used with postgresql23:05
abm_I'm working with postgres for last 7 years23:05
abm_and I'm very happy23:05
cedkabm_: SQLite support works quite well because it is closed to SQL standard and skip wihtout error what it can not perform23:06
cedkabm_: but MySQL is more difficult because it doesn't bahave well for some stuff23:06
abm_but, some clients, have other systems and uses for example SQLServer, and wants all their systems uses the same db (for maintenance, etc..)23:06
cedkabm_: this is a bad choice23:07
abm_Finally, we have ported all our systems to sqlserver23:07
abm_to accomplish the client requeriments23:07
abm_for that sqlalchemy is perfect23:07
abm_now, our system is db agnostic23:07
cedkabm_: sqlachemy  will not fix the issue we get with other database then postgresql23:08
abm_why?23:08
cedkabm_: because the issue is not on the SQL generation but on the transactional way23:09
abm_ok23:09
cedkabm_: and also the hard work is to write queries for migration (which SA doesn't make)23:09
cedkabm_: I have never use sqlserver but if it respects almost SQL standard, it must be not too complicate to add support23:10
abm_I'll continue investigating tryton :)23:10
abm_and, another thing...23:11
abm_why not to build a client using XUL (from mozilla)23:11
cedkabm_: why?23:11
cedkabm_: what is the advantages?23:12
abm_this way the web client and the GUI client, are the same23:12
cedkabm_: XUL is not web23:13
abm_XUL is xml23:13
abm_you can serve this xml with a http server23:14
abm_and firefox23:14
abm_interpret it like html23:14
cedkabm_: yes but web means any browser23:14
abm_but with a rich language...23:14
cedkabm_: so it will be a client linked to ff23:14
cedkabm_: and I find xul too complicated23:15
abm_umm, I'm not used it... i'ts only a idea23:15
abm_I'm planning to use it for an app...23:15
abm_but not real experience with it...23:16
cedkabm_: i wrote some plugins for sunbird and I found it too crappy23:17
abm_ah, ok...23:17
cedkabm_: but they have something similar to the inheritage of view in tryton/openerp23:19
abm_I'll give it a opportunitie :)23:21
abm_opportunity23:23

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!