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

chat.freenode.net #tryton log beginning Fri Feb 15 00:00:01 CET 2013
2013-02-15 15:21 <crisyelit1> good moning plantian and rmu
2013-02-15 16:49 <crisyelit1> platian and rmu is here
2013-02-15 17:11 <crisyelit1> help me
2013-02-15 17:12 <cedk> crisyelit1: start by asking question
2013-02-15 17:15 <crisyelit1> hi 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-packages
2013-02-15 17:17 <cedk> crisyelit1: probably you must update the database see: https://bugs.tryton.org/issue2638
2013-02-15 17:18 <crisyelit1> yes, i update the database
2013-02-15 17:46 <crisyelit1> cedk: I update the database, not module is not
2013-02-15 17:49 <cedk> crisyelit1: did it appear in the log?
2013-02-15 17:51 <crisyelit1> no
2013-02-15 17:52 <cedk> crisyelit1: so probably not in the right directory
2013-02-15 17:55 <crisyelit1> my module is / usr/local/lib/python2.7/dist-packages/helloWorld
2013-02-15 17:56 <crisyelit1> where go do module?
2013-02-15 17:56 <cedk> crisyelit1: in trytond.modules
2013-02-15 17:57 <crisyelit1> but all is in dist-packages
2013-02-15 17:57 <cedk> crisyelit1: using an global installation is not the easier way to develop
2013-02-15 17:57 <cedk> crisyelit1: you can use a local fecth only
2013-02-15 17:58 <cedk> crisyelit1: or you must install you custom module using a setup.py to register the entry point
2013-02-15 17:58 <crisyelit1> how?
2013-02-15 17:59 <cedk> crisyelit1: how what?
2013-02-15 18:00 <crisyelit1> how? you can use a local fecth only or you must install you custom module using a setup.py to register the entry point
2013-02-15 18:02 <cedk> crisyelit1: you can follow: https://code.google.com/p/tryton/wiki/InstallationMercurial
2013-02-15 18:09 <crisyelit1> I 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 need
2013-02-15 18:10 <cedk> crisyelit1: with the setup you get, you must install your custom module
2013-02-15 18:10 <cedk> crisyelit1: and install != to copy to the directory
2013-02-15 18:10 <cedk> crisyelit1: you must write a setup.py and run it for installation
2013-02-15 18:11 <crisyelit1> setup.py is inside the folder hello world
2013-02-15 18:14 <cedk> crisyelit1: did you run: python setup.py install ?
2013-02-15 18:14 <cedk> crisyelit1: to have modules found outside the trytond/modules directory you must have entry point
2013-02-15 18:15 <cedk> crisyelit1: http://stackoverflow.com/a/9615473
2013-02-15 18:19 <crisyelit1> http://paste.lisp.org/+2WJO.
2013-02-15 18:19 <cedk> crisyelit1: so you don't have a setup.py
2013-02-15 18:21 <cedk> crisyelit1: so you can write one (look at existing modules) or don't use system installed trytond and follow the wiki
2013-02-15 18:24 <crisyelit1> cedk: Let me go back and read and eat, but do not go, I need your help
2013-02-15 18:25 -!- crisyelit1(~jhuliana@190.200.17.185) has left #tryton
2013-02-15 19:49 <crisyelit> hi cedk
2013-02-15 19:56 <plantian> crisyelit: hi crisyelit, you should try to create a setup.py file in helloWorld/setup.py like cedk said
2013-02-15 20:06 <crisyelit> yes
2013-02-15 20:11 <crisyelit> http://paste.lisp.org/+2WJP.
2013-02-15 20:12 <crisyelit> is so
2013-02-15 20:13 <plantian> crisyelit: now try trytond -d DBNAME -c /etc/trytond.conf --init=hello
2013-02-15 20:13 <crisyelit> now what?
2013-02-15 20:15 <crisyelit> http://paste.lisp.org/+2WJQ.
2013-02-15 20:15 <plantian> crisyelit: Great, now your module is found but it has bugs.
2013-02-15 20:16 <crisyelit> ¿?
2013-02-15 20:16 <plantian> crisyelit: let me find alternative icon
2013-02-15 20:19 <crisyelit> :-D
2013-02-15 20:20 <plantian> crisyelit: Can you change your hello.xml file? I guess try to replace icon="tryton-users" with icon="tryton-image-missing".
2013-02-15 20:21 <plantian> The example I think is broken.
2013-02-15 20:23 <plantian> crisyelit: Then you have to run "python setup.py install" again and then "trytond ..." again.
2013-02-15 20:25 <crisyelit> change tryton-users by tryton-image-missing
2013-02-15 20:26 <crisyelit> http://paste.lisp.org/+2WJR.
2013-02-15 20:28 <plantian> crisyelit: What was the output of running setup.py install?
2013-02-15 20:31 <crisyelit> http://paste.lisp.org/+2WJR.
2013-02-15 20:37 <crisyelit> :-D
2013-02-15 20:39 <plantian> crisyelit: That is the output of trytond. What is the output of setup.py install?
2013-02-15 20:41 <crisyelit> http://paste.lisp.org/+2WJS.
2013-02-15 20:45 <crisyelit> now what? :-(
2013-02-15 20:45 <plantian> crisyelit: I mean run "python setup.py install"
2013-02-15 20:46 <plantian> crisyelit: You might need to run "python setup.py install --force"
2013-02-15 20:46 <plantian> crisyelit: This is why mercurial installation is easier for development.
2013-02-15 20:47 <plantian> crisyelit: python setup.py install will copy your files into the right location
2013-02-15 20:49 <crisyelit> http://paste.lisp.org/+2WJT.
2013-02-15 20:51 <plantian> crisyelit: now run trytond again, it will be: 1. edit, 2. python setup.py install, 3. trytond ... --init=hello, REPEAT
2013-02-15 20:51 <plantian> crisyelit: Do you understand?
2013-02-15 20:52 <crisyelit> 1. trytond; 2. python setup.py install, 3. trytond -----init=hello
2013-02-15 20:52 <crisyelit> all with trytond on
2013-02-15 20:53 <plantian> crisyelit: no you don't need 1, for 1 i just mean edit files
2013-02-15 20:56 <crisyelit> http://paste.lisp.org/+2WJU.
2013-02-15 20:57 <plantian> crisyelit: 1. remove select="1" from xml like this: <field name="nombre"/> 2. python setup.py install, 3. trytond ... --init=hello
2013-02-15 21:02 <crisyelit> http://paste.lisp.org/+2WJV.
2013-02-15 21:03 <plantian> crisyelit: You must remove all select="1".
2013-02-15 21:04 <crisyelit> this is filer hello.xml http://paste.lisp.org/+2WJW.
2013-02-15 21:08 <plantian> crisyelit: ie. remove this select: <field name="saludo" select="1"/>
2013-02-15 21:12 <crisyelit> http://paste.lisp.org/+2WJX.
2013-02-15 21:14 <plantian> crisyelit: You should remove the line "<field name="view_type">form</field>".
2013-02-15 21:18 <crisyelit> is this file hello.xml http://paste.lisp.org/+2WJY.
2013-02-15 21:20 <crisyelit> is this runing http://paste.lisp.org/+2WJZ.
2013-02-15 21:20 <plantian> crisyelit: I mean remove only select="1", you still need <field name="saludo"/> in <tree></tree>
2013-02-15 21:20 <plantian> crisyelit: but you also must remove "<field name="view_type">form</field>"
2013-02-15 21:21 <plantian> cedk: Should there be a hello world module for each major version? This example is broken.
2013-02-15 21:23 <crisyelit> if you have that file corrected
2013-02-15 21:23 <crisyelit> :-(
2013-02-15 21:24 <cedk> plantian: I maintain the training module which for me is much more complete
2013-02-15 21:24 <cedk> plantian: http://hg.tryton.org/2.6/training
2013-02-15 21:26 <plantian> cedk: Is it just patches?
2013-02-15 21:26 <crisyelit> i not undestard
2013-02-15 21:26 <cedk> plantian: it is a mq with step by step the creation of a module
2013-02-15 21:26 <cedk> plantian: I use it for the training B2CK gives
2013-02-15 21:27 <plantian> crisyelit: You have to make a few fixes to the xml still.
2013-02-15 21:27 <crisyelit> :-(
2013-02-15 21:29 <cedk> plantian: also it is the reason I want to kill the wiki, in less than 2 years it became out dated and unmaintained by the authors
2013-02-15 21:29 <plantian> cedk: I agree in some respects but there is still very little tryton documentation.
2013-02-15 21:31 <plantian> cedk: I think creating a custom module should be folded into the main documentation and removed from the wiki.
2013-02-15 21:33 <cedk> plantian: I know but don't blame me: http://dpaste.com/933324/
2013-02-15 21:33 <cedk> plantian: I'm in favor to move everything out of the wiki
2013-02-15 21:34 <cedk> plantian: but really the training module is far better
2013-02-15 21:35 <plantian> cedk: I know, I don't blame you, but it is still a problem.
2013-02-15 21:36 <plantian> cedk: 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.
2013-02-15 21:37 <plantian> What is that list of numbers?
2013-02-15 21:37 <cedk> plantian: explaination is in the title: http://hg.tryton.org/2.6/
2013-02-15 21:41 <plantian> crisyelit: Try this -- http://paste.lisp.org/display/135505
2013-02-15 21:48 <crisyelit> http://paste.lisp.org/+2WK2.
2013-02-15 21:48 <cedk> plantian: don't forget to submit your final patches
2013-02-15 21:49 <crisyelit> change for the file you sent me
2013-02-15 21:51 <plantian> crisyelit: 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"/>
2013-02-15 21:52 <plantian> cedk: I don't understand what you mean here: http://codereview.tryton.org/672002/
2013-02-15 22:01 <crisyelit> plantian, now i do?
2013-02-15 22:05 <plantian> crisyelit: the same steps as with the other changes
2013-02-15 22:09 <crisyelit> ṕerfect, that changes?
2013-02-15 22:13 <plantian> crisyelit: 2. python setup.py install, 3. trytond ... --init=hello
2013-02-15 22:13 <plantian> crisyelit: You have to do that until the errors stop.
2013-02-15 22:14 <plantian> crisyelit: Sorry it is slow.
2013-02-15 22:21 <crisyelit> by having these errors
2013-02-15 22:21 <crisyelit> i not understand
2013-02-15 22:23 <plantian> crisyelit: The xml in the hello world was for tryton 2.0 or older.
2013-02-15 22:23 <crisyelit> http://paste.lisp.org/+2WK3.
2013-02-15 22:23 <plantian> crisyelit: Did you fix this line: <menuitem name="Hello World" id="menu_hello_world" sequence="10" icon="tryton-image-missing"/>/>
2013-02-15 22:24 <crisyelit> for 2.6, not have
2013-02-15 22:25 <crisyelit> i there
2013-02-15 22:26 <crisyelit> :-/
2013-02-15 22:31 <cedk> plantian: what don't you understand?
2013-02-15 22:32 <cedk> plantian: by the way, the patch was not completly uploaded
2013-02-15 22:36 <plantian> crisyelit: I don't understand, you have to remove the extra "/>".
2013-02-15 22:36 <plantian> cedk: Okay, I don't know why that keeps happening. Did you want me to remove the if statement?
2013-02-15 22:37 <crisyelit> remove is line: <menuitem name="Hello World" id="menu_hello_world" sequence="10" icon="tryton-image-missing"/>
2013-02-15 22:37 <plantian> cedk: I will make patches against trunk, is that okay?
2013-02-15 22:37 <crisyelit> or />
2013-02-15 22:37 <plantian> crisyelit: Okay that looks good.
2013-02-15 22:37 <plantian> crisyelit: Can you run the python setup.py install command against and then 3. the trytond ... --init=hello command.
2013-02-15 22:38 <plantian> crisyelit: And if that gives the same xml error you have to show me your hello.xml file.
2013-02-15 22:45 <crisyelit> http://paste.lisp.org/+2WK4.
2013-02-15 22:45 <crisyelit> http://paste.lisp.org/+2WK5.
2013-02-15 22:55 <plantian> crisyelit: try this one -- http://paste.lisp.org/display/135509#1
2013-02-15 22:58 <plantian> cedk: 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.py
2013-02-15 23:01 <crisyelit> http://paste.lisp.org/+2WK7.
2013-02-15 23:07 <plantian> crisyelit: It looks like it worked. Can you restart the server and connect with the client?
2013-02-15 23:07 <crisyelit> less go
2013-02-15 23:08 <plantian> crisyelit: ?
2013-02-15 23:11 <crisyelit> connect with the cliente, see module hello world but in click out him gives this error http://paste.lisp.org/+2WK8.
2013-02-15 23:13 <plantian> crisyelit: Can you pastebin your .py file?
2013-02-15 23:14 <plantian> cedk: I have one more problem in migration it seems, did the action id lookup change in newer versions of tryton?
2013-02-15 23:14 <crisyelit> which file?
2013-02-15 23:14 <plantian> cedk: 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/4963999
2013-02-15 23:15 <plantian> crisyelit: I think hello.py.
2013-02-15 23:16 <cedk> plantian: they must have the same id
2013-02-15 23:17 <plantian> cedk: Right, so they do not have the same id. Did they ever change? They were created in 2009.
2013-02-15 23:18 <crisyelit> http://paste.lisp.org/+2WK9.
2013-02-15 23:22 <plantian> crisyelit: What does your __init__.py file look like?
2013-02-15 23:23 <crisyelit> from hello import *
2013-02-15 23:23 <plantian> cedk: https://gist.github.com/ianjosephwilson/4963999 -- I added the data from the database. All those records are now "wrong"?
2013-02-15 23:24 <plantian> crisyelit: Can you try this (update instead of init)?: trytond -d DBNAME -c /etc/trytond.conf --update=hello
2013-02-15 23:25 <cedk> plantian: it is like that since 1.4
2013-02-15 23:28 <plantian> cedk: 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?
2013-02-15 23:29 <crisyelit> thank you, thank you, thank you.....runing perfect
2013-02-15 23:30 <cedk> plantian: all ir.action.*
2013-02-15 23:30 <plantian> crisyelit: I'm glad its finally working.
2013-02-15 23:30 <crisyelit> i want to try to make this a different module me for my work, i count on you
2013-02-15 23:30 <crisyelit> :-D
2013-02-15 23:30 <crisyelit> :-*
2013-02-15 23:31 <plantian> crisyelit: ha, you will have to learn how to debug the messages yourself though so you can go faster
2013-02-15 23:32 <plantian> crisyelit: at least you have a basic module running now though, you should go over the documentation again and the official modules
2013-02-15 23:33 <crisyelit> is that i read alot, to learn, if you where to start
2013-02-15 23:33 <plantian> cedk: 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.
2013-02-15 23:34 <plantian> Then I can try to figure out why it is sooooooo slow.
2013-02-15 23:34 <plantian> cedk: Will you be able to back-port those patches from trunk to 2.6?
2013-02-15 23:35 <cedk> plantian: yes
2013-02-15 23:35 <plantian> cedk: Okay, thank you.
2013-02-15 23:38 <crisyelit> i rest, tomorrow i am read all the pages on the web but your can pages para the;
2013-02-15 23:40 <crisyelit> thank you plantian and cedk
2013-02-15 23:40 <plantian> crisyelit: okay, I understand first part but not the second part
2013-02-15 23:40 <crisyelit> :-D
2013-02-15 23:40 -!- crisyelit(~jhuliana@181-182-39-175.genericrev.telcel.net.ve) has left #tryton
2013-02-15 23:44 <plantian> cedk: Should ir_action_act_window_view.id == ir_action_act_window.id too?
2013-02-15 23:50 <cedk> plantian: no

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