IRC logs of #tryton for Wednesday, 2011-12-21

chat.freenode.net #tryton log beginning Wed Dec 21 00:00:02 CET 2011
scrapperhello friends, I want to add a second report to invoice "Open report" instead of opening invoice.odt it should open invoice2.odt. any ideas?07:36
scrapperhave to move to work now. Will ask again later. cu all07:46
-!- scrapper(~scrapper@188-23-7-180.adsl.highway.telekom.at) has left #tryton07:47
scrapperso friends, now I know how to create a new report. i do not have to program anything. ats already in the admin area, Administraion -> Actions -> Reports :-(. thankfully I found something on the net talking about that subject.09:52
nicoescrapper: I don't understand09:59
scrappernicoe: yesterday and today I tried to programm a new report for invoice. right now on "Open Report" there is Invoice ... I wanted to create on for English and one for German. Invoice_en and Invoice_de10:00
scrapperworking with invoice_en.odt and invoice_de.odt10:00
scrapperI did not know how todo this, I startet programming invoice.xml and invoice.py ... but didn't really know how todo it.10:00
scrappernow I found ... there is nothing to programm, its already everything to create a new report in the admin area.10:01
nicoewhy don't you use the built-in translation system ?10:01
scrapperbecause I have some special layout... and the build in translation system generates client dependant language reports.10:02
scrapperbut i always want to create an English and a German Invoice ... independet on clients language.10:02
nicoeok10:03
scrappertryton is awesome! I am just too fresh. sorry.10:03
nicoenp10:03
scrapperAfter disabling the "checkbox Active" in User Interface -> Actions -> Reports this report disappears from the Reports-List. Is this intended to act like this?11:03
scrapperSo its not possible to set this Report back to acitve. :-(11:03
scrapperactive.11:03
scrappertryton 2.2.011:04
sisalpscrapper: catch22 situation ? No possibility to search inactive reports ?11:04
scrapperI don't know how to search inactive reports.11:05
sisalp scrapper: I have the same need regarding multiple invoice layouts. Would you indicate what the bottom line is after your try ?11:06
sisalpactive=False ??11:06
scrappersisalp: after I have finished the task, I can tell you how I did it finally. right now I am too fresh.. nothing I have tried works.11:07
scrappersisalp active=False yes... I could directly go into the database and set it back to active... but via tryton-client I haven't found a way yet.11:07
scrapperI tried to change invoice.xml ... was looking for something to change in invoice.py and tried to change it via admin-interface UserInterface -> Actions -> Reports... added new report with another invoice*.odt as target... but it does not show up on Invoice Mask.11:09
cedkscrapper: to search for inactive: Active: False11:12
scrapperok great... I did not know that it is possible to Search that way.11:13
scrapperhave them back thankx cedk11:13
scrapperI have created 2 new Reports Invoice_de and Invoice_en (could not change the default one - forbidden) they are similar to report "Invoice" I changed the Name to "Invoice_de" the Internal Name: "account.invoice_de the Path to the invoice_en.odt the rest stays the same. But they do not show up in the INvocie Mask.11:16
scrapperwell not to en or de does not matter yet...11:17
cedkscrapper: you must create an action keyword on them11:21
scrapperin tryton-client or in invoice.xml?11:22
scrapperis all work to be done performed in tryton-client?11:22
scrappercedk: I try to create action keywords now... thanks you for that helpful information.11:23
scrappercedk: if you talk about Keywords down to General I just want to mention, that in the "default Invoice Report" Keywords is empty... so I thought I do not have to do something there.11:25
cedkscrapper: there is a keyword for the invoice report11:26
cedkscrapper: but it is set to the wizard not the report11:26
cedkscrapper: by the way, why don't you just modify the Invoice Report template?11:27
scrappercedk: I need two different layouts for invoices.11:27
scrapperso I want to have to invoice reports ... one pointing to invoice_en.odt and another one pointing to inoivce_de.odt.11:28
scrapperinvoice.de.odt11:28
cedkscrapper: why ? 2 templates11:28
scrappertwo invoice reports... sorry for tipping that bad.11:28
cedkscrapper: becarfull that the report is saved when you open the invoice11:29
scrapperbecause translation is not enough... I want to have some style adjustmetn.11:29
cedkscrapper: with you change this will still happen but with the default report template11:29
cedkscrapper: this is really strange11:29
scrappercedk: another good tip, ... I already read that the reports get saved. I will check if the get saved properly.11:29
cedkscrapper: it will not11:29
cedkscrapper: you can make different layout depending of the language using 1 report11:30
cedkscrapper: just test the language11:30
scrappercedk: how can I do this?11:30
cedkscrapper: simple IF11:31
scrapperthe only thing i want is to use invoice_en.odt and invoice_de.odt is there no "easy" way todo this, without saving troubles?11:31
scrapperok11:31
scrapperso which language? the language of the tryton-client or the language of the invoice-recipient?11:32
scrapperinvoice-recipient for sure. ok.11:32
scrapperAll I wanted was two reports --- one for English and one for German.11:32
scrapperI thougth it would be easey, just clone the default one and make some minimal changes.11:33
scrappercedk: thanks for the help... will rethink about my strategy.11:34
bechamelscrapper: what cedk says, is that you can have the two layouts in the same report: just edit the current one, add the german stuff at the end and a big if-then-else aroud them11:35
cedkscrapper: just a simple test: if o.party.lang.code == 'en_US'11:35
scrapperthanks guys... as I always need a German and an English one... I can also do it without IF. I already knew about that solution. I just thought creating a new Report wouldn't be that complicated.11:37
scrappercedk: but thanks to you I now know that I would have troubles as the reports wouldn't get saved! thanks a lot!!!11:38
nicoecedk: maybe scrapper has a point there : embedding some simple logic in the template in order to do layout stuff is probably easier for newbies by duplicating the report11:39
cedknicoe: but it is a wrong design11:40
nicoeyes, but it is easier that way so people will use that ...11:40
bechamelcedk: what is wrong ?11:40
cedknicoe: could you check this: http://codereview.tryton.org/171005/11:41
cedkbechamel: duplicate reports11:41
scrapperok I think I understand now better --- ONE INVOICE --- ONE REPORT -- if I would have two reports this would break the tryton design?11:41
cedkbechamel: howto choose the template to use11:42
bechamelcedk: let the user choose11:43
bechamelcedk: invoice is a difficult exemple as the report generation is triggered by the invoice validation11:44
cedkbechamel: so it is 2 reports11:46
scrapperI will solve the problem now by extending invoice.odt with the german part... so I duplicate it in the invoice. Sorry for the newbie questions. Tryton is already great no need for two Reports.11:47
udonoscrapper: what is your exact goal with the two reports? What do you exactly mean with the 'german part'?11:52
scrapperudono: In the first run I wanted one invoice_en.odt and one invoice_de.odt11:53
scrapperBoth with proper layout and translation.11:53
scrapperI wanted to open them exactly as "Invoice" is open right now. But than cedk told me I will have problems, because the reports will not get saved into the system.11:54
scrapperFor me it would be ok if the default on (english) gets saved and the german one doesn't. But all in all I see there is more logic behind than just opening an Open Office document.11:55
udonoscrapper: so you want for one invoice a legal invoice report and a translated copy?11:55
scrapperyes.11:55
scrapperAnd I already knew that the translation does depend on the clients language... but I always want to have the ability to open English and German... independent on clients language.11:56
scrapperudono: This is why i thought it would be a good idea to have two reports. I did not know that there will be problems on saving.11:57
scrapperudono: unitl yesterday I didn't even know that the reports get saved :-) sorry. I am totally new.11:58
udonoscrapper: just copy in the regular invoice everything between <for each="invoice in objects"> ... </for> and put it at the end inside the <for each. Then fix the SetLang tag of the second report to hardcoded en_US.11:58
scrapperudono: this is exactly how I will do it! thank you.11:59
udonoscrapper: With this, both original and translation are saved at once.11:59
scrapperudono: thank you! I will do it that way. Thank you all.12:00
udonoscrapper: welcome12:00
-!- sisalp(~dominique@annecy.sisalp.net) has left #tryton15:25
jcmcedk: I am surprised that it's only a French requirement, because I thought all european countries shared the same15:52
jcmcedk: the invoice must be in the company language, not in the party's language15:53
jcmthat's a design error as far as I know accounting15:53
jcmby default, the invoice should be in the company's language15:53
jcmand in option, there could be a translation in the next pages when the party's language is not the same as the company's15:54
scrapperjcm: right, the invoice must be in the companies language in first place. Maybe with a translation to parties language.16:00
jcmscrapper: could you please answer to teh tryton list to the thread named 'invoice translation: should be bilingual'?16:20
scrapperjcm: will answer there yes. i am not on tryton mailing-list yet. but will activate account today.16:34
-!- scrapper(~scrapper@88.117.159.6) has left #tryton20:32

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