IRC logs of #tryton for Thursday, 2011-11-10

chat.freenode.net #tryton log beginning Thu Nov 10 00:00:02 CET 2011
zxq9Is there something wrong with the following declaration: driver_type = fields.Many2One('driver.type', 'Driver Type')02:55
zxq9I'm getting an ascii codec error every time I try to create a Many2One field.02:55
zxq9actually, I'm only getting this error when I try to make a Many2One field in a module's primary class. It works fine in a junction table.02:57
zxq9Here is an example of this: http://fpaste.org/J8xO/02:59
-!- ciupicri(~ciupicri@unaffiliated/ciupicri) has joined #tryton03:00
plantianzxq9: not sure if I can help but can you pastebin the traceback on something like http://paste.pocoo.org/03:00
plantianor fpaste is fine03:00
zxq9http://fpaste.org/37fI/03:02
zxq9Here you are. The error printed says "Error: 'ascii' codec can't decode byte 0xe3 in position 18: orginal not in range(128)"03:02
zxq9Which is the typical Python encoding error.03:02
zxq90xe3 = ã ('a' with a tilde above it) -- which is not present anywhere in the code or my data.03:03
zxq9This error is happening when I attempt to install the module.03:03
plantianYeah that is real weird03:21
zxq9Any ideas?03:22
plantianzxq9: Not really anything springs to mind, can you get rid of the set null part ?03:26
zxq9I've tried that as well. Same error.03:27
zxq9I don't get why the driver.vehicle model's Many2One fields don't give the same error, though.03:28
zxq9I've tried this in a few different models to see what would happen, and I get similar problems each time, but only in a primary module -- and then sometimes it just works magically.03:28
plantianzxq9:  Okay well I don't have anything genius really, can you try printing out the statements in add_fk?  You will have to suffer through a bunch until your module loads if you are loading all the modules at once.03:30
plantianzxq9: Also, when you said the error printed, did you mean you inject code to print the error or just didn't include it in the traceback ?03:34
zxq9No, it was part of the pop-up screen, just at the top. It didn't produce an error message on the console, just the trace I pasted.03:35
zxq9It was a python generated error, not from the tryton code.03:35
plantianAre you running trytond in a console?  That is what I usually do during dev. and the errors print there.03:36
zxq9at least, its the exact same error Python will give you if you try using unicode characters without declaring them.03:36
zxq9Yes, I am.03:36
zxq9And the output in the console is what I pasted.03:36
zxq9The pop up screen from the client had the Python error message at the top, not in the console output.03:36
zxq9ERROR:common.message:03:38
zxq9is the only line03:38
zxq9that wasn't in the paste.03:38
zxq9ERROR:sql:Wrong SQL: ALTER TABLE "driver_driver" ADD FOREIGN KEY ("driver_type") REFERENCES "driver_type" ON DELETE SET NULL03:51
zxq9So I see this now.03:51
zxq9But how does that result in a codec error in Python?03:52
plantianzxq9: Sorry, I had to step out.  I have no idea about the codec, I would focus on this error first though.  What DB are you using ?05:07
plantiannevermind I see it in the traceback05:29
sisalphello, leaving for TUL now :-)11:46
cedksisalp: on twitter11:46
sisalpwhere is the meeting point tonight ?11:46
cedksisalp: vaudre 211:46
nicoesisalp: make some noise !11:46
cedksisalp: it is in the Tryton calendar11:46
sisalpI check11:47
cedksisalp: http://www.tryton.org/community/calendar.html11:47
cedksisalp: https://www.google.com/calendar/b/0/render?eid=dTdmb2UzYm4wdHUzNjBtOHF2cTFlNWpybGsgcDRqaGdwOWo1YTJlaG5kZWJkZ2xvNnRzbGdAZw&ctz=Europe/Brussels&sf=true&output=xml11:47
sisalpFound, see you there if I'm not too late ;-)11:50
-!- sisalp(~dominique@annecy.sisalp.net) has left #tryton12:36
yangoon1 Tryton T-shirt packed, leaving for TUL;)12:38
PanderMy party tree view shows also category in the list. Now I also want so search or even sort on that column. How do I implement that? Current implementation is http://pastebin.com/Dn61R0Sh Thanks for any help on this one.17:42
cedkPander: which version?17:49
Pander2.017:53
cedkPander: you must add select="1" in the field tag of the XML view17:53
TelesightI have made a start with the Tryton 2.2 administration manual, if you want to review or help with writing parts of it, you are welcome ...18:02
PanderI have that: <xpath expr="/tree/field[@name=&quot;name&quot;]" position="after"><field name="categories_string" select="1"/> but categories column is unsortable and the client asks for implementation of search method when searching.18:08
cedkPander: unsortable it is normal18:10
cedkPander: and you searcher is wrong18:11
Pandercedk: sortable possible to enable?18:11
cedkPander: you can not use self.categories18:11
Pandercedk: do I have to go over all the parties to get the categories?18:12
cedkPander: http://doc.tryton.org/2.0/trytond/doc/ref/models/fields.html#order-field18:13
cedkPander: I don't know what you are trying to do18:13
Pandercedk: I want to enable sorting and/or searching on the categories column in my party tree view18:15
cedkPander: searching, you need to fix your searched18:16
cedkPander: for sorting you must defaile an order_field18:17
TelesightTo whom it may concern: see you tomorrow on TUL2011 !18:24
nicoeTelesight: see you ;)18:34
Pandercedk: I'll give it a go tomorrow, thanks for the pointers.18:35
-!- sampac(~spaccoud@def92-7-82-231-203-127.fbx.proxad.net) has left #tryton22:51

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