IRC logs of #tryton for Friday, 2011-12-02 #tryton log beginning Fri Dec 2 00:00:01 CET 2011
ndn_pithello! how can I use  keyword_open attribute of tree view? is there example? what is purpose of using this attribute?09:50
udonondn_pit: hi, grep -Rs "keyword_open" trytond/09:54
ndn_pitI 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?10:32
ndn_pitI mean by double-clicking on row10:33
cedkndn_pit: you must write a wizard that does that10:35
cedkndn_pit: and link to the model0 using the action.keyword tree_open10:35
ndn_pitcedk: is there similar example?10:37
cedkndn_pit: I don't think10:37
ndn_pitcedk: at least: wizard that opens view in new tab?10:39
cedkndn_pit: there is somes like the account charts10:40
ndn_pitcedk: thank you10:40
-!- ndn_pit(~ndn@ has left #tryton11:31
hedayatHow can we officially add a new language to tryton?12:08
hedayatso that we can start submitting translations for it?12:08
hedayatcedk: 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 to12:16
hedayatadd it to tryton "Officially"12:16
hedayatI've also seen this:
yangoonhedayat: hi12:16
hedayatBut it is not very clear about that12:17
hedayatyangoon: hi12:17
hedayatcedk: 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.12:17
yangoonfor continued support of a new language it would be good to have some translation leader for a language12:17
hedayatcedk: but I think this is after adding the language to tryton12:17
hedayatyangoon: Hmm.... I might be able to become the leader, or I might find him/her :P12:18
yangoonhedayat: great12:18
yangoonhedayat: because a half completed translation is worse than none;)12:19
hedayatyangoon: :)12:19
yangoonhedayat: so the first step would be to submit the new translations to codereview12:19
hedayatyangoon: aha. And where should we start?! A specific module or probably tryton client?12:20
yangoonif they are ok you will get direct push access12:20
yangoonhedayat: start with the client and the server12:20
cedkyangoon, hedayat: not to codereview but just a patch12:20
cedknobody is able to review the translation currently as it is a new one12:20
hedayatcedk: Yes, I was wondering who will review the Persian translations!12:21
hedayatyangoon: OK12:21
hedayatI 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 thrown12:24
hedayatThe only way that works currently is to switch to the detailed view of the language and change the direction threre12:24
cedkhedayat: I don't understand12:27
hedayatcedk: OK, this is what I do: Open Administration->Localization->Languages12:29
yangoonhedayat: is it this one ?12:29
hedayatClick on the "Direction" column for some language12:29
hedayatyangoon: Oh yeah, I should have searched for it :P12:30
cedkhedayat: which language?12:30
hedayatcedk: doesn't matter.12:31
hedayatcedk: any of them. Just try to change the direction12:31
hedayatcedk: It won't let you to do so12:31
yangoonhedayat: which version?12:31
hedayatyangoon: 2.212:31
yangoonhedayat: from where did you take it? it should be fixed in trunk12:33
hedayatyangoon: I installed it using pip12:34
jamespharaohhi, 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 me12:34
cedkjamespharaoh: edit the configuration file12:35
yangoonhedayat: it will be in the next bugfix release12:35
hedayatyangoon: Thanks :)12:35
jamespharaohcedk: i don't have a configuration file12:35
cedkhedayat: only translation based on trunk is acceptable12:35
cedkjamespharaoh: create one12:35
jamespharaohcedk: sure but what do i put in it? i can't find any documentation12:35
hedayatcedk: OK, so I should install/download the latest version from the repos for translations, right?12:36
jamespharaohcedk: ok i think i've found something now
cedkjamespharaoh: configuration file is bundle in the sources12:37
cedkhedayat: yes12:37
jamespharaohcedk: well i installed using easy_install and i can't find anything like that12:38
jamespharaohcedk: i think i have found what i need now anyway, thanks12:38
hedayatyangoon: I applied the mentioned change. Now, it doesn't throw an exception, however it doesn't work either!12:38
hedayatyangoon: I can change the selection, but it won't be applied!12:38
hedayatyangoon: the direction remains unchanged anyway12:38
hedayatyangoon: BTW, I've applied the changed to my 2.2.0 release12:39
yangoonhedayat: press Ctrl+S to save the record explicitely12:39
hedayatyangoon: since it is not changed, there is nothing to save!12:40
yangoonhedayat: it would be better to go for an installation of tip12:40
yangoonhedayat: you need it anyway12:41
hedayatyangoon: :) OK!12:41
cedkjamespharaoh: we can not install configuration via easy_install12:41
hedayatyangoon: yes, I'm new to tryton but I've found some problems most of which were already solved in the trunk.12:42
jamespharaohcedk: yeah ok but it would be good to have a sample file somewhere, or maybe with the docs here
cedkjamespharaoh: there is one in the tgz12:53
jamespharaohcedk: actually it doesn't seem to be working for me... i've added two lines, with "[options]" and "interface =" and pointed trytond to it with --config= but it is still binding to
jamespharaohcedk: i'm looking at the config file in the tar ball now and can't see anything relevant12:56
cedkjamespharaoh: which version?12:56
jamespharaohcedk: 2.2.012:56
-!- hedayat(~hedayat@fedora/hedayatvk) has left #tryton12:57
cedkjamespharaoh: it is not interface as argument12:57
cedkjamespharaoh: I think you take the wrong configuration version12:58
jamespharaohcedk: 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 by default12:58
jamespharaohcedk: i'm going to look at the code...12:58
cedkjamespharaoh: I guess the bitbucket is old12:58
jamespharaohcedk: yeah thanks, i was just about getting there at the same time ;)13:00
jamespharaohcedk: i missed that in the conf file because i was looking for a separate option13:01
jamespharaohcedk: that's working now13:02
jamespharaohcedk: thanks13:02
jamespharaohanother 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?13:13
cedkjamespharaoh: yes by using Alt or Shift key13:16
jamespharaohcedk: thanks but i'm having another problem now, my custom reports aren't working and i see "TypeError: char buffer type not available"13:47
jamespharaohcedk: i had this during upgrade and found something online which wrapped the report data in a call to str()13:47
jamespharaohcedk: 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 back13:47
jamespharaohcedk: 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?13:48
cedkjamespharaoh: what did you find and do?13:49
jamespharaohcedk: that was a change to the db upgrade code i think which resulted in truncating the custom report field, afaict13:50
jamespharaohcedk: 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 it13:50
jamespharaohcedk: the error is coming up in line 180 now, which is: content_io.write(report.report_content)13:51
jamespharaohcedk: i'm trying to work out what the type of report.report_content is and how to output it cleanly13:51
cedkjamespharaoh: I don't understand the truncating part?13:52
jamespharaohit seems that if i call str(report.report_content) i get the first few characters of the report data, which is a zip file13:52
jamespharaohcedk: i can see the PK header and a few more bytes13:52
cedkjamespharaoh: and what is the problem?13:53
jamespharaohcedk: i can't generate reports13:53
jamespharaohcedk: because the line i described above throws a TypeError13:53
cedkjamespharaoh: but what is the problem with str() ?13:53
jamespharaohcedk: it doesn't seem to do the right thing because it is truncating, i think13:54
jamespharaohcedk: let me add some debugging13:54
cedkjamespharaoh: it truncates what?13:54
jamespharaohcedk: the binary data for the odt file which is stored in that field13:55
cedkjamespharaoh: I don't see how it is possible13:58
jamespharaohcedk: i'll try and get more information and let you know13:58
jamespharaohcedk: ok it looks like it's not str() that is truncating so that must have happened somewhere else14:02
jamespharaohcedk: 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"14:05
jamespharaohcedk: let me check the field contents manually14:05
jamespharaohcedk: 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...14:12
jamespharaohcedk: i'll fix that and see what happens14:12
ndn_pitcedk: 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...14:21
jamespharaohcedk: ok, a quick script to convert those columns and it's working14:25
jamespharaohcedk: 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)14:26
jamespharaohcedk: and then i have had to add a call to str() in, which i notice is not in trunk, like 181 in this file
jamespharaohcedk: i am guessing you will need to add that14:26
cedkndn_pit: it is currently not possible or use a real wizard form state14:27
jamespharaohcedk: i can submit a patch if you tell me how, i've checked out the source14:27
cedkjamespharaoh: but it is converted to str in line 17014:28
jamespharaohcedk: oh ok, i missed that, that also explains why the line number had changed14:29
jamespharaohcedk: i guess that's just not in 2.2.014:29
cedkjamespharaoh: I must backport this patch14:29
jamespharaohcedk: yeah ;)14:30
cedkjamespharaoh: it is in the queue, will do it probably in monday14:30
jamespharaohcedk: ok well thanks for the help, i think i can do my invoicing now14:30
-!- ndn_pit(~ndn@ has left #tryton14:45
-!- pjstevns( has left #tryton14:56
sampacHi 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 ?16:45
cedksampac: that's strange because normally it should not16:49
sampaccedk: 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.16:51
cedksampac: ok you do the partial yourself16:53
cedksampac: why are you doing that?16:53
sampachow else ? :-)16:53
cedksampac: what are you trying to do?16:54
-!- jamespharaoh(~jamesphar@ has left #tryton16:54
sampacinvoice part of a sale order16:54
cedksampac: you got a sale order, you define that you invoice base on the sale, and after you modify the sale16:54
cedksampac: how do you want the system know what you want to do?16:55
cedksampac: why do you want to do that with such configuration?16:55
dfamorato_cedk: ping16:55
sampacwell 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.16:57
cedksampac: but how do you want that Tryton knows that it is a adjustement of the accountant or not17:00
cedksampac: 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 sale17:01
cedkdfamorato_: pong17:01
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 finished17:02
sampaccedk: 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.17:02
dfamorato_cedk: Where do I send the credentials so you decide what is the best action you would like to take?17:03
cedkdfamorato_: as I said I don't like bitbucket concepts so I don't care about it17:04
cedkdfamorato_: it is just that someone fetched out-dated info from there17:04
dfamorato_cedk: want me to just delete the user then ?17:04
cedkdfamorato_: like you want, but there is 2 options: someone keep it sync or delete it17:05
cedksampac: this is not a sale17:05
nicoedfamorato_: what is needed to keep the stuff in sync ?17:05
dfamorato_nicoe: I guess is just setting up the correct crons17:05
cedksampac: or you need to customize it to add a invoice splitting concept on it17:05
cedksampac: like that it will create 3 invoices17:05
dfamorato_nicoe: s/crons/cron taks17:05
cedksampac: but it is very complicated to do such things because of the taxe computation etc. when you have more than 1 line17:06
nicoedfamorato_: send me the credentials, I'll take a look this week-end17:06
sampaccedk: 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.17:07
dfamorato_nicoe: I have sent in private chat17:08
nicoedfamorato_: ty17:09
cedksampac: 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 accountant17:11
cedkACTION bbl17:12
sampaccedk : 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 ?17:21
sampaccedk: 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.17:25
-!- sampac( has left #tryton22:31

Generated by 2.11.0 by Marius Gedminas - find it at!