Printing timesheet_invoice reports

34 views
Skip to first unread message

Andreas Kaiser

unread,
May 9, 2012, 6:59:15 AM5/9/12
to try...@googlegroups.com
Hi all,


I'm completely new to Tryton, so maybe my question is a FAQ or entirely stupid; therefore any pointers to that FAQ (or any other documentation) I might not have found are highly welcome…

I have been able to setup Tryton with the contract, timesheet and timesheet_invoice modules (including their dependencies) to fit all my needs (including, but not limited to customizing the invoice print template) except one: I don't find any possibility to print a report with all timesheet lines for a generated invoice. However I did find invoice-report.pt and work-report.pt within the timesheet_invoice module. These seem to contain exactly what I need, I'm just missing how to trigger the generation of these reports from the Client (2.2.1 on OSX, if that is important at all).

What am I missing? Or am I just completely blind to just find that button?


TIA,

Andreas

himanshu patel

unread,
May 9, 2012, 7:14:49 AM5/9/12
to try...@googlegroups.com
Hi Andreas,

I am not getting your point.

If possible please explain me.

Thank You
Himanshu

--
try...@googlegroups.com mailing list

Nicolas Évrard

unread,
May 9, 2012, 7:18:33 AM5/9/12
to try...@googlegroups.com
* Andreas Kaiser [2012-05-09 12:59 +0200]:
>Hi all,

Hello Andreas,

>I'm completely new to Tryton, so maybe my question is a FAQ or entirely
>stupid; therefore any pointers to that FAQ (or any other documentation) I
>might not have found are highly welcome…

Well documentation might be better, we accept patches ;)

>I have been able to setup Tryton with the contract, timesheet and
>timesheet_invoice modules (including their dependencies) to fit all my
>needs (including, but not limited to customizing the invoice print
>template) except one: I don't find any possibility to print a report with
>all timesheet lines for a generated invoice. However I did
>find invoice-report.pt and work-report.pt within the timesheet_invoice
>module. These seem to contain exactly what I need, I'm just missing how to
>trigger the generation of these reports from the Client (2.2.1 on OSX, if
>that is important at all).

What is this timesheet_invoice module you are talking about?
It's probably a custom module we never heard about.

--
Nicolas Évrard

B2CK SPRL
rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
E-mail/Jabber: nicolas...@b2ck.com
Website: http://www.b2ck.com/
signature.asc

Andreas Kaiser

unread,
May 9, 2012, 7:31:32 AM5/9/12
to try...@googlegroups.com


Am Mittwoch, 9. Mai 2012 13:18:33 UTC+2 schrieb Nicolas Évrard:
* Andreas Kaiser  [2012-05-09 12:59 +0200]:
What is this timesheet_invoice module you are talking about? 
It's probably a custom module we never heard about.

Sorry, I din't even notice that it's not an official module. However you can find it on PyPI (http://pypi.python.org/pypi/trytond_timesheet_invoice/) or github (https://github.com/pjstevns/trytond_timesheet_invoice).

It contains two reports (timesheet_invoice_lines_report and timesheet_lines_report) on the account.invoice and project.work models (see https://github.com/pjstevns/trytond_timesheet_invoice/blob/master/report.xml).

My problem is, that I don't know how to trigger these reports from the Tryton client.


Thanks for your help,

Andreas

Bertrand Chenal

unread,
May 9, 2012, 7:32:29 AM5/9/12
to try...@googlegroups.com
Le Wed, 9 May 2012 03:59:15 -0700 (PDT),
Andreas Kaiser <d1sk0...@googlemail.com> a écrit :

> Hi all,
>
Hi Andreas

> I'm completely new to Tryton, so maybe my question is a FAQ or
> entirely stupid; therefore any pointers to that FAQ (or any other
> documentation) I might not have found are highly welcome…
>
> I have been able to setup Tryton with the contract, timesheet and
> timesheet_invoice modules (including their dependencies) to fit all

Are you talking about this module
http://git.subdir.eu/paul/trytond_timesheet_invoice/ ?


> my needs (including, but not limited to customizing the invoice print
> template) except one: I don't find any possibility to print a report
> with all timesheet lines for a generated invoice. However I did
> find invoice-report.pt and work-report.pt within the

Looks like those reports are using a rml report engine, maybe you miss
another module.

Andreas Kaiser

unread,
May 9, 2012, 7:47:23 AM5/9/12
to try...@googlegroups.com

Am Mittwoch, 9. Mai 2012 13:32:29 UTC+2 schrieb bch:
Le Wed, 9 May 2012 03:59:15 -0700 (PDT),
Andreas Kaiser <d1sk0...@googlemail.com> a écrit :


Are you talking about this module
http://git.subdir.eu/paul/trytond_timesheet_invoice/ ?

Yes (although I found it on PyPi and github and not on http://git.subdir.eu/).
 
> my needs (including, but not limited to customizing the invoice print
> template) except one: I don't find any possibility to print a report
> with all timesheet lines for a generated invoice. However I did
> find invoice-report.pt and work-report.pt within the

Looks like those reports are using a rml report engine, maybe you miss
another module.

That would be reportlab (which is installed and can be imported without errors), right?


Andreas 

Andreas Kaiser

unread,
May 9, 2012, 9:31:48 AM5/9/12
to try...@googlegroups.com
Finally I found the solution for my problem. 
 
1. A ir.action.wizard element was missing in report.xml.

Adding this makes the report show up in the client:

    <record model="ir.action.wizard" id="print_timesheet_invoice_lines_report">
        <field name="name">Timesheet</field>
        <field name="wiz_name">account.invoice.print_timesheet_invoice_lines_report</field>
        <field name="model">account.invoice</field>
    </record>

2. Although not a "hard" dependency "zope.pagetemplate" is an additional requirement to make the report generation finally work.


Thank you all for your help!

Andreas

Nicolas Évrard

unread,
May 9, 2012, 9:19:49 AM5/9/12
to try...@googlegroups.com
* Andreas Kaiser [2012-05-09 13:47 +0200]:

>> > my needs (including, but not limited to customizing the invoice print
>> > template) except one: I don't find any possibility to print a report
>> > with all timesheet lines for a generated invoice. However I did
>> > find invoice-report.pt and work-report.pt within the
>>
>> Looks like those reports are using a rml report engine, maybe you miss
>> another module.
>>
>
>That would be reportlab (which is installed and can be imported without
>errors), right?

Those reports seem also to use TAL as templating engine.
signature.asc

Bertrand Chenal

unread,
May 9, 2012, 9:46:57 AM5/9/12
to try...@googlegroups.com
Le Wed, 9 May 2012 04:47:23 -0700 (PDT),
Andreas Kaiser <d1sk0...@googlemail.com> a écrit :

>
Probably not, as you installed with pip you should have all the
dependencies.

I checked the source and it seems that the code that do the link
between models and reports is there:

https://github.com/pjstevns/trytond_timesheet_invoice/blob/master/report.xml

So I see no obvious solution.
Reply all
Reply to author
Forward
0 new messages