IRC logs of #tryton for Friday, 2013-02-15

chat.freenode.net #tryton log beginning Fri Feb 15 00:00:01 CET 2013
crisyelit1good moning plantian and rmu15:21
crisyelit1platian and rmu is here16:49
crisyelit1help me17:11
cedkcrisyelit1: start by asking question17:12
crisyelit1hi cedk; I want to make a module for Tryton, use hello world but not seen in modules, my OS is Ubuntu 12.04 Systema, module is / usr/local/lib/python2.7/dist-packages17:15
cedkcrisyelit1: probably you must update the database see: https://bugs.tryton.org/issue263817:17
crisyelit1yes, i update the database17:18
crisyelit1cedk: I update the database, not module is not17:46
cedkcrisyelit1: did it appear in the log?17:49
crisyelit1no17:51
cedkcrisyelit1: so probably not in the right directory17:52
crisyelit1my module is  / usr/local/lib/python2.7/dist-packages/helloWorld17:55
crisyelit1where go do module?17:56
cedkcrisyelit1: in trytond.modules17:56
crisyelit1but all is in dist-packages17:57
cedkcrisyelit1: using an global installation is not the easier way to develop17:57
cedkcrisyelit1: you can use a local fecth only17:57
cedkcrisyelit1: or you must install you custom module using a setup.py to register the entry point17:58
crisyelit1how?17:58
cedkcrisyelit1: how what?17:59
crisyelit1how? you can use a local fecth only or you must install you custom module using a setup.py to register the entry point18:00
cedkcrisyelit1: you can follow: https://code.google.com/p/tryton/wiki/InstallationMercurial18:02
crisyelit1I do not understand, I made a module for tyton want it to look in the system which is not doing, and update data base, but nothing. I need to correct for alli create what I need18:09
cedkcrisyelit1: with the setup you get, you must install your custom module18:10
cedkcrisyelit1: and install != to copy to the directory18:10
cedkcrisyelit1: you must write a setup.py and run it for installation18:10
crisyelit1setup.py is inside the folder hello world18:11
cedkcrisyelit1: did you run: python setup.py install ?18:14
cedkcrisyelit1: to have modules found outside the trytond/modules directory you must have entry point18:14
cedkcrisyelit1: http://stackoverflow.com/a/961547318:15
crisyelit1http://paste.lisp.org/+2WJO.18:19
cedkcrisyelit1: so you don't have a setup.py18:19
cedkcrisyelit1: so you can write one (look at existing modules) or don't use system installed trytond and follow the wiki18:21
crisyelit1cedk:   Let me go back and read and eat, but do not go, I need your help18:24
-!- crisyelit1(~jhuliana@190.200.17.185) has left #tryton18:25
crisyelithi cedk19:49
plantiancrisyelit: hi crisyelit, you should try to create a setup.py file in helloWorld/setup.py like cedk said19:56
crisyelityes20:06
crisyelit http://paste.lisp.org/+2WJP.20:11
crisyelitis so20:12
plantiancrisyelit: now try trytond -d DBNAME -c /etc/trytond.conf --init=hello20:13
crisyelitnow what?20:13
crisyelithttp://paste.lisp.org/+2WJQ.20:15
plantiancrisyelit: Great, now your module is found but it has bugs.20:15
crisyelit¿?20:16
plantiancrisyelit: let me find alternative icon20:16
crisyelit:-D20:19
plantiancrisyelit: Can you change your hello.xml file?  I guess try to replace icon="tryton-users" with icon="tryton-image-missing".20:20
plantianThe example I think is broken.20:21
plantiancrisyelit: Then you have to run "python setup.py install" again and then "trytond ..." again.20:23
crisyelitchange tryton-users by tryton-image-missing20:25
crisyelithttp://paste.lisp.org/+2WJR.20:26
plantiancrisyelit: What was the output of running setup.py install?20:28
crisyelithttp://paste.lisp.org/+2WJR.20:31
crisyelit:-D20:37
plantiancrisyelit: That is the output of trytond.  What is the output of setup.py install?20:39
crisyelithttp://paste.lisp.org/+2WJS.20:41
crisyelitnow what? :-(20:45
plantiancrisyelit: I mean run "python setup.py install"20:45
plantiancrisyelit: You might need to run "python setup.py install --force"20:46
plantiancrisyelit: This is why mercurial installation is easier for development.20:46
plantiancrisyelit: python setup.py install will copy your files into the right location20:47
crisyelithttp://paste.lisp.org/+2WJT.20:49
plantiancrisyelit: now run trytond again, it will be: 1. edit, 2. python setup.py install, 3. trytond ... --init=hello, REPEAT20:51
plantiancrisyelit: Do you understand?20:51
crisyelit1. trytond; 2. python setup.py install, 3. trytond -----init=hello20:52
crisyelitall with trytond on20:52
plantiancrisyelit: no you don't need 1, for 1 i just mean edit files20:53
crisyelithttp://paste.lisp.org/+2WJU.20:56
plantiancrisyelit: 1. remove select="1" from xml like this: <field name="nombre"/> 2. python setup.py install, 3. trytond ... --init=hello20:57
crisyelithttp://paste.lisp.org/+2WJV.21:02
plantiancrisyelit: You must remove all select="1".21:03
crisyelitthis is filer hello.xml   http://paste.lisp.org/+2WJW.21:04
plantiancrisyelit: ie. remove this select: <field name="saludo" select="1"/>21:08
crisyelithttp://paste.lisp.org/+2WJX.21:12
plantiancrisyelit: You should remove the line "<field name="view_type">form</field>".21:14
crisyelitis this file hello.xml  http://paste.lisp.org/+2WJY.21:18
crisyelitis this runing  http://paste.lisp.org/+2WJZ.21:20
plantiancrisyelit: I mean remove only select="1", you still need <field name="saludo"/> in <tree></tree>21:20
plantiancrisyelit: but you also must remove "<field name="view_type">form</field>"21:20
plantiancedk: Should there be a hello world module for each major version?  This example is broken.21:21
crisyelitif you have that file corrected21:23
crisyelit:-(21:23
cedkplantian: I maintain the training module which for me is much more complete21:24
cedkplantian: http://hg.tryton.org/2.6/training21:24
plantiancedk: Is it just patches?21:26
crisyeliti not undestard21:26
cedkplantian: it is a mq with step by step the creation of a module21:26
cedkplantian: I use it for the training B2CK gives21:26
plantiancrisyelit: You have to make a few fixes to the xml still.21:27
crisyelit:-(21:27
cedkplantian: also it is the reason I want to kill the wiki, in less than 2 years it became out dated and unmaintained by the authors21:29
plantiancedk: I agree in some respects but there is still very little tryton documentation.21:29
plantiancedk: I think creating a custom module should be folded into the main documentation and removed from the wiki.21:31
cedkplantian: I know but don't blame me: http://dpaste.com/933324/21:33
cedkplantian: I'm in favor to move everything out of the wiki21:33
cedkplantian: but really the training module is far better21:34
plantiancedk: I know, I don't blame you, but it is still a problem.21:35
plantiancedk: Using mq probably is good with instruction, but it also is another tool needed to get started and there is no explanation outside of training course.21:36
plantianWhat is that list of numbers?21:37
cedkplantian: explaination is in the title: http://hg.tryton.org/2.6/21:37
plantiancrisyelit: Try this -- http://paste.lisp.org/display/13550521:41
crisyelithttp://paste.lisp.org/+2WK2.21:48
cedkplantian: don't forget to submit your final patches21:48
crisyelitchange for the file you sent me21:49
plantiancrisyelit: There is extra /> in the line with the icon.  Should be: <menuitem name="Hello World" id="menu_hello_world" sequence="10"  icon="tryton-image-missing"/>21:51
plantiancedk: I don't understand what you mean here: http://codereview.tryton.org/672002/21:52
crisyelitplantian, now i do?22:01
plantiancrisyelit: the same steps as with the other changes22:05
crisyelitṕerfect, that changes?22:09
plantiancrisyelit: 2. python setup.py install, 3. trytond ... --init=hello22:13
plantiancrisyelit: You have to do that until the errors stop.22:13
plantiancrisyelit: Sorry it is slow.22:14
crisyelitby having these errors22:21
crisyeliti not understand22:21
plantiancrisyelit: The xml in the hello world was for tryton 2.0 or older.22:23
crisyelithttp://paste.lisp.org/+2WK3.22:23
plantiancrisyelit: Did you fix this line: <menuitem name="Hello World" id="menu_hello_world" sequence="10"  icon="tryton-image-missing"/>/>22:23
crisyelitfor 2.6, not have22:24
crisyeliti there22:25
crisyelit:-/22:26
cedkplantian: what don't you understand?22:31
cedkplantian: by the way, the patch was not completly uploaded22:32
plantiancrisyelit: I don't understand, you have to remove the extra "/>".22:36
plantiancedk: Okay, I don't know why that keeps happening.  Did you want me to remove the if statement?22:36
crisyelitremove  is line: <menuitem name="Hello World" id="menu_hello_world" sequence="10"  icon="tryton-image-missing"/>22:37
plantiancedk: I will make patches against trunk, is that okay?22:37
crisyelitor />22:37
plantiancrisyelit: Okay that looks good.22:37
plantiancrisyelit: Can you run the python setup.py install command against and then 3. the trytond ... --init=hello command.22:37
plantiancrisyelit: And if that gives the same xml error you have to show me your hello.xml file.22:38
crisyelithttp://paste.lisp.org/+2WK4.22:45
crisyelithttp://paste.lisp.org/+2WK5.22:45
plantiancrisyelit: try this one -- http://paste.lisp.org/display/135509#122:55
plantiancedk: I was talking about the loop at line 61, I tried to update the patch -- http://codereview.tryton.org/672002/diff/11001/trytond/ir/action.py22:58
crisyelithttp://paste.lisp.org/+2WK7.23:01
plantiancrisyelit: It looks like it worked.  Can you restart the server and connect with the client?23:07
crisyelitless go23:07
plantiancrisyelit: ?23:08
crisyelitconnect with the cliente, see module hello world but in click out him gives this error http://paste.lisp.org/+2WK8.23:11
plantiancrisyelit: Can you pastebin your .py file?23:13
plantiancedk: I have one more problem in migration it seems, did the action id lookup change in newer versions of tryton?23:14
crisyelitwhich file?23:14
plantiancedk: This hack I did seems to fix it, but the ids in the database are for the ir_action pointed to from the ir_action_act_window instead of the ir_action_act_window.id itself: https://gist.github.com/ianjosephwilson/496399923:14
plantiancrisyelit: I think hello.py.23:15
cedkplantian: they must have the same id23:16
plantiancedk: Right, so they do not have the same id.  Did they ever change?  They were created in 2009.23:17
crisyelithttp://paste.lisp.org/+2WK9.23:18
plantiancrisyelit: What does your __init__.py file look like?23:22
crisyelitfrom hello import *23:23
plantiancedk: https://gist.github.com/ianjosephwilson/4963999  -- I added the data from the database.  All those records are now "wrong"?23:23
plantiancrisyelit: Can you try this (update instead of init)?: trytond -d DBNAME -c /etc/trytond.conf --update=hello23:24
cedkplantian: it is like that since 1.423:25
plantiancedk: I'm not sure what version I started with but it might have been 1.2.  That is okay though, so I just have to fix that with a sql script.  Did that it only affect actions?23:28
crisyelitthank you, thank you, thank you.....runing perfect23:29
cedkplantian: all ir.action.*23:30
plantiancrisyelit: I'm glad its finally working.23:30
crisyeliti want to try to make this a different module me for my work, i count on you23:30
crisyelit:-D23:30
crisyelit:-*23:30
plantiancrisyelit: ha, you will have to learn how to debug the messages yourself though so you can go faster23:31
plantiancrisyelit: at least you have a basic module running now though, you should go over the documentation again and the official modules23:32
crisyelitis that i read alot, to learn, if you where to start23:33
plantiancedk: Okay thanks, I guess I will have to drop constraints and fix the ids and add constraints in the script.  At least I know what to do though.23:33
plantianThen I can try to figure out why it is sooooooo slow.23:34
plantiancedk: Will you be able to back-port those patches from trunk to 2.6?23:34
cedkplantian: yes23:35
plantiancedk: Okay, thank you.23:35
crisyeliti rest, tomorrow i am read all the pages on the web but your can pages para the;23:38
crisyelitthank you plantian and cedk23:40
plantiancrisyelit: okay, I understand first part but not the second part23:40
crisyelit:-D23:40
-!- crisyelit(~jhuliana@181-182-39-175.genericrev.telcel.net.ve) has left #tryton23:40
plantiancedk: Should ir_action_act_window_view.id == ir_action_act_window.id too?23:44
cedkplantian: no23:50

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