IRC logs of #tryton for Friday, 2011-12-02

chat.freenode.net #tryton log beginning Fri Dec 2 00:00:01 CET 2011
2011-12-02 09:50 <ndn_pit> hello! how can I use keyword_open attribute of tree view? is there example? what is purpose of using this attribute?
2011-12-02 09:54 <udono> ndn_pit: hi, grep -Rs "keyword_open" trytond/
2011-12-02 10:32 <ndn_pit> I have parent model(model0) and two inherited models(model1, model2). In parent model's tree view - can i open corresponding(depending on "type" field) inherited model's form view?
2011-12-02 10:33 <ndn_pit> I mean by double-clicking on row
2011-12-02 10:35 <cedk> ndn_pit: you must write a wizard that does that
2011-12-02 10:35 <cedk> ndn_pit: and link to the model0 using the action.keyword tree_open
2011-12-02 10:37 <ndn_pit> cedk: is there similar example?
2011-12-02 10:37 <cedk> ndn_pit: I don't think
2011-12-02 10:39 <ndn_pit> cedk: at least: wizard that opens view in new tab?
2011-12-02 10:40 <cedk> ndn_pit: there is somes like the account charts
2011-12-02 10:40 <ndn_pit> cedk: thank you
2011-12-02 11:31 -!- ndn_pit(~ndn@95.56.115.52) has left #tryton
2011-12-02 12:08 <hedayat> Hi!
2011-12-02 12:08 <hedayat> How can we officially add a new language to tryton?
2011-12-02 12:08 <hedayat> so that we can start submitting translations for it?
2011-12-02 12:15 <cedk> hedayat: https://code.google.com/p/tryton/wiki/HowtoTranslate
2011-12-02 12:16 <hedayat> cedk: Yes, I've seen this. I know how to add a new language to my own tryton instance, but I'd like to know how to
2011-12-02 12:16 <hedayat> add it to tryton "Officially"
2011-12-02 12:16 <hedayat> I've also seen this: http://code.google.com/p/tryton/wiki/HowtoContribute
2011-12-02 12:16 <yangoon> hedayat: hi
2011-12-02 12:17 <hedayat> But it is not very clear about that
2011-12-02 12:17 <hedayat> yangoon: hi
2011-12-02 12:17 <hedayat> cedk: the last line says: If you translate, you can ask for a ssh access to repositories. For this, you must provide a ssh public key and a username.
2011-12-02 12:17 <yangoon> for continued support of a new language it would be good to have some translation leader for a language
2011-12-02 12:17 <hedayat> cedk: but I think this is after adding the language to tryton
2011-12-02 12:18 <hedayat> yangoon: Hmm.... I might be able to become the leader, or I might find him/her :P
2011-12-02 12:18 <yangoon> hedayat: great
2011-12-02 12:19 <yangoon> hedayat: because a half completed translation is worse than none;)
2011-12-02 12:19 <hedayat> yangoon: :)
2011-12-02 12:19 <yangoon> hedayat: so the first step would be to submit the new translations to codereview
2011-12-02 12:20 <hedayat> yangoon: aha. And where should we start?! A specific module or probably tryton client?
2011-12-02 12:20 <yangoon> if they are ok you will get direct push access
2011-12-02 12:20 <yangoon> hedayat: start with the client and the server
2011-12-02 12:20 <cedk> yangoon, hedayat: not to codereview but just a patch
2011-12-02 12:20 <cedk> nobody is able to review the translation currently as it is a new one
2011-12-02 12:21 <hedayat> cedk: Yes, I was wondering who will review the Persian translations!
2011-12-02 12:21 <yangoon> :)
2011-12-02 12:21 <hedayat> yangoon: OK
2011-12-02 12:24 <hedayat> I have also encountered a (seemingly) bug in the Languages section: if I click inside the Direction columnt (to change the direction from left-to-right to right-to-left, and exception is thrown
2011-12-02 12:24 <hedayat> The only way that works currently is to switch to the detailed view of the language and change the direction threre
2011-12-02 12:27 <cedk> hedayat: I don't understand
2011-12-02 12:29 <hedayat> cedk: OK, this is what I do: Open Administration->Localization->Languages
2011-12-02 12:29 <yangoon> hedayat: is it this one https://bugs.tryton.org/issue2239 ?
2011-12-02 12:29 <hedayat> Click on the "Direction" column for some language
2011-12-02 12:30 <hedayat> yangoon: Oh yeah, I should have searched for it :P
2011-12-02 12:30 <cedk> hedayat: which language?
2011-12-02 12:31 <hedayat> cedk: doesn't matter.
2011-12-02 12:31 <hedayat> cedk: any of them. Just try to change the direction
2011-12-02 12:31 <hedayat> cedk: It won't let you to do so
2011-12-02 12:31 <yangoon> hedayat: which version?
2011-12-02 12:31 <hedayat> yangoon: 2.2
2011-12-02 12:31 <yangoon> hedayat: http://hg.tryton.org/tryton/rev/44a56ceafb34
2011-12-02 12:33 <yangoon> hedayat: from where did you take it? it should be fixed in trunk
2011-12-02 12:34 <yangoon> http://hg.tryton.org/2.2/tryton/rev/e52757e8268f
2011-12-02 12:34 <hedayat> yangoon: I installed it using pip
2011-12-02 12:34 <jamespharaoh> hi, just upgraded to 2.2 from 1.8 and tryton is now binding to localhost. any suggestions how i can change this? a command line arg would be best for me
2011-12-02 12:35 <cedk> jamespharaoh: edit the configuration file
2011-12-02 12:35 <yangoon> hedayat: it will be in the next bugfix release
2011-12-02 12:35 <hedayat> yangoon: Thanks :)
2011-12-02 12:35 <jamespharaoh> cedk: i don't have a configuration file
2011-12-02 12:35 <cedk> hedayat: only translation based on trunk is acceptable
2011-12-02 12:35 <cedk> jamespharaoh: create one
2011-12-02 12:35 <jamespharaoh> cedk: sure but what do i put in it? i can't find any documentation
2011-12-02 12:36 <hedayat> cedk: OK, so I should install/download the latest version from the repos for translations, right?
2011-12-02 12:36 <jamespharaoh> cedk: ok i think i've found something now https://bitbucket.org/tryton/trytond/src/tip/etc/trytond.conf
2011-12-02 12:37 <cedk> jamespharaoh: configuration file is bundle in the sources
2011-12-02 12:37 <cedk> hedayat: yes
2011-12-02 12:38 <jamespharaoh> cedk: well i installed using easy_install and i can't find anything like that
2011-12-02 12:38 <jamespharaoh> cedk: i think i have found what i need now anyway, thanks
2011-12-02 12:38 <hedayat> yangoon: I applied the mentioned change. Now, it doesn't throw an exception, however it doesn't work either!
2011-12-02 12:38 <hedayat> yangoon: I can change the selection, but it won't be applied!
2011-12-02 12:38 <hedayat> yangoon: the direction remains unchanged anyway
2011-12-02 12:38 <hedayat> :P
2011-12-02 12:39 <hedayat> yangoon: BTW, I've applied the changed to my 2.2.0 release
2011-12-02 12:39 <yangoon> hedayat: press Ctrl+S to save the record explicitely
2011-12-02 12:40 <yangoon> hedayat: https://bugs.tryton.org/issue2288
2011-12-02 12:40 <hedayat> yangoon: since it is not changed, there is nothing to save!
2011-12-02 12:40 <yangoon> hedayat: it would be better to go for an installation of tip
2011-12-02 12:41 <yangoon> hedayat: you need it anyway
2011-12-02 12:41 <hedayat> yangoon: :) OK!
2011-12-02 12:41 <cedk> jamespharaoh: we can not install configuration via easy_install
2011-12-02 12:42 <hedayat> yangoon: yes, I'm new to tryton but I've found some problems most of which were already solved in the trunk.
2011-12-02 12:49 <jamespharaoh> cedk: yeah ok but it would be good to have a sample file somewhere, or maybe with the docs here http://www.tryton.org/downloads.html
2011-12-02 12:53 <cedk> jamespharaoh: there is one in the tgz
2011-12-02 12:55 <jamespharaoh> cedk: actually it doesn't seem to be working for me... i've added two lines, with "[options]" and "interface = 10.109.16.2" and pointed trytond to it with --config= but it is still binding to 127.0.0.1:8000
2011-12-02 12:56 <jamespharaoh> cedk: i'm looking at the config file in the tar ball now and can't see anything relevant
2011-12-02 12:56 <cedk> jamespharaoh: which version?
2011-12-02 12:56 <jamespharaoh> cedk: 2.2.0
2011-12-02 12:57 -!- hedayat(~hedayat@fedora/hedayatvk) has left #tryton
2011-12-02 12:57 <cedk> jamespharaoh: it is not interface as argument
2011-12-02 12:58 <cedk> jamespharaoh: I think you take the wrong configuration version
2011-12-02 12:58 <jamespharaoh> cedk: that came from that bitbucket link i sent you... the question is what do i need to specify in 2.2, in 1.8 it bound to 0.0.0.0 by default
2011-12-02 12:58 <jamespharaoh> cedk: i'm going to look at the code...
2011-12-02 12:58 <cedk> jamespharaoh: I guess the bitbucket is old
2011-12-02 12:59 <cedk> jamespharaoh: http://hg.tryton.org/2.2/trytond/file/tip/etc/trytond.conf
2011-12-02 13:00 <jamespharaoh> cedk: yeah thanks, i was just about getting there at the same time ;)
2011-12-02 13:01 <jamespharaoh> cedk: i missed that in the conf file because i was looking for a separate option
2011-12-02 13:02 <jamespharaoh> cedk: that's working now
2011-12-02 13:02 <jamespharaoh> cedk: thanks
2011-12-02 13:13 <jamespharaoh> another quick question... in the new version of tryton it seems to reopen the same tab if i try and open an item twice. is there any way to open two of the same item in this version?
2011-12-02 13:16 <cedk> jamespharaoh: yes by using Alt or Shift key
2011-12-02 13:47 <jamespharaoh> cedk: thanks but i'm having another problem now, my custom reports aren't working and i see "TypeError: char buffer type not available"
2011-12-02 13:47 <jamespharaoh> cedk: i had this during upgrade and found something online which wrapped the report data in a call to str()
2011-12-02 13:47 <jamespharaoh> cedk: the result was that all my reports were truncated to about five characters and i have had to pull out a backup to get the data back
2011-12-02 13:48 <jamespharaoh> cedk: i guess str() is truncating at the first character it doesn't like the look of or something and that something equivalent will do the trick?
2011-12-02 13:49 <cedk> jamespharaoh: what did you find and do?
2011-12-02 13:49 <jamespharaoh> cedk: https://bugs.tryton.org/issue2295
2011-12-02 13:50 <jamespharaoh> cedk: that was a change to the db upgrade code i think which resulted in truncating the custom report field, afaict
2011-12-02 13:50 <jamespharaoh> cedk: i've just tried doing the same thing in the report generation code but it causes the same problem, i get errors about the content because it is presumably truncating it
2011-12-02 13:51 <jamespharaoh> cedk: the error is coming up in report.py line 180 now, which is: content_io.write(report.report_content)
2011-12-02 13:51 <jamespharaoh> cedk: i'm trying to work out what the type of report.report_content is and how to output it cleanly
2011-12-02 13:52 <cedk> jamespharaoh: I don't understand the truncating part?
2011-12-02 13:52 <jamespharaoh> it seems that if i call str(report.report_content) i get the first few characters of the report data, which is a zip file
2011-12-02 13:52 <jamespharaoh> cedk: i can see the PK header and a few more bytes
2011-12-02 13:53 <cedk> jamespharaoh: and what is the problem?
2011-12-02 13:53 <jamespharaoh> cedk: i can't generate reports
2011-12-02 13:53 <jamespharaoh> cedk: because the line i described above throws a TypeError
2011-12-02 13:53 <cedk> jamespharaoh: but what is the problem with str() ?
2011-12-02 13:54 <jamespharaoh> cedk: it doesn't seem to do the right thing because it is truncating, i think
2011-12-02 13:54 <jamespharaoh> cedk: let me add some debugging
2011-12-02 13:54 <cedk> jamespharaoh: it truncates what?
2011-12-02 13:55 <jamespharaoh> cedk: the binary data for the odt file which is stored in that field
2011-12-02 13:58 <cedk> jamespharaoh: I don't see how it is possible
2011-12-02 13:58 <jamespharaoh> cedk: i'll try and get more information and let you know
2011-12-02 14:02 <jamespharaoh> cedk: ok it looks like it's not str() that is truncating so that must have happened somewhere else
2011-12-02 14:05 <jamespharaoh> cedk: but there's something still up.. i've added a call to str() in that line, so i am running content_io.write(str(report.report_content)) and now i get "BadZipfile: File is not a zip file"
2011-12-02 14:05 <jamespharaoh> cedk: let me check the field contents manually
2011-12-02 14:12 <jamespharaoh> cedk: ok i think when i restored from backup i failed to take account of a format change. the data i have looks like base64 whereas i think the new column wants just raw binary...
2011-12-02 14:12 <jamespharaoh> cedk: i'll fix that and see what happens
2011-12-02 14:21 <ndn_pit> cedk: I wrote wizard and linked with "tree_open", it opens tree view... how can I open directly record's edit form? I tried to change sequence in views but it opens create form instead of edit form...
2011-12-02 14:25 <jamespharaoh> cedk: ok, a quick script to convert those columns and it's working
2011-12-02 14:26 <jamespharaoh> cedk: so a summary of what happened... the upgrade managed to truncate those report files somehow (it didn't work at all until i added the call to str() in the upgrade code, i think this patch is already in trunk)
2011-12-02 14:26 <jamespharaoh> cedk: and then i have had to add a call to str() in report.py, which i notice is not in trunk, like 181 in this file http://hg.tryton.org/trytond/file/96aa327a3657/trytond/report/report.py
2011-12-02 14:26 <jamespharaoh> cedk: i am guessing you will need to add that
2011-12-02 14:27 <cedk> ndn_pit: it is currently not possible or use a real wizard form state
2011-12-02 14:27 <jamespharaoh> cedk: i can submit a patch if you tell me how, i've checked out the source
2011-12-02 14:28 <cedk> jamespharaoh: but it is converted to str in line 170
2011-12-02 14:29 <jamespharaoh> cedk: oh ok, i missed that, that also explains why the line number had changed
2011-12-02 14:29 <jamespharaoh> cedk: i guess that's just not in 2.2.0
2011-12-02 14:29 <cedk> jamespharaoh: http://hg.tryton.org/trytond/rev/9d82f554e214
2011-12-02 14:29 <cedk> jamespharaoh: I must backport this patch
2011-12-02 14:30 <jamespharaoh> cedk: yeah ;)
2011-12-02 14:30 <cedk> jamespharaoh: it is in the queue, will do it probably in monday
2011-12-02 14:30 <jamespharaoh> cedk: ok well thanks for the help, i think i can do my invoicing now
2011-12-02 14:45 -!- ndn_pit(~ndn@95.56.115.52) has left #tryton
2011-12-02 14:56 -!- pjstevns(~paul@a83-163-46-103.adsl.xs4all.nl) has left #tryton
2011-12-02 16:45 <sampac> Hi all. Question about invoicing. I don't see how to do partial invoicing because when a partial invoice is getting paid, the sale order indicates "done" and fully "paid" eventhough the invoice was only made for a portion of the sale order amount. Am I missing something ?
2011-12-02 16:49 <cedk> sampac: that's strange because normally it should not
2011-12-02 16:51 <sampac> cedk: what I do : generate the invoice. change quantity on an invoice line. Save. Pay in several installments until the invoice is marked "paid". Then come back to sale order and it is paid.
2011-12-02 16:53 <cedk> sampac: ok you do the partial yourself
2011-12-02 16:53 <cedk> sampac: why are you doing that?
2011-12-02 16:53 <sampac> how else ? :-)
2011-12-02 16:54 <cedk> sampac: what are you trying to do?
2011-12-02 16:54 -!- jamespharaoh(~jamesphar@77.227.37.194) has left #tryton
2011-12-02 16:54 <sampac> invoice part of a sale order
2011-12-02 16:54 <cedk> sampac: you got a sale order, you define that you invoice base on the sale, and after you modify the sale
2011-12-02 16:55 <cedk> sampac: how do you want the system know what you want to do?
2011-12-02 16:55 <cedk> sampac: why do you want to do that with such configuration?
2011-12-02 16:55 <dfamorato_> cedk:
2011-12-02 16:55 <dfamorato_> cedk: ping
2011-12-02 16:57 <sampac> well doing what I did, it should see that the invoice amount is different from so amount and show invoice progress (oe does it). This being said I understand I am doing it wrong I will check what you mention.
2011-12-02 17:00 <cedk> sampac: but how do you want that Tryton knows that it is a adjustement of the accountant or not
2011-12-02 17:01 <cedk> sampac: I really don't understand why you want to make 2 invoices out of 1 sale when you configure to generate an invoice based on sale
2011-12-02 17:01 <cedk> dfamorato_: pong
2011-12-02 17:02 <dfamorato_> cedk: This is kind of embarassing... I own the username tryton on bitbucket. It was my intention to setup a mirror, which I never finished
2011-12-02 17:02 <sampac> cedk: ok if you sell a project and you invoice based on terms: 10% downpayment, 20% studies 30% provisionnal acceptance 40% final acceptance. this kind of case.
2011-12-02 17:03 <dfamorato_> cedk: Where do I send the credentials so you decide what is the best action you would like to take?
2011-12-02 17:04 <cedk> dfamorato_: as I said I don't like bitbucket concepts so I don't care about it
2011-12-02 17:04 <cedk> dfamorato_: it is just that someone fetched out-dated info from there
2011-12-02 17:04 <dfamorato_> cedk: want me to just delete the user then ?
2011-12-02 17:05 <cedk> dfamorato_: like you want, but there is 2 options: someone keep it sync or delete it
2011-12-02 17:05 <cedk> sampac: this is not a sale
2011-12-02 17:05 <nicoe> dfamorato_: what is needed to keep the stuff in sync ?
2011-12-02 17:05 <dfamorato_> nicoe: I guess is just setting up the correct crons
2011-12-02 17:05 <cedk> sampac: or you need to customize it to add a invoice splitting concept on it
2011-12-02 17:05 <cedk> sampac: like that it will create 3 invoices
2011-12-02 17:05 <dfamorato_> nicoe: s/crons/cron taks
2011-12-02 17:06 <cedk> sampac: but it is very complicated to do such things because of the taxe computation etc. when you have more than 1 line
2011-12-02 17:06 <nicoe> dfamorato_: send me the credentials, I'll take a look this week-end
2011-12-02 17:07 <sampac> cedk: ok. To answer about how Tryton knows: in OE, the sale order shows a progress bar of invoicing that compares amount of sale order to sum of amounts of all invoices linked to it. If the accountant adjusted then it will show up I suppose. It seems less misleading than saying : it is paid.
2011-12-02 17:08 <dfamorato_> nicoe: I have sent in private chat
2011-12-02 17:09 <nicoe> dfamorato_: ty
2011-12-02 17:11 <cedk> sampac: no, it is an odd before of OE. How do you make it paid if there was just an adjustement of the price by the accountant
2011-12-02 17:12 <cedk> ACTION bbl
2011-12-02 17:21 <sampac> cedk : so I think there should be a progress bar showing what portion of the so was "invoiced", different from the existing indicator that shows that all opened invoices are paid. And if all the invoices opened are paid but that it does not represent 100% of the so, then a new button appears on the so to force it to "done"... Thus you keep all information and don't mislead sales people ?
2011-12-02 17:25 <sampac> cedk: the idea is the so shouldn't switch to "done" without any info to sales people if the invoice amount is different from so amount.
2011-12-02 22:31 -!- sampac(~spaccoud@def92-7-82-231-203-127.fbx.proxad.net) has left #tryton

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