I’m quite new in Tryton and i started to modify my invoice template. Due the fact, that the company.rec_name is written to the document iw ould like to replace that by the invoice party name, how may i reach that ? could somebody a little explain how i may find that by using the model ???
I’m not sure swapping the company name (your company) for the invoice party name (which is either the customer, or supplier, name depending on the type of the invoice) is the best idea…
However, if you really do want to do this, then invoice.party.name may be what you are looking for.
You can find this by looking through the models and fields in the Administration > Models > Models. In the Invoice model you will find a party field that has a Many2One relationship with the Party model. In the Party model you will find the name field.
I think it really depends on what you are looking for.
However, on thing it is important to realize is that the same invoice template is used for both customer and supplier invoices.
The party_name field in the address is specific to that address, and is intended to replace the name of the party when you are printing that address. So this will be the party_name field from your companies first address.