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

chat.freenode.net #tryton log beginning Mon Feb 22 00:00:01 CET 2010
2010-02-22 00:00 <cedk> vengfulsquirrel: but it is not necessary the best way
2010-02-22 00:00 <cedk> vengfulsquirrel: there is a lot of POS arround
2010-02-22 00:01 <cedk> and I think we should first focus on the way to import POS data in Tryton
2010-02-22 00:01 <vengfulsquirrel> Yes, 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.
2010-02-22 00:02 <vengfulsquirrel> Right 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.
2010-02-22 00:04 <cedk> vengfulsquirrel: I don't think POS are too integrated with something else
2010-02-22 00:04 <cedk> vengfulsquirrel: but they are oriented for specific sectors like restaurant...
2010-02-22 00:05 <cedk> I think most of it can export sales of the day into csv file
2010-02-22 00:05 <cedk> and somes are linked to the hardware
2010-02-22 00:07 <vengfulsquirrel> Well 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.
2010-02-22 00:08 <cedk> vengfulsquirrel: there is http://www.openbravo.com/product/pos/
2010-02-22 00:10 <cedk> vengfulsquirrel: http://www.openbravo.com/img-corp/product/screenshots/screen5-pos.png
2010-02-22 00:10 <cedk> vengfulsquirrel: the UI seems not too complicate
2010-02-22 00:10 <cedk> vengfulsquirrel: and could be done in Tryton with some custom widgets
2010-02-22 00:12 <vengfulsquirrel> cedk: Are you proposing to use openbravo pos as a gui frontend or to create a tryton pos based on openbravo's gui frontend ?
2010-02-22 00:12 <cedk> vengfulsquirrel: both are possible
2010-02-22 00:13 <cedk> vengfulsquirrel: using openbravo one will be faster
2010-02-22 00:15 <vengfulsquirrel> I hate how hard it is to try their products.
2010-02-22 00:17 <cedk> vengfulsquirrel: it can be part of their business :-)
2010-02-22 00:17 <vengfulsquirrel> This asyncronous POS thing actually is an immediate problem for me. I cannot find reliable internet for our second location.
2010-02-22 00:17 <vengfulsquirrel> Ha yeah ughh, I also am allergic to java. I'm trying to download it now though.
2010-02-22 00:18 <vengfulsquirrel> cedk: 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.
2010-02-22 00:19 <petrus> vengfulsquirrel: remedy for java: http://clojure.org/
2010-02-22 00:19 <vengfulsquirrel> cedk: 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.
2010-02-22 00:20 <vengfulsquirrel> petrus: How does clojure compare to jython ?
2010-02-22 00:23 <petrus> vengfulsquirrel: 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.
2010-02-22 00:24 <petrus> petrus: main strengths: FP --> really works with threads
2010-02-22 00:27 <petrus> vengfulsquirrel: oops, don't know why I am writing to myself :-)
2010-02-22 00:30 <cedk> good night
2010-02-22 00:30 <vengfulsquirrel> cedk: gn
2010-02-22 00:30 <petrus> cedk: bye
2010-02-22 00:30 <vengfulsquirrel> petrus: Ha yeah I do that all the time. Does jython not work well with threads?
2010-02-22 00:32 <petrus> vengfulsquirrel: 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.
2010-02-22 00:34 <petrus> vengfulsquirrel: clojure on the other hand uses immutable functional data structures, so the problem just go away.
2010-02-22 00:35 <petrus> vengfulsquirrel: and consider that nowadays we have multicore everywhere
2010-02-22 00:51 <vengfulsquirrel> petrus: Yeah I think jython circumvents the GIL problem. Although I would prefer to never venture out of CPython.
2010-02-22 00:54 <petrus> vengfulsquirrel: I don't know the implementation details for jython, you still got to have GIL and explicit synchronization.
2010-02-22 00:56 <petrus> vengfulsquirrel: when you work with immutable data structures, you just go about your business and forget about synchronization, no need.
2010-02-22 01:16 -!- petrus(~petrus@142.176.238.66) has left #tryton
2010-02-22 01:21 <ready> hi
2010-02-22 01:23 <ready> need help. i try to set up tryton from trunk
2010-02-22 01:23 <ready> starting with empty database
2010-02-22 01:23 <vengfulsquirrel> Did you use the download script ?
2010-02-22 01:24 <ready> no, didnt notice there's a download script
2010-02-22 01:25 <ready> i gettin an exception when i do: bin/trytond -u all -d tryton
2010-02-22 01:25 <ready> init stuff seems to work
2010-02-22 01:25 <ready> Exception: ('ValidateError', 'The value "en_US" for the field "lang" is not in the selection')
2010-02-22 01:26 <vengfulsquirrel> You might need to run -i first.
2010-02-22 01:27 <vengfulsquirrel> ready: Did you see this? http://code.google.com/p/tryton/wiki/InstallationMercurial
2010-02-22 01:27 <vengfulsquirrel> The script I'm talking about is just for downloading trunk and the modules.
2010-02-22 01:28 <vengfulsquirrel> ready: I mean to use bin/trytond -i all -d tryton (i for install instead of u for update) assuming the database is completely empty.
2010-02-22 01:29 <ready> http://www.pastebin.com/m2351a8b6
2010-02-22 01:29 <ready> that's the error
2010-02-22 01:29 <ready> i'll retry it using -i
2010-02-22 01:30 <ready> vengfulsquirrel: i did not see that, thanks for that link, i'm going to bookmark it
2010-02-22 01:31 <ready> same error using -i
2010-02-22 01:31 <ready> i'll try to use the script from different dir
2010-02-22 01:34 <vengfulsquirrel> ready: It is trunk maybe their is an unresolved problem?
2010-02-22 01:49 <ready> no :)
2010-02-22 01:49 <vengfulsquirrel> Did it work ?
2010-02-22 01:49 <ready> yes, now it works
2010-02-22 01:50 <vengfulsquirrel> Weird, well that's good.
2010-02-22 01:50 <ready> it seems i did not delete the old database correcly before resetup
2010-02-22 01:50 <ready> thanks for all
2010-02-22 01:51 <vengfulsquirrel> ready: Yeah, glad it worked.
2010-02-22 02:22 -!- digitalsatori(~tony@116.233.247.190) has joined #tryton
2010-02-22 03:00 -!- vengfulsquirrel(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton
2010-02-22 05:18 -!- yangoon(~mathiasb@p549F78C4.dip.t-dialin.net) has joined #tryton
2010-02-22 05:22 -!- ikks_(~ikks@200.118.243.193) has joined #tryton
2010-02-22 07:28 -!- vengfulsquirrel(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton
2010-02-22 07:56 -!- Timitos(~timitos@88.217.184.172) has joined #tryton
2010-02-22 08:13 -!- sharkcz(~dan@plz1-v-4-17.static.adsl.vol.cz) has joined #tryton
2010-02-22 08:16 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2010-02-22 08:24 -!- paepke(~paepke@p4FEB3983.dip0.t-ipconnect.de) has joined #tryton
2010-02-22 08:28 -!- sharoon(~sharoonth@opg066b.halls.manchester.ac.uk) has joined #tryton
2010-02-22 08:55 -!- mootoo(daemon@p5B32D1F8.dip.t-dialin.net) has joined #tryton
2010-02-22 08:56 <mootoo> cedk, hello! you asked for locking tables with mysql?
2010-02-22 08:57 <cedk> mootoo: yes
2010-02-22 08:58 <mootoo> cedk, 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.html
2010-02-22 08:59 <cedk> mootoo: I know but the issue is that you must lock every tables that will be accessed
2010-02-22 09:00 <mootoo> cedk, so you want to lock the whole database?
2010-02-22 09:00 <cedk> mootoo: but Tryton is a generic framework so we can not assume which tables will be query during the lock of one
2010-02-22 09:00 <cedk> mootoo: I have thought about locking all tables but the issue is that MySQL required to explicitly locks also alias tables
2010-02-22 09:02 <mootoo> cedk, could that do the trick? http://dev.mysql.com/doc/refman/5.1/en/lock-tables-and-transactions.html
2010-02-22 09:02 <mootoo> second paragraph
2010-02-22 09:05 <cedk> mootoo: perhaps "TABLES WITH READ LOCK" should work
2010-02-22 09:05 <cedk> mootoo: I will try
2010-02-22 09:09 <paepke> mootoo, what about innodb vs. myisam. any proposal?
2010-02-22 09:09 <cedk> paepke: I forced the use of innodb in the mysql patch
2010-02-22 09:09 <mootoo> cedk, in which cases the tables will be locked by the framework?
2010-02-22 09:10 <cedk> mootoo: there is some places: computing the stock quantities, running the cron
2010-02-22 09:10 <mootoo> cedk, paepke i think inno is neccessary with relations
2010-02-22 09:11 <cedk> mootoo: yes, to have a mimimum of constraints
2010-02-22 09:17 <mootoo> cedk, 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?
2010-02-22 09:17 <mootoo> cedk, in second case the start transaction thing should do it
2010-02-22 09:18 <cedk> mootoo: preventing any other write
2010-02-22 09:20 <mootoo> cedk, then you have to lock the tables used explicitely (shown on the second transaction example)
2010-02-22 09:20 <cedk> mootoo: this is not possible
2010-02-22 09:21 <mootoo> cedk, 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)
2010-02-22 09:23 <cedk> mootoo: with locks, I must lock every tables that will be used in query between the locks and the unlock
2010-02-22 09:29 <cedk> "FLUSH TABLES WITH READ LOCK;" failed when two transactions run it instead of waiting
2010-02-22 09:30 <cedk> MySQL is really far from PostgreSQL
2010-02-22 09:30 <mootoo> cedk, ive just talked to someone.
2010-02-22 09:31 <mootoo> cedk, "start transaction; <run whatever you want in multiple queries> commit;"
2010-02-22 09:31 <mootoo> this will queue all other queries and execute the whole transaction at once. if one query in the transaction fails the whole transaction is discarded
2010-02-22 09:32 <cedk> mootoo: yes I know what is a transaction, but we need to lock tables
2010-02-22 09:33 <mootoo> cedk, locking tables seems irrelevant within a transaction because no other task is able to change anything in the whole database (other requests are queued)
2010-02-22 09:35 <cedk> mootoo: per example for the stock quantity reservation, we need to ensure that nobody will change any moves until the commit
2010-02-22 09:36 <cedk> mootoo: and this is no ensure by the transaction mechanism
2010-02-22 09:36 <cedk> mootoo: it requires to lock the table
2010-02-22 09:37 -!- bechamel(~user@host-85-201-159-186.brutele.be) has joined #tryton
2010-02-22 09:38 <mootoo> cedk, what are the logical steps to do the reservation?
2010-02-22 09:39 <cedk> mootoo: compute available quantity and modify status of moves into assigned
2010-02-22 09:40 <mootoo> cedk, what if you put all steps neccessary into one transaction? or isnt that possible?
2010-02-22 09:40 <cedk> mootoo: it is in one transaction (every tryton call is in one transaction)
2010-02-22 09:42 -!- hoRn(~chatzilla@dslb-094-223-193-066.pools.arcor-ip.net) has joined #tryton
2010-02-22 09:42 -!- tony_(~tony@116.233.247.181) has joined #tryton
2010-02-22 09:43 <cedk> mootoo: but the problem can not be solved with transaction only, it must use a lock to prevent other transaction to modify the move table
2010-02-22 09:43 <mootoo> cedk, 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 transaction
2010-02-22 09:44 <vengfulsquirrel> I 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.
2010-02-22 09:44 <mootoo> cedk, two transactions dont run simultaneously (?)
2010-02-22 09:44 <vengfulsquirrel> Isn't that the problem ?
2010-02-22 09:44 <cedk> mootoo: in PostgreSQL they run in parallel
2010-02-22 09:45 <cedk> mootoo: and one will failed if it tries to modify a record that has been modified by the other
2010-02-22 09:45 <cedk> mootoo: I guess MySQL transaction works the same way
2010-02-22 09:45 <mootoo> vengfulsquirrel, thats what i wanted to say: there is no other query which runs while the whole transaction is processed
2010-02-22 09:45 <cedk> mootoo: because I can start two transaction in //
2010-02-22 09:47 <vengfulsquirrel> Transactions 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.
2010-02-22 09:48 <mootoo> hm
2010-02-22 09:49 <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"
2010-02-22 09:49 <mootoo> cedk, right. this will block everything else while running the task
2010-02-22 09:50 <cedk> mootoo: it blocks write not read
2010-02-22 09:51 <mootoo> ah sry.
2010-02-22 09:52 <mootoo> cedk, then give it a try :)
2010-02-22 09:52 <cedk> mootoo: yes
2010-02-22 09:54 <vengfulsquirrel> cedk: 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.'''
2010-02-22 09:55 <cedk> vengfulsquirrel: yes
2010-02-22 09:59 -!- paepke_(~paepke@p4FEB149B.dip0.t-ipconnect.de) has joined #tryton
2010-02-22 10:00 <vengfulsquirrel> cedk: Yeah that is pretty limiting. Do you think there will ever be a way to use row level locks?
2010-02-22 10:01 <vengfulsquirrel> The purpose of the locking is for stock assignment right ?
2010-02-22 10:01 <cedk> vengfulsquirrel: row level locks is already working because we use serial transaction
2010-02-22 10:01 <cedk> vengfulsquirrel: with postgresql
2010-02-22 10:03 <mootoo> cedk, 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.html
2010-02-22 10:14 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2010-02-22 10:21 -!- essich(~essich@p4FCF8AB9.dip0.t-ipconnect.de) has joined #tryton
2010-02-22 10:21 -!- essich(~essich@p4FCF8AB9.dip0.t-ipconnect.de) has left #tryton
2010-02-22 11:34 -!- cedric_b(~cedric@ANantes-158-1-62-21.w86-195.abo.wanadoo.fr) has joined #tryton
2010-02-22 12:08 -!- tekknokrat(~gthielebe@dslb-188-103-022-099.pools.arcor-ip.net) has joined #tryton
2010-02-22 14:31 <ready> how can i change design of a sale or invoice?
2010-02-22 15:01 <cedk> ready: the quick and dirty way is to edit the odt file in the module
2010-02-22 15:03 <cedk> ready: or by editing the content file from the client in "Administration>User Interface>Actions>Report"
2010-02-22 15:07 <cedk> ready: 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-reports
2010-02-22 15:16 -!- woakas(~woakas@190.144.69.234) has joined #tryton
2010-02-22 15:42 -!- paepke(~paepke@p4FEB149B.dip0.t-ipconnect.de) has left #tryton
2010-02-22 16:17 -!- sharoon(~sharoonth@opg066b.halls.manchester.ac.uk) has joined #tryton
2010-02-22 17:04 -!- tony_(~tony@116.233.247.181) has joined #tryton
2010-02-22 18:00 -!- vengfulsquirrel(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton
2010-02-22 19:07 -!- pepeu(~manuel@201.152.23.39) has joined #tryton
2010-02-22 22:02 -!- johbo(~joh@statdsl-085-016-072-173.ewe-ip-backbone.de) has joined #tryton
2010-02-22 22:46 -!- abm_(~antonio@87.223.97.175) has joined #tryton
2010-02-22 22:48 <abm_> Hi all, I'm studying OpenErp and Tryton... and why not tu use sqlalchemy for the db access?
2010-02-22 22:50 <cedk> abm_: because sqlachemy was not available when OpenERP started
2010-02-22 22:52 <cedk> abm_: and now using it will be too much work for little benefit
2010-02-22 22:52 <abm_> well, total independece of databases...
2010-02-22 22:53 <abm_> not only in connection, sql also...
2010-02-22 22:54 <abm_> something like select([users.c.id], where(id==3)).limit(1)
2010-02-22 22:54 <cedk> abm_: it is a dream, all databases doesn't have the necessary feature to work for an business software
2010-02-22 22:55 <abm_> works for every database supported without moving a line
2010-02-22 22:55 <cedk> abm_: SQL is already a standard so SQL should work for any database
2010-02-22 22:55 <abm_> cedk: that's true, but if a enterprise want to use oracle...
2010-02-22 22:56 <cedk> abm_: it requires some tuning, but I think it can be done in less then 2 days
2010-02-22 22:56 <abm_> cedk: that's not true, oracle has it's tricks
2010-02-22 22:56 <cedk> abm_: I made a MySQL support in less then 2 days
2010-02-22 22:56 <abm_> and sqlserver also...
2010-02-22 22:56 <abm_> for example with datatypes
2010-02-22 22:57 <cedk> abm_: in Tryton we try to use only standard SQL
2010-02-22 22:57 <abm_> or for example, limit in postgres or TOP in sqlserver
2010-02-22 22:58 <cedk> abm_: we can handle different "limit offset" clause per database
2010-02-22 22:58 <abm_> but the sql inside modules is raw sql
2010-02-22 22:59 <cedk> abm_: yes but it must be standard
2010-02-22 22:59 <abm_> how you manage the particularities of a concrete db?
2010-02-22 22:59 <cedk> abm_: and it must use the database function that make it work on any database
2010-02-22 22:59 <abm_> no oracle support, no?
2010-02-22 22:59 <abm_> :)
2010-02-22 22:59 <cedk> abm_: and SQL inside module should be avoid as much as possible
2010-02-22 23:00 <cedk> abm_: no oracle because no access to oracle db
2010-02-22 23:02 <cedk> and by the way, I think we should stick to postgresql as it is a very good database engine much better then many other opensource one
2010-02-22 23:02 <cedk> but I have not yet tested all opensource databases
2010-02-22 23:03 <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 systems
2010-02-22 23:04 <cedk> abm_: and it is possible there is support for SQLite and next release will have support for MySQL
2010-02-22 23:05 <abm_> perfect...
2010-02-22 23:05 <cedk> abm_: but it will for now recommend to be used with postgresql
2010-02-22 23:05 <abm_> I'm working with postgres for last 7 years
2010-02-22 23:05 <abm_> and I'm very happy
2010-02-22 23:06 <cedk> abm_: SQLite support works quite well because it is closed to SQL standard and skip wihtout error what it can not perform
2010-02-22 23:06 <cedk> abm_: but MySQL is more difficult because it doesn't bahave well for some stuff
2010-02-22 23: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..)
2010-02-22 23:07 <cedk> abm_: this is a bad choice
2010-02-22 23:07 <abm_> Finally, we have ported all our systems to sqlserver
2010-02-22 23:07 <abm_> to accomplish the client requeriments
2010-02-22 23:07 <abm_> for that sqlalchemy is perfect
2010-02-22 23:07 <abm_> now, our system is db agnostic
2010-02-22 23:08 <cedk> abm_: sqlachemy will not fix the issue we get with other database then postgresql
2010-02-22 23:08 <abm_> why?
2010-02-22 23:09 <cedk> abm_: because the issue is not on the SQL generation but on the transactional way
2010-02-22 23:09 <abm_> ok
2010-02-22 23:09 <cedk> abm_: and also the hard work is to write queries for migration (which SA doesn't make)
2010-02-22 23:10 <cedk> abm_: I have never use sqlserver but if it respects almost SQL standard, it must be not too complicate to add support
2010-02-22 23:10 <abm_> I'll continue investigating tryton :)
2010-02-22 23:11 <abm_> and, another thing...
2010-02-22 23:11 <abm_> why not to build a client using XUL (from mozilla)
2010-02-22 23:11 <cedk> abm_: why?
2010-02-22 23:12 <cedk> abm_: what is the advantages?
2010-02-22 23:12 <abm_> this way the web client and the GUI client, are the same
2010-02-22 23:13 <cedk> abm_: XUL is not web
2010-02-22 23:13 <abm_> XUL is xml
2010-02-22 23:14 <abm_> you can serve this xml with a http server
2010-02-22 23:14 <abm_> and firefox
2010-02-22 23:14 <abm_> interpret it like html
2010-02-22 23:14 <cedk> abm_: yes but web means any browser
2010-02-22 23:14 <abm_> but with a rich language...
2010-02-22 23:14 <cedk> abm_: so it will be a client linked to ff
2010-02-22 23:15 <cedk> abm_: and I find xul too complicated
2010-02-22 23:15 <abm_> umm, I'm not used it... i'ts only a idea
2010-02-22 23:15 <abm_> I'm planning to use it for an app...
2010-02-22 23:16 <abm_> but not real experience with it...
2010-02-22 23:17 <cedk> abm_: i wrote some plugins for sunbird and I found it too crappy
2010-02-22 23:17 <abm_> ah, ok...
2010-02-22 23:19 <cedk> abm_: but they have something similar to the inheritage of view in tryton/openerp
2010-02-22 23:21 <abm_> I'll give it a opportunitie :)
2010-02-22 23:23 <abm_> opportunity

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!