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

chat.freenode.net #tryton log beginning Wed Dec 21 00:00:02 CET 2011
2011-12-21 07:36 <scrapper> hello friends, I want to add a second report to invoice "Open report" instead of opening invoice.odt it should open invoice2.odt. any ideas?
2011-12-21 07:46 <scrapper> have to move to work now. Will ask again later. cu all
2011-12-21 07:47 -!- scrapper(~scrapper@188-23-7-180.adsl.highway.telekom.at) has left #tryton
2011-12-21 09:52 <scrapper> so 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.
2011-12-21 09:59 <nicoe> scrapper: I don't understand
2011-12-21 10:00 <scrapper> nicoe: 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_de
2011-12-21 10:00 <scrapper> working with invoice_en.odt and invoice_de.odt
2011-12-21 10:00 <scrapper> I did not know how todo this, I startet programming invoice.xml and invoice.py ... but didn't really know how todo it.
2011-12-21 10:01 <scrapper> now I found ... there is nothing to programm, its already everything to create a new report in the admin area.
2011-12-21 10:01 <nicoe> why don't you use the built-in translation system ?
2011-12-21 10:02 <scrapper> because I have some special layout... and the build in translation system generates client dependant language reports.
2011-12-21 10:02 <scrapper> but i always want to create an English and a German Invoice ... independet on clients language.
2011-12-21 10:03 <nicoe> ok
2011-12-21 10:03 <scrapper> tryton is awesome! I am just too fresh. sorry.
2011-12-21 10:03 <nicoe> np
2011-12-21 11:03 <scrapper> After disabling the "checkbox Active" in User Interface -> Actions -> Reports this report disappears from the Reports-List. Is this intended to act like this?
2011-12-21 11:03 <scrapper> So its not possible to set this Report back to acitve. :-(
2011-12-21 11:03 <scrapper> active.
2011-12-21 11:04 <scrapper> tryton 2.2.0
2011-12-21 11:04 <sisalp> scrapper: catch22 situation ? No possibility to search inactive reports ?
2011-12-21 11:05 <scrapper> I don't know how to search inactive reports.
2011-12-21 11:06 <sisalp> scrapper: I have the same need regarding multiple invoice layouts. Would you indicate what the bottom line is after your try ?
2011-12-21 11:06 <sisalp> active=False ??
2011-12-21 11:07 <scrapper> sisalp: 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.
2011-12-21 11:07 <scrapper> sisalp 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.
2011-12-21 11:09 <scrapper> I 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.
2011-12-21 11:12 <cedk> scrapper: to search for inactive: Active: False
2011-12-21 11:13 <scrapper> ok great... I did not know that it is possible to Search that way.
2011-12-21 11:13 <scrapper> have them back thankx cedk
2011-12-21 11:16 <scrapper> I 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.
2011-12-21 11:17 <scrapper> well not to en or de does not matter yet...
2011-12-21 11:21 <cedk> scrapper: you must create an action keyword on them
2011-12-21 11:22 <scrapper> in tryton-client or in invoice.xml?
2011-12-21 11:22 <scrapper> is all work to be done performed in tryton-client?
2011-12-21 11:23 <scrapper> cedk: I try to create action keywords now... thanks you for that helpful information.
2011-12-21 11:25 <scrapper> cedk: 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.
2011-12-21 11:26 <cedk> scrapper: there is a keyword for the invoice report
2011-12-21 11:26 <cedk> scrapper: but it is set to the wizard not the report
2011-12-21 11:27 <cedk> scrapper: by the way, why don't you just modify the Invoice Report template?
2011-12-21 11:27 <scrapper> cedk: I need two different layouts for invoices.
2011-12-21 11:28 <scrapper> so I want to have to invoice reports ... one pointing to invoice_en.odt and another one pointing to inoivce_de.odt.
2011-12-21 11:28 <scrapper> invoice.de.odt
2011-12-21 11:28 <cedk> scrapper: why ? 2 templates
2011-12-21 11:28 <scrapper> two invoice reports... sorry for tipping that bad.
2011-12-21 11:29 <cedk> scrapper: becarfull that the report is saved when you open the invoice
2011-12-21 11:29 <scrapper> because translation is not enough... I want to have some style adjustmetn.
2011-12-21 11:29 <cedk> scrapper: with you change this will still happen but with the default report template
2011-12-21 11:29 <cedk> scrapper: this is really strange
2011-12-21 11:29 <scrapper> cedk: another good tip, ... I already read that the reports get saved. I will check if the get saved properly.
2011-12-21 11:29 <cedk> scrapper: it will not
2011-12-21 11:30 <cedk> scrapper: you can make different layout depending of the language using 1 report
2011-12-21 11:30 <cedk> scrapper: just test the language
2011-12-21 11:30 <scrapper> cedk: how can I do this?
2011-12-21 11:31 <cedk> scrapper: simple IF
2011-12-21 11:31 <scrapper> the only thing i want is to use invoice_en.odt and invoice_de.odt is there no "easy" way todo this, without saving troubles?
2011-12-21 11:31 <scrapper> ok
2011-12-21 11:32 <scrapper> so which language? the language of the tryton-client or the language of the invoice-recipient?
2011-12-21 11:32 <scrapper> invoice-recipient for sure. ok.
2011-12-21 11:32 <scrapper> All I wanted was two reports --- one for English and one for German.
2011-12-21 11:33 <scrapper> I thougth it would be easey, just clone the default one and make some minimal changes.
2011-12-21 11:34 <scrapper> cedk: thanks for the help... will rethink about my strategy.
2011-12-21 11:35 <bechamel> scrapper: 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 them
2011-12-21 11:35 <cedk> scrapper: just a simple test: if o.party.lang.code == 'en_US'
2011-12-21 11:37 <scrapper> thanks 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.
2011-12-21 11:38 <scrapper> cedk: but thanks to you I now know that I would have troubles as the reports wouldn't get saved! thanks a lot!!!
2011-12-21 11:39 <nicoe> cedk: 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 report
2011-12-21 11:40 <cedk> nicoe: but it is a wrong design
2011-12-21 11:40 <nicoe> yes, but it is easier that way so people will use that ...
2011-12-21 11:40 <bechamel> cedk: what is wrong ?
2011-12-21 11:41 <cedk> nicoe: could you check this: http://codereview.tryton.org/171005/
2011-12-21 11:41 <cedk> bechamel: duplicate reports
2011-12-21 11:41 <scrapper> ok I think I understand now better --- ONE INVOICE --- ONE REPORT -- if I would have two reports this would break the tryton design?
2011-12-21 11:42 <cedk> bechamel: howto choose the template to use
2011-12-21 11:43 <bechamel> cedk: let the user choose
2011-12-21 11:44 <bechamel> cedk: invoice is a difficult exemple as the report generation is triggered by the invoice validation
2011-12-21 11:46 <cedk> bechamel: so it is 2 reports
2011-12-21 11:47 <scrapper> I 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.
2011-12-21 11:52 <udono> scrapper: what is your exact goal with the two reports? What do you exactly mean with the 'german part'?
2011-12-21 11:53 <scrapper> udono: In the first run I wanted one invoice_en.odt and one invoice_de.odt
2011-12-21 11:53 <scrapper> Both with proper layout and translation.
2011-12-21 11:54 <scrapper> I 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.
2011-12-21 11:55 <scrapper> For 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.
2011-12-21 11:55 <udono> scrapper: so you want for one invoice a legal invoice report and a translated copy?
2011-12-21 11:55 <scrapper> yes.
2011-12-21 11:56 <scrapper> And 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.
2011-12-21 11:57 <scrapper> udono: 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.
2011-12-21 11:58 <scrapper> udono: unitl yesterday I didn't even know that the reports get saved :-) sorry. I am totally new.
2011-12-21 11:58 <udono> scrapper: 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.
2011-12-21 11:59 <scrapper> udono: this is exactly how I will do it! thank you.
2011-12-21 11:59 <udono> scrapper: With this, both original and translation are saved at once.
2011-12-21 12:00 <scrapper> udono: thank you! I will do it that way. Thank you all.
2011-12-21 12:00 <udono> scrapper: welcome
2011-12-21 15:25 -!- sisalp(~dominique@annecy.sisalp.net) has left #tryton
2011-12-21 15:52 <jcm> cedk: I am surprised that it's only a French requirement, because I thought all european countries shared the same
2011-12-21 15:53 <jcm> cedk: the invoice must be in the company language, not in the party's language
2011-12-21 15:53 <jcm> that's a design error as far as I know accounting
2011-12-21 15:53 <jcm> by default, the invoice should be in the company's language
2011-12-21 15:54 <jcm> and in option, there could be a translation in the next pages when the party's language is not the same as the company's
2011-12-21 16:00 <scrapper> jcm: right, the invoice must be in the companies language in first place. Maybe with a translation to parties language.
2011-12-21 16:20 <jcm> scrapper: could you please answer to teh tryton list to the thread named 'invoice translation: should be bilingual'?
2011-12-21 16:34 <scrapper> jcm: will answer there yes. i am not on tryton mailing-list yet. but will activate account today.
2011-12-21 20:32 -!- scrapper(~scrapper@88.117.159.6) has left #tryton

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