Changing printed invoice layout (odt file)

496 views
Skip to first unread message

Kivech

unread,
Jan 26, 2011, 10:55:15 AM1/26/11
to Tryton
I've been trying out Tryton over the past few days and ran into the
following 'challenge':

When I print an invoice, I am tied to the layout and markup that has
been defined in the provide odt file.

Now, changing the layout should not be too much of a problem, I would
think. However, changing font and character sizes is a real challenge.
Where are those defined, and how do I change those?

Also, is it possible to manage a set of different print layouts that
one can then select from the Invoice Print menu?
If so, how does one do this?

Looks like great piece of software that you guys got here, so thumbs
up!

My only advice would be: create more extensive documentation.
Basically I would expect questions like these to be covered in
standard documentation of this kind of software.

Keep the good work up!

Cédric Krier

unread,
Jan 26, 2011, 4:52:54 PM1/26/11
to try...@googlegroups.com
On 26/01/11 07:55 -0800, Kivech wrote:
> I've been trying out Tryton over the past few days and ran into the
> following 'challenge':
>
> When I print an invoice, I am tied to the layout and markup that has
> been defined in the provide odt file.
>
> Now, changing the layout should not be too much of a problem, I would
> think. However, changing font and character sizes is a real challenge.
> Where are those defined, and how do I change those?

You can edit the template from the menu:

Administration>User Interface>Actions>Reports

You must edit the content field by save it somewhere and re-select the file
after saving change.
The database will keep a copy of it and Tryton will use it instead of the
source file one.

> Also, is it possible to manage a set of different print layouts that
> one can then select from the Invoice Print menu?

Not with default modules. But it is possible to develop a module that will add
this choice. But it is a little bit strange to have this feature perhaps you
can fix it by using <if> template condition.


--
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric...@b2ck.com
Website: http://www.b2ck.com/

Bram

unread,
Jan 29, 2011, 4:20:11 AM1/29/11
to Tryton
I am also working on the invoice report. Everything works fine until I
want to ad our logo to header_A4.odt.

Printing an invoice ends with:

Traceback (most recent call last):
File "/trytond/protocols/netrpc.py", line 48, in run
res = dispatch(host, port, 'NetRPC', *msg)
File "/trytond/protocols/dispatcher.py", line 136, in dispatch
res = getattr(obj, method)(*args, **kargs)
File "/trytond/modules/account_invoice/invoice.py", line 2002, in
execute
res = super(InvoiceReport, self).execute(ids, datas)
File "/trytond/report/report.py", line 118, in execute
type, data = self.parse(action_report, objects, datas, {})
File "/trytond/modules/account_invoice/invoice.py", line 2030, in
parse
localcontext)
File "/trytond/report/report.py", line 242, in parse
data = self.convert_pdf(data)
File "/trytond/report/report.py", line 277, in convert_pdf
doc = desktop.openFile(odt_name, hidden=False)
File "/openoffice/interact.py", line 150, in openFile
return self.openURL(url, **kw)
File "/openoffice/interact.py", line 144, in openURL
return self._desktop.loadComponentFromURL(url, target, 0,
properties)
com.sun.star.lang.IllegalArgumentException: URL seems to be an
unsupported one.

Can tryton handle gif-files?

Thanks for your help in advance.

Bram van der Sar

Cédric Krier

unread,
Jan 29, 2011, 5:32:29 AM1/29/11
to try...@googlegroups.com
Please use the bugtracker to report issue.

http://bugs.tryton.org/

Thanks,

Reply all
Reply to author
Forward
0 new messages