Edit invoice documents (Docker system)

Where are the documents such as invoices so that they can be edited to suit each individual?

My system is Docker and I don’t know if this is an impediment to being able to do it.

The template for the invoice can be found with other templates in “Administration / User Interface / Actions / Reports”.

We described (well, sort of…) the process here in the German Tryton book, scroll down to the paragraph “Vorlagen für Rechnung, Angebot, Lieferschein etc.”

Would you be so kind and use the online translater of your choice, check whether you can get along with it - and provide a completed English version to be published in Tryton community HOWTOS ? - Doesn’t have to be perfect at all, a point to start further improvement is more than good enough… (;

Sorry for nudging you into doing work for the community - but I’m deeply convinced that such only can grow if everybody contributes a fair share.

Cheers,
Wolf

And to be able to modify an invoice?
Design, fields, etc?

What would be the way to modify it?

You download the template from this menu entry and you upload a modified version.
The modified version will be stored in the database and be used instead of the standard one.

If I would like to add some images to my invoice such as My logo or brands.

What would be the best way to insert them into the invoice?

Just insert them in the document

There is something I must not be doing right for the logos to be seen.

The text of the invoice changes without problems, but the images are not displayed. Do they have to have a specific format?

I answer myself.
He was placing the image wrong in the document.

Can you find out in some document or somewhere about the fields that we can add to the documents?

You would need to be able to add the Company’s data (Address, Postal Code, Location, Tax Identification, etc.)

You can go to the Tryton Menu, Administration / Models / Models.
There you can look up the model you are editing the report for and you can see what fields the model has.

I am viewing the invoice fields, but I do not see the ones that I mentioned in the previous post.

I don’t know if it can be added in any way.

For example:

  • If this code (<invoice.company.rec_name>) in the report gives me the name of the company.
  • What would be the code to be able to obtain the address of the company?

invoice.company is a many2one field which gives you a party.

The next step you should take is to look at the Party (party.party) model in order to see what fields it has and use them in your report.

Addresses are a little tricky, because you can have multiple addresses, company.addresses would give you a list addresses.
Probably you would want to get the one invoicing address of the party.

If you wanted to get the customer address, you would simply get invoice.invoice_address because this is already a many2one field of invoice model.

PS: Correction: invoice.company gets you Company. invoice.company_party gets you the party.

I still don’t understand it very well, but for example:
This code outputs the entire party: Name + Address, etc:

<for each="line in invoice.invoice_address.full_address.split('\n')">
<line>
</for>

How could I get only the name of the third party?

It’s because I want to bold the name of the third party. That’s why.

Invoice_address gets you the customer address.
You need to find the customer Party, which is invoice.party.
So invoice.party.rec_name will be the name.

1 Like

It’s hard, but I’m understanding.

Would there be any way with this code to make the first line it outputs, which is the name of the third party, bold?

<for each="line in invoice.invoice_address.full_address.split('\n')">
<line>
</for>

It would be much simpler than searching field by field.